summaryrefslogtreecommitdiffstats
path: root/tests/shell/helpers/test-wrapper.sh
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2023-09-06 13:52:11 +0200
committerFlorian Westphal <fw@strlen.de>2023-09-07 19:35:20 +0200
commitdf43636341a5bff84e22663552e5ccd53e88a51c (patch)
tree771ab1a3c25aedbb0c06ed709c815358f29cc04a /tests/shell/helpers/test-wrapper.sh
parentae54726dbfe83f07ba5d6e72d2f101b6475fbd97 (diff)
tests/shell: interpret an exit code of 77 from scripts as "skipped"
Allow scripts to indicate that a test could not run by exiting 77. "77" is chosen as exit code from automake's testsuites ([1]). Compare to git-bisect which chooses 125 to indicate skipped. [1] https://www.gnu.org/software/automake/manual/html_node/Scripts_002dbased-Testsuites.html Signed-off-by: Thomas Haller <thaller@redhat.com> Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'tests/shell/helpers/test-wrapper.sh')
-rwxr-xr-xtests/shell/helpers/test-wrapper.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/shell/helpers/test-wrapper.sh b/tests/shell/helpers/test-wrapper.sh
index f811b44a..0cf37f40 100755
--- a/tests/shell/helpers/test-wrapper.sh
+++ b/tests/shell/helpers/test-wrapper.sh
@@ -14,6 +14,8 @@ rc_test=0
if [ "$rc_test" -eq 0 ] ; then
echo "$rc_test" > "$NFT_TEST_TESTTMPDIR/rc_test-ok"
+elif [ "$rc_test" -eq 77 ] ; then
+ echo "$rc_test" > "$NFT_TEST_TESTTMPDIR/rc_test-skipped"
else
echo "$rc_test" > "$NFT_TEST_TESTTMPDIR/rc_test-failed"
fi