From fefc0fc6628edfdf41ac4a02140de6820f5c6edb Mon Sep 17 00:00:00 2001 From: Eric Wasylishen Date: Sun, 6 Feb 2022 15:00:29 -0700 Subject: [PATCH] automated_tests.sh: fix bash syntax errors, don't run vis in parallel makes it difficult to tell which map caused a vis crash --- testmaps/automatated_tests.sh | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/testmaps/automatated_tests.sh b/testmaps/automatated_tests.sh index 29f4d8d7..65f9486f 100755 --- a/testmaps/automatated_tests.sh +++ b/testmaps/automatated_tests.sh @@ -97,7 +97,7 @@ for bsp in ${COMMIT_JSON_MAPS}; do file reference_bsp_json/${bsp}.json file ${bsp}.json - if [[ $CONTINUE_ON_FAILURE -ne 1]]; then + if [[ $CONTINUE_ON_FAILURE -ne 1 ]]; then exit 1 fi fi @@ -131,29 +131,25 @@ else sha256sum --strict --check qbsp.sha256sum hash_check_return=$? - if [[ $hash_check_return -ne 0 ]] && [[ $CONTINUE_ON_FAILURE -ne 1]]; then + if [[ $hash_check_return -ne 0 ]] && [[ $CONTINUE_ON_FAILURE -ne 1 ]]; then exit 1 fi fi # now run vis -# since vis is slower, launch all as background processes, and then wait for all of them to finish # FIXME: vis output is nondeterministic when run with multiple threads, so force 1 thread per process for bsp in ${HASH_CHECK_BSPS}; do - vis -nostate -threads 1 ${bsp} & + vis -nostate -threads 1 ${bsp} || exit 1 done -# we don't get the exit status this way, but the hash check will test the resulting visdata -wait - if [[ $UPDATE_HASHES -ne 0 ]]; then sha256sum ${HASH_CHECK_BSPS} > qbsp-vis.sha256sum || exit 1 else sha256sum --strict --check qbsp-vis.sha256sum hash_check_return=$? - if [[ $hash_check_return -ne 0 ]] && [[ $CONTINUE_ON_FAILURE -ne 1]]; then + if [[ $hash_check_return -ne 0 ]] && [[ $CONTINUE_ON_FAILURE -ne 1 ]]; then exit 1 fi fi