-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
32 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,56 @@ | ||
|
||
set -e # stop on errors | ||
|
||
if [ ! -d "toisto-aiff-test-suite/tests" ]; then | ||
echo "toisto-aiff-test-suite is missing. Read README.md Testing section for instructions." | ||
exit 1 | ||
fi | ||
|
||
# ensure clippy gives no errors or warnings | ||
cargo clippy -- -D warnings | ||
|
||
cargo doc | ||
|
||
# runs all tests | ||
|
||
cargo test | ||
# run tests - no capture if running under GitHub Actions | ||
if [ "$GITHUB_ACTIONS" == "true" ]; then | ||
cargo test -- --nocapture | ||
else | ||
cargo test | ||
fi | ||
|
||
# check that some functions never panic | ||
cargo test --release --features internal-no-panic | ||
|
||
# build the toisto tester for the test suite | ||
cargo build --example aifc-toisto | ||
|
||
# run the toisto test suite | ||
echo | ||
echo 'Toisto AIFF test suite results:' | ||
echo | ||
echo 'multi:' | ||
|
||
cd toisto-aiff-test-suite | ||
python3 toisto-runner.py -c --override-list ../toisto-aifc-override-list.json ../target/debug/examples/aifc-toisto multi | ||
|
||
# target/debug for normal testing, | ||
# x86_64-unknown-linux-gnu and powerpc-unknown-linux-gnu for GitHub Actions | ||
if [ -e ../target/x86_64-unknown-linux-gnu/debug/examples/ausnd-aureader-toisto ]; then | ||
python3 toisto-runner.py -c -v --override-list ../toisto-aifc-override-list.json ../target/x86_64-unknown-linux-gnu/debug/examples/aifc-toisto multi | ||
elif [ -e ../target/powerpc-unknown-linux-gnu/debug/examples/ausnd-aureader-toisto ]; then | ||
python3 toisto-runner.py -c -v --override-list ../toisto-aifc-override-list.json ../target/powerpc-unknown-linux-gnu/debug/examples/aifc-toisto multi | ||
else | ||
python3 toisto-runner.py -c --override-list ../toisto-aifc-override-list.json ../target/debug/examples/aifc-toisto multi | ||
fi | ||
|
||
echo | ||
echo 'single:' | ||
|
||
python3 toisto-runner.py -c --override-list ../toisto-aifc-override-list.json ../target/debug/examples/aifc-toisto single | ||
if [ -e ../target/x86_64-unknown-linux-gnu/debug/examples/ausnd-aureader-toisto ]; then | ||
python3 toisto-runner.py -c -v --override-list ../toisto-aifc-override-list.json ../target/x86_64-unknown-linux-gnu/debug/examples/aifc-toisto single | ||
elif [ -e ../target/powerpc-unknown-linux-gnu/debug/examples/ausnd-aureader-toisto ]; then | ||
python3 toisto-runner.py -c -v --override-list ../toisto-aifc-override-list.json ../target/powerpc-unknown-linux-gnu/debug/examples/aifc-toisto single | ||
else | ||
python3 toisto-runner.py -c --override-list ../toisto-aifc-override-list.json ../target/debug/examples/aifc-toisto single | ||
fi | ||
|
||
echo | ||
echo "--- All tests OK." |