]> xenbits.xensource.com Git - xen.git/commitdiff
CI: Improve serial handling in qemu-smoke-ppc64le.sh
authorAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 29 May 2024 13:21:12 +0000 (14:21 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 31 May 2024 21:03:30 +0000 (22:03 +0100)
Have PPC put serial to stdout like all other tests, so it shows up in the main
job log.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Release-Acked-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
automation/scripts/qemu-smoke-ppc64le.sh

index 2adbdac87ef57330d8ca61706011809519720b6b..701d81107d18db15632be71051183b1afa3ab9ee 100755 (executable)
@@ -2,15 +2,15 @@
 
 set -ex
 
+serial_log="$(pwd)/smoke.serial"
+
 # machine type from first arg passed directly to qemu -M
 machine=$1
 
 # Run the test
-rm -f smoke.serial
+rm -f ${serial_log}
 set +e
 
-touch smoke.serial
-
 timeout -k 1 20 \
 binaries/qemu-system-ppc64 \
     -bios binaries/skiboot.lid \
@@ -20,9 +20,10 @@ binaries/qemu-system-ppc64 \
     -vga none \
     -monitor none \
     -nographic \
-    -serial file:smoke.serial \
-    -kernel binaries/xen
+    -serial stdio \
+    -kernel binaries/xen \
+    |& tee ${serial_log} | sed 's/\r//'
 
 set -e
-(grep -q "Hello, ppc64le!" smoke.serial) || exit 1
+(grep -q "Hello, ppc64le!" ${serial_log}) || exit 1
 exit 0