Skip to content

Commit

Permalink
Fix: cat /tmp/failed.txt: No such file or directory
Browse files Browse the repository at this point in the history
Signed-off-by: Tino Reichardt <[email protected]>
  • Loading branch information
mcmilk committed Sep 18, 2024
1 parent 90af1e8 commit 86d47eb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/scripts/qemu-7-prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scripts/qemu-8-summary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ EOF
cat /tmp/summary.txt
echo ""

if [ -e /tmp/have_failed_tests ]; then
if [ -f /tmp/have_failed_tests && -f /tmp/failed.txt ]; then
RV=1
echo "Debuginfo of failed tests:"
cat /tmp/failed.txt
Expand Down

0 comments on commit 86d47eb

Please sign in to comment.