]> git.ipfire.org Git - thirdparty/dracut-ng.git/commitdiff
test: show all server logs until the "Serving" line
authorBenjamin Drung <benjamin.drung@canonical.com>
Wed, 29 Oct 2025 01:22:24 +0000 (02:22 +0100)
committerNeal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
Wed, 29 Oct 2025 02:42:55 +0000 (22:42 -0400)
The function `wait_for_server_startup` will search för `Serving` in the
server log for the indication that the server started correctly. It will
print the logs every second until `Serving` is found, but it will not
print the `Serving` line.

Print the remaining log lines after `Serving` has been found.

test/test-functions

index ef41815442204a7ffa39f44b59125acd41e3ac5c..99e7afb937b9ff7dee0ffb109fbe8963f842ff00 100644 (file)
@@ -85,6 +85,10 @@ wait_for_server_startup() {
         fi
         sleep 1
     done
+
+    if [ "${V-}" -ge 1 ]; then
+        tail -n "+$((printed_lines + 1))" "$TESTDIR"/server.log
+    fi
 }
 
 ovmf_code() {