test: improve test script to allow easily adding new runs

test.sh previously had each of its runs hard-coded; this patch changes
the script to loop over an array of cargo flags instead. This allows new
flags to be added to the array to easily add new runs to the test
script.
This commit is contained in:
pantonshire committed 2022-09-08 16:55:30 +01:00
1 parent c8783caae2
commit 96a085686b
1 file changed
+11 -13
+11 -13
View File
@@ -2,17 +2,15 @@
set -e
set -o pipefail
# no_std and no alloc
cargo +nightly miri test --no-default-features --features serde
TEST_RUNS=(
'--no-default-features --features serde'
'--no-default-features --features alloc,serde'
'--features serde'
'--target sparc-unknown-linux-gnu --features serde'
'--target mips64-unknown-linux-gnuabi64 --features serde'
)
# no_std with alloc
cargo +nightly miri test --no-default-features --features alloc,serde
# std
cargo +nightly miri test --features serde
# 32-bit target
cargo +nightly miri test --target sparc-unknown-linux-gnu --features serde
# Big-endian target
cargo +nightly miri test --target mips64-unknown-linux-gnuabi64 --features serde
for FLAGS in "${TEST_RUNS[@]}"
do
cargo +nightly miri test $FLAGS
done