Skip to content

Commit 5f5a055

Browse files
committed
ZTS: Fix Test Summary page generation
Fix that error: "cat /tmp/failed.txt: No such file or directory" Signed-off-by: Tino Reichardt <milky-zfs@mcmilk.de>
1 parent 90af1e8 commit 5f5a055

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

.github/workflows/scripts/qemu-7-prepare.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,11 @@ for i in $(seq 1 $VMs); do
4646
test -s $file && mv -f $file uname.txt
4747

4848
file="vm$i/tests-exitcode.txt"
49-
test -s $file || echo 1 > $file
49+
if [ ! -s $file ]; then
50+
# XXX - add some tests for kernel panic's here
51+
# tail -n 80 vm$i/console.txt | grep XYZ
52+
echo 1 > $file
53+
fi
5054
rv=$(cat vm$i/tests-exitcode.txt)
5155
test $rv != 0 && touch /tmp/have_failed_tests
5256

@@ -89,7 +93,6 @@ fi
8993
cat summary.txt \
9094
| awk '/\(expected PASS\)/{ if ($1!="SKIP") print $2; next; } show' \
9195
| while read t; do
92-
echo "check: $t"
9396
cat summary-failure-logs.txt \
9497
| awk '$0~/Test[: ]/{ show=0; } $0~v{ show=1; } show' v="$t" \
9598
> /tmp/fail.txt

.github/workflows/scripts/qemu-8-summary.sh

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,12 @@ EOF
3535
cat /tmp/summary.txt
3636
echo ""
3737

38-
if [ -e /tmp/have_failed_tests ]; then
39-
RV=1
38+
if [ -f /tmp/have_failed_tests && -s /tmp/failed.txt ]; then
4039
echo "Debuginfo of failed tests:"
4140
cat /tmp/failed.txt
4241
echo ""
4342
cat /tmp/summary.txt | grep -v '^/'
4443
echo ""
45-
else
46-
RV=0
4744
fi
4845

4946
echo -e "\nFull logs for download:\n $1\n"
@@ -70,4 +67,5 @@ for i in $(seq 1 $VMs); do
7067
test -s "$file" && showfile "$file" "$vm: failure logfile"
7168
done
7269

73-
exit $RV
70+
test -f /tmp/have_failed_tests && exit 1
71+
exit 0

0 commit comments

Comments
 (0)