aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2020-12-03 16:35:38 -0800
committerRob Landley <rob@landley.net>2020-12-05 04:15:58 -0600
commitec6639407b9eabf986ba81cfa6f2910feddf32dc (patch)
tree6102cf94abfaf957b4342d55df149b5fdb05bab2
parent5657214ac24a62e96b366097ffbfba39ebcd3380 (diff)
downloadtoybox-ec6639407b9eabf986ba81cfa6f2910feddf32dc.tar.gz
scripts/runtest.sh: fix `toyonly` for sed.
sed lies to fool autoconf, but also confuses the toybox test suite. Without this patch we're skipping all "toyonly" tests on both GNU and toybox sed.
-rw-r--r--scripts/runtest.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/runtest.sh b/scripts/runtest.sh
index ddbf0549..33d479ab 100644
--- a/scripts/runtest.sh
+++ b/scripts/runtest.sh
@@ -81,7 +81,10 @@ skipnot()
toyonly()
{
IS_TOYBOX="$("$C" --version 2>/dev/null)"
- [ "${IS_TOYBOX/toybox/}" == "$IS_TOYBOX" ] && SKIPNEXT=1
+ # Ideally we'd just check for "toybox", but toybox sed lies to make autoconf
+ # happy, so we have at least two things to check for.
+ IS_TOYBOX_RE='(toybox|This is not GNU).*'
+ [[ "$IS_TOYBOX" =~ $IS_TOYBOX_RE ]] || SKIPNEXT=1
"$@"
}