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