From 4cf20378081b017f1686b858e14042b39b7c5b20 Mon Sep 17 00:00:00 2001 From: Philippe Proulx Date: Fri, 15 May 2020 15:35:00 -0400 Subject: [PATCH] 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 --- tests/test.bash | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) 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[@]}" -- 2.34.1