OSDN Git Service

Elliott wants to run the toybox tests on android host and there's an sh but
authorRob Landley <rob@landley.net>
Wed, 26 Apr 2017 21:36:19 +0000 (16:36 -0500)
committerRob Landley <rob@landley.net>
Wed, 26 Apr 2017 21:36:19 +0000 (16:36 -0500)
it isn't toysh, so test for a bash alias.

tests/sh.test

index 2d6128c..1d228dc 100755 (executable)
@@ -4,6 +4,13 @@
 
 #testing "name" "command" "result" "infile" "stdin"
 
+if [ -z "$(which bash)" ]
+then
+  echo "$SHOWSKIP: no bash alias"
+  continue 2>/dev/null
+  exit
+fi
+
 shellit()
 {
   EVAL="bash -c" testing "$2" "$1 printf %s $2" "$3" "$4" "$5"