[PATCH] Cygwin: CI: cygstress: add GHA annotation and change exit status
Christian Franke
Christian.Franke@t-online.de
Tue Jul 14 16:41:01 GMT 2026
This makes the failed tests visible in the summary of a GH workflow run.
--
Regards,
Christian
-------------- next part --------------
From e1a081be5e64bfc5e567165de0e1fc9cffacdd52 Mon Sep 17 00:00:00 2001
From: Christian Franke <christian.franke@t-online.de>
Date: Tue, 14 Jul 2026 18:32:56 +0200
Subject: [PATCH] Cygwin: CI: cygstress: add GHA annotation and change exit
status
Report list of failed tests as a GHA compatible annotation.
Use separate exit status 2 instead of 1 if any test failed.
Signed-off-by: Christian Franke <christian.franke@t-online.de>
---
winsup/testsuite/stress/cygstress | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/winsup/testsuite/stress/cygstress b/winsup/testsuite/stress/cygstress
index 80dfa795f..c7b4c5723 100755
--- a/winsup/testsuite/stress/cygstress
+++ b/winsup/testsuite/stress/cygstress
@@ -31,6 +31,11 @@ Usage: ${0##*/} [OPTION...] {CI|WORK|FAIL|test...}
WORK run all tests tagged WORKS
FAIL run all tests tagged FAILS
test... run individual test(s) (may require '-f')
+
+ Exit status:
+ 0: all tests succeeded
+ 1: other error
+ 2: some test(s) failed
EOF
exit 1
}
@@ -741,7 +746,15 @@ if [ $total_failed != 0 ]; then
echo -n ">>> FAILURE: $(ts): ${#tests_failed[*]} of $total_testcases test case(s) failed"
echo "; total: $total_failed of $total_tested test(s) failed"
- exit 1
+
+ # Report list of failed tests as a GHA compatible annotation
+ echo -n "::error:: stress-ng failures:"
+ for ((t = 0; t < ${#tests[*]}; t++)); do
+ test -z "${tests_failed[t]}" || echo -n " ${tests[t]}"
+ done
+ echo
+
+ exit 2
fi
echo -n ">>> SUCCESS: $(ts): all test(s) of $total_testcases test case(s) succeeded"
--
2.51.0
More information about the Cygwin-patches
mailing list