aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2019-04-04 17:07:33 -0500
committerRob Landley <rob@landley.net>2019-04-04 17:07:33 -0500
commit35bf59326d7d432ce05320acf510ca0d6aefab6f (patch)
tree38b072b0dd6b7b58c6503d1bc9ed18c6f6eb7e10
parent0407a47561a571519d83287c4f5b19d98ea2d5cc (diff)
downloadtoybox-35bf59326d7d432ce05320acf510ca0d6aefab6f.tar.gz
Add "toyonly" function to test suite.
-rw-r--r--scripts/runtest.sh14
1 files changed, 11 insertions, 3 deletions
diff --git a/scripts/runtest.sh b/scripts/runtest.sh
index ab10bf44..8b992584 100644
--- a/scripts/runtest.sh
+++ b/scripts/runtest.sh
@@ -74,7 +74,15 @@ skipnot()
else
eval "$@"
fi
- [ $? -eq 0 ] || SKIPNOT=1
+ [ $? -eq 0 ] || SKIPNEXT=1
+}
+
+toyonly()
+{
+ IS_TOYBOX="$("$C" --version 2>/dev/null)"
+ [ "${IS_TOYBOX/toybox/}" == "$IS_TOYBOX" ] && SKIPNEXT=1
+
+ "$@"
}
wrong_args()
@@ -97,10 +105,10 @@ testing()
[ -n "$DEBUG" ] && set -x
- if [ -n "$SKIP" -o -n "$SKIP_HOST" -a -n "$TEST_HOST" -o -n "$SKIPNOT" ]
+ if [ -n "$SKIP" -o -n "$SKIP_HOST" -a -n "$TEST_HOST" -o -n "$SKIPNEXT" ]
then
[ ! -z "$VERBOSE" ] && echo "$SHOWSKIP: $NAME"
- unset SKIPNOT
+ unset SKIPNEXT
return 0
fi