]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: make the busy loop in TEST-02 less verbose
authorFrantisek Sumsal <frantisek@sumsal.cz>
Fri, 17 Jun 2022 12:44:49 +0000 (14:44 +0200)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Fri, 17 Jun 2022 12:51:52 +0000 (14:51 +0200)
as it unnecessarily clogs the logs.

test/units/testsuite-02.sh

index af6e00782555bb02aa5b87c28fe96c1a940490a7..54927a63770af051f4561f0c755d10c29f21c732 100755 (executable)
@@ -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