From 1bd4e4a48277b60066630ad4048570413a14c598 Mon Sep 17 00:00:00 2001 From: Gulshan Singh Date: Sun, 11 Dec 2022 18:16:08 -0800 Subject: [PATCH] Move some env_parallel code into the else branch (#1432) Co-authored-by: Gulshan Singh --- tests/gdb-tests/tests.sh | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/gdb-tests/tests.sh b/tests/gdb-tests/tests.sh index 2b506aca4..cada90a54 100755 --- a/tests/gdb-tests/tests.sh +++ b/tests/gdb-tests/tests.sh @@ -147,18 +147,6 @@ parse_output_file() { fi } -JOBLOG_PATH="$(mktemp)" -echo "" -echo -n "Running tests in parallel and using a joblog in $JOBLOG_PATH" - -if [[ $KEEP -ne 1 ]]; then - echo " (use --keep it to persist it)" -else - echo "" -fi - -. $(which env_parallel.bash) - start=$(date +%s) if [ $SERIAL -eq 1 ]; then @@ -166,6 +154,18 @@ if [ $SERIAL -eq 1 ]; then run_test "$t" done else + JOBLOG_PATH="$(mktemp)" + echo "" + echo -n "Running tests in parallel and using a joblog in $JOBLOG_PATH" + + if [[ $KEEP -ne 1 ]]; then + echo " (use --keep it to persist it)" + else + echo "" + fi + + . $(which env_parallel.bash) + env_parallel --output-as-files --joblog $JOBLOG_PATH run_test ::: "${TESTS_LIST[@]}" | env_parallel parse_output_file {} fi