From: Philippe Proulx Date: Fri, 15 May 2020 19:35:00 +0000 (-0400) Subject: test.bash: pass all `.bats` files to `bats` X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=4cf20378081b017f1686b858e14042b39b7c5b20;p=deliverable%2Fbarectf.git test.bash: pass all `.bats` files to `bats` This makes `bats` accumulate tests and run all of them with a global progress, which is much better. Signed-off-by: Philippe Proulx --- diff --git a/tests/test.bash b/tests/test.bash index 74cf16b..aabce21 100755 --- a/tests/test.bash +++ b/tests/test.bash @@ -40,21 +40,10 @@ test_dirs=( "config/pass/everything" ) bats_bin="$(pwd)/bats/bin/bats" -rc=0 if [ -z "${CC+x}" ]; then # default to gcc export CC=gcc fi -for d in "${test_dirs[@]}"; do - pushd "$d" >/dev/null - $bats_bin "${@}" . - if [ $? -ne 0 ]; then - # latch error, but continue other tests - rc=1 - fi - popd >/dev/null -done - -exit $rc +"$bats_bin" "${test_dirs[@]}"