From 63b25ed749a691e17d817d291b598fc62cba0e88 Mon Sep 17 00:00:00 2001 From: BodgeMaster <> Date: Tue, 28 Jun 2022 18:55:35 +0200 Subject: [PATCH] fixed test script --- scripts/test.sh | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/scripts/test.sh b/scripts/test.sh index 774c5d3..55fa28b 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -18,8 +18,21 @@ echo "$LD_LIBRARY_PATH" mkdir -pv bin/test -echo "Building and running tests one by one..." +echo "Building tests..." -set -v +# add compile commands to this array +COMPILE_COMMANDS=( + "$CXX_WITH_FLAGS -Lbin/lib -l:nbt.so -o bin/test/nbt_helpers src/test/nbt_helpers.cpp" +) +for command in ${!COMPILE_COMMANDS[@]}; do + echo "${COMPILE_COMMANDS[command]}" + ${COMPILE_COMMANDS[command]} & +done -"$CXX_WITH_FLAGS" -Lbin/lib -l:nbt.so -o bin/test/nbt_helpers src/test/nbt_helpers.cpp +wait + +echo "Running tests..." + +for test in $(ls bin/test); do + bin/test/$test +done