From: Frantisek Sumsal Date: Fri, 17 Jun 2022 12:44:49 +0000 (+0200) Subject: test: make the busy loop in TEST-02 less verbose X-Git-Tag: v252-rc1~795^2~6 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=582547cbd38a02289451c1cea36a32f446b66677;p=thirdparty%2Fsystemd.git test: make the busy loop in TEST-02 less verbose as it unnecessarily clogs the logs. --- diff --git a/test/units/testsuite-02.sh b/test/units/testsuite-02.sh index af6e0078255..54927a63770 100755 --- a/test/units/testsuite-02.sh +++ b/test/units/testsuite-02.sh @@ -49,6 +49,7 @@ function report_result() { systemd-cat cat "/$name.log" } +set +x # Associative array for running tasks, where running[test-path]=PID declare -A running=() for task in "${TEST_LIST[@]}"; do @@ -72,6 +73,7 @@ for task in "${TEST_LIST[@]}"; do done if [[ -x $task ]]; then + echo "Executing test '$task'" log_file="/${task##*/}.log" $task &>"$log_file" & running[$task]=$! @@ -80,11 +82,14 @@ done # Wait for remaining running tasks for key in "${!running[@]}"; do + echo "Waiting for test '$key' to finish" wait ${running[$key]} && ec=0 || ec=$? report_result "$key" $ec unset running["$key"] done +set -x + # Test logs are sometimes lost, as the system shuts down immediately after journalctl --sync