From: Michael Tremer Date: Fri, 9 Jun 2023 09:38:35 +0000 (+0000) Subject: tests: Always dump the environment X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5d4157c6655aea0673a60894420a9d5a0fa63dd6;p=network.git tests: Always dump the environment Signed-off-by: Michael Tremer --- diff --git a/test/networkd/test.sh b/test/networkd/test.sh index 7690978d..9cecf0a4 100644 --- a/test/networkd/test.sh +++ b/test/networkd/test.sh @@ -64,6 +64,9 @@ launch_networkd() { echo "networkd launched as PID ${networkd_PID}" + # Wait until networkd is initialized + # XXX Calling sleep(8) is very racy and should be replaced by something that + # waits until networkd has connected to dbus sleep 1 } @@ -100,6 +103,9 @@ terminate_networkd() { fi } +# Collect some status information +trap dump_status EXIT + main() { local test="${1}" shift @@ -128,9 +134,6 @@ main() { # Terminate networkd terminate_networkd - # Collect some status information - dump_status - # Run cleanup script if ! run_script "${test}/cleanup.sh"; then return 1