From: Niels Möller Date: Thu, 24 Nov 2011 10:52:03 +0000 (+0100) Subject: (test_program): If EMULATOR is set in the environment, and the X-Git-Tag: converted-master-branch-to-git~35 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a1b3722268dadb3b441135937398120bcab2fd74;p=thirdparty%2Fnettle.git (test_program): If EMULATOR is set in the environment, and the testprogram is not a script, use EMULATOR to run it. Typical use is EMULATUR=wine. Rev: misc/run-tests:1.6 --- diff --git a/run-tests b/run-tests index f240599f..560cc4e0 100755 --- 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