]> git.ipfire.org Git - thirdparty/nettle.git/commitdiff
(test_program): If EMULATOR is set in the environment, and the
authorNiels Möller <nisse@lysator.liu.se>
Thu, 24 Nov 2011 10:52:03 +0000 (11:52 +0100)
committerNiels Möller <nisse@lysator.liu.se>
Thu, 24 Nov 2011 10:52:03 +0000 (11:52 +0100)
testprogram is not a script, use EMULATOR to run it. Typical use is
EMULATUR=wine.

Rev: misc/run-tests:1.6

run-tests

index f240599ff5d9eb24ffbb43f215841d80dce2e9d8..560cc4e0fcaac20af4e81936c0848a167dcf152b 100755 (executable)
--- a/run-tests
+++ b/run-tests
@@ -41,7 +41,11 @@ env_program () {
 test_program () {
   testname=`basename "$1" .exe`
   testname=`basename "$testname" -test`
-  "$1" $testflags
+  if [ -z "$EMULATOR" ] || head -1 "$1" | grep '^#!' > /dev/null; then
+    "$1" $testflags
+  else
+    "$EMULATOR" "$1" $testflags
+  fi
   case "$?" in
       0)
        echo PASS: $testname