summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSerge Hallyn <serge@hallyn.com>2023-02-27 15:05:47 -0600
committerSerge Hallyn <serge@hallyn.com>2023-02-27 21:38:45 -0600
commitadd4ab4bf0776426e0eea5dbe20e7e282816558b (patch)
tree2208ed76268a04d68ecf1bc30c6e808e4f555947
parent4da831c02fa85ee483539ac2ab2f8f9b9c268b68 (diff)
ignore first test in run_some
bc github... For some reason, the first test - ONLY on github - seems to not give the '$ ' prompt expected when you spawn 'su testsuite'. So just run the first test twice, and ignore the first failure.
-rwxr-xr-xtests/run_some9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/run_some b/tests/run_some
index c40e3b80..0e7729df 100755
--- a/tests/run_some
+++ b/tests/run_some
@@ -18,8 +18,15 @@ run_test()
{
[ -f RUN_TEST.STOP ] && exit 1
+ passed=0
if $1 > $1.log 2>&1
then
+ passed=1
+ fi
+
+ if [ -n "$2" ]; then # ignore failure
+ echo -n "."
+ elif [ $passed -eq 1 ]; then
succeeded=$((succeeded+1))
echo -n "+"
else
@@ -54,6 +61,8 @@ echo "-: test failed"
> testsuite.log
find "${build_path}" -name "*.gcda" -delete
+# ignore the result of the first test. ~magic~
+run_test ./su/01/su_user.test ignore_failure
run_test ./su/01/su_user.test
run_test ./su/01/su_root.test
find "${build_path}" -name "*.gcda" -exec chmod a+rw {} \;