CI: tolerate missing artifacts

When a VM fails to launch or is unreachable the qemu-7-prepare.sh
script will fail to collect the artifacts due to the missing vm*
directories.  We want to collect as much diagnostic information as
possible, when missing create the directory to allow the subsequent
steps to proceed normally.  Additionally, we don't want to fail
if the /tmp/summary.txt file is missing.

Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #18438
This commit is contained in:
Brian Behlendorf
2026-04-17 17:21:13 -07:00
committed by Tony Hutter
parent 6cb1e850b2
commit f99954c01f
2 changed files with 10 additions and 5 deletions
+5 -2
View File
@@ -51,6 +51,11 @@ cd $RESPATH
# prepare result files for summary
for ((i=1; i<=VMs; i++)); do
# no results, VM either didn't start or was unreachable, create
# the missing directory which is expected by subsequent steps
test -d vm$i || mkdir -p vm$i
file="vm$i/build-stderr.txt"
test -s $file && mv -f $file build-stderr.txt
@@ -62,8 +67,6 @@ for ((i=1; i<=VMs; i++)); do
file="vm$i/tests-exitcode.txt"
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)
+5 -3
View File
@@ -37,9 +37,11 @@ function showfile_tail() {
echo "##[endgroup]"
}
# overview
cat /tmp/summary.txt
echo ""
# overview if available
if [ -f /tmp/summary.txt -a -s /tmp/summary.txt ]; then
cat /tmp/summary.txt
echo ""
fi
if [ -f /tmp/have_failed_tests -a -s /tmp/failed.txt ]; then
echo "Debuginfo of failed tests:"