From ec6639407b9eabf986ba81cfa6f2910feddf32dc Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Thu, 3 Dec 2020 16:35:38 -0800 Subject: 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. --- scripts/runtest.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'scripts') 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 "$@" } -- cgit v1.2.3