From 9eefbacedd9477ac4e7fe10d08bc9b1856087d65 Mon Sep 17 00:00:00 2001 From: Tino Reichardt Date: Wed, 18 Sep 2024 06:40:49 +0200 Subject: [PATCH] ZTS: Fix Test Summary page generation Fix that error: "cat /tmp/failed.txt: No such file or directory" Reviewed-by: Brian Behlendorf Reviewed-by: Tony Hutter Signed-off-by: Tino Reichardt Closes #16549 --- .github/workflows/scripts/qemu-7-prepare.sh | 7 +++++-- .github/workflows/scripts/qemu-8-summary.sh | 8 +++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/scripts/qemu-7-prepare.sh b/.github/workflows/scripts/qemu-7-prepare.sh index 3dc5c7efd02c..4e2583731d70 100755 --- a/.github/workflows/scripts/qemu-7-prepare.sh +++ b/.github/workflows/scripts/qemu-7-prepare.sh @@ -46,7 +46,11 @@ for i in $(seq 1 $VMs); do test -s $file && mv -f $file uname.txt file="vm$i/tests-exitcode.txt" - test -s $file || echo 1 > $file + if [ ! -s $file ]; then + # XXX - add some tests for kernel panic's here + # tail -n 80 vm$i/console.txt | grep XYZ + echo 1 > $file + fi rv=$(cat vm$i/tests-exitcode.txt) test $rv != 0 && touch /tmp/have_failed_tests @@ -89,7 +93,6 @@ fi cat summary.txt \ | awk '/\(expected PASS\)/{ if ($1!="SKIP") print $2; next; } show' \ | while read t; do - echo "check: $t" cat summary-failure-logs.txt \ | awk '$0~/Test[: ]/{ show=0; } $0~v{ show=1; } show' v="$t" \ > /tmp/fail.txt diff --git a/.github/workflows/scripts/qemu-8-summary.sh b/.github/workflows/scripts/qemu-8-summary.sh index 0bf1b0a2d194..26dbab28323b 100755 --- a/.github/workflows/scripts/qemu-8-summary.sh +++ b/.github/workflows/scripts/qemu-8-summary.sh @@ -35,15 +35,12 @@ EOF cat /tmp/summary.txt echo "" -if [ -e /tmp/have_failed_tests ]; then - RV=1 +if [ -f /tmp/have_failed_tests -a -s /tmp/failed.txt ]; then echo "Debuginfo of failed tests:" cat /tmp/failed.txt echo "" cat /tmp/summary.txt | grep -v '^/' echo "" -else - RV=0 fi echo -e "\nFull logs for download:\n $1\n" @@ -70,4 +67,5 @@ for i in $(seq 1 $VMs); do test -s "$file" && showfile "$file" "$vm: failure logfile" done -exit $RV +test -f /tmp/have_failed_tests && exit 1 +exit 0