dcavalca / rpms / systemd

Forked from rpms/systemd 3 months ago
Clone
Blob Blame History Raw
From 1e684870a7f893fcd9138c0ca6bde0fcf3bf752a Mon Sep 17 00:00:00 2001
From: Frantisek Sumsal <frantisek@sumsal.cz>
Date: Fri, 17 Jun 2022 14:44:49 +0200
Subject: [PATCH] test: make the busy loop in TEST-02 less verbose

as it unnecessarily clogs the logs.

(cherry picked from commit 582547cbd38a02289451c1cea36a32f446b66677)

Related: #2087652
---
 test/units/testsuite-02.sh | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/test/units/testsuite-02.sh b/test/units/testsuite-02.sh
index af6e007825..54927a6377 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