|
1 | 1 |
|
2 | 2 | set -e # stop on errors
|
3 | 3 |
|
| 4 | +if [ ! -d "toisto-aiff-test-suite/tests" ]; then |
| 5 | + echo "toisto-aiff-test-suite is missing. Read README.md Testing section for instructions." |
| 6 | + exit 1 |
| 7 | +fi |
| 8 | + |
4 | 9 | # ensure clippy gives no errors or warnings
|
5 | 10 | cargo clippy -- -D warnings
|
6 | 11 |
|
7 | 12 | cargo doc
|
8 | 13 |
|
9 |
| -# runs all tests |
10 |
| - |
11 |
| -cargo test |
| 14 | +# run tests - no capture if running under GitHub Actions |
| 15 | +if [ "$GITHUB_ACTIONS" == "true" ]; then |
| 16 | + cargo test -- --nocapture |
| 17 | +else |
| 18 | + cargo test |
| 19 | +fi |
12 | 20 |
|
13 | 21 | # check that some functions never panic
|
14 | 22 | cargo test --release --features internal-no-panic
|
15 | 23 |
|
| 24 | +# build the toisto tester for the test suite |
| 25 | +cargo build --example aifc-toisto |
| 26 | + |
| 27 | +# run the toisto test suite |
16 | 28 | echo
|
17 | 29 | echo 'Toisto AIFF test suite results:'
|
18 | 30 | echo
|
19 | 31 | echo 'multi:'
|
20 |
| - |
21 | 32 | cd toisto-aiff-test-suite
|
22 |
| -python3 toisto-runner.py -c --override-list ../toisto-aifc-override-list.json ../target/debug/examples/aifc-toisto multi |
| 33 | + |
| 34 | +# target/debug for normal testing, |
| 35 | +# x86_64-unknown-linux-gnu and powerpc-unknown-linux-gnu for GitHub Actions |
| 36 | +if [ -e ../target/x86_64-unknown-linux-gnu/debug/examples/ausnd-aureader-toisto ]; then |
| 37 | + python3 toisto-runner.py -c -v --override-list ../toisto-aifc-override-list.json ../target/x86_64-unknown-linux-gnu/debug/examples/aifc-toisto multi |
| 38 | +elif [ -e ../target/powerpc-unknown-linux-gnu/debug/examples/ausnd-aureader-toisto ]; then |
| 39 | + python3 toisto-runner.py -c -v --override-list ../toisto-aifc-override-list.json ../target/powerpc-unknown-linux-gnu/debug/examples/aifc-toisto multi |
| 40 | +else |
| 41 | + python3 toisto-runner.py -c --override-list ../toisto-aifc-override-list.json ../target/debug/examples/aifc-toisto multi |
| 42 | +fi |
23 | 43 |
|
24 | 44 | echo
|
25 | 45 | echo 'single:'
|
26 | 46 |
|
27 |
| -python3 toisto-runner.py -c --override-list ../toisto-aifc-override-list.json ../target/debug/examples/aifc-toisto single |
| 47 | +if [ -e ../target/x86_64-unknown-linux-gnu/debug/examples/ausnd-aureader-toisto ]; then |
| 48 | + python3 toisto-runner.py -c -v --override-list ../toisto-aifc-override-list.json ../target/x86_64-unknown-linux-gnu/debug/examples/aifc-toisto single |
| 49 | +elif [ -e ../target/powerpc-unknown-linux-gnu/debug/examples/ausnd-aureader-toisto ]; then |
| 50 | + python3 toisto-runner.py -c -v --override-list ../toisto-aifc-override-list.json ../target/powerpc-unknown-linux-gnu/debug/examples/aifc-toisto single |
| 51 | +else |
| 52 | + python3 toisto-runner.py -c --override-list ../toisto-aifc-override-list.json ../target/debug/examples/aifc-toisto single |
| 53 | +fi |
28 | 54 |
|
29 | 55 | echo
|
30 | 56 | echo "--- All tests OK."
|
0 commit comments