From a1b3722268dadb3b441135937398120bcab2fd74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20M=C3=B6ller?= <nisse@lysator.liu.se> Date: Thu, 24 Nov 2011 11:52:03 +0100 Subject: [PATCH] (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 --- run-tests | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 -- GitLab