From 35bf59326d7d432ce05320acf510ca0d6aefab6f Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Thu, 4 Apr 2019 17:07:33 -0500 Subject: Add "toyonly" function to test suite. --- scripts/runtest.sh | 14 +++++++++++--- 1 file 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 -- cgit v1.2.3