From 94d3d5aec66d79b4739eb5c3a6c53989e39e90d8 Mon Sep 17 00:00:00 2001 From: Celtic Minstrel Date: Wed, 30 Mar 2016 16:10:17 -0400 Subject: [PATCH] Don't attempt every WML test if binary missing --- run_wml_tests | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/run_wml_tests b/run_wml_tests index e24247528ba..8b6094c04eb 100755 --- a/run_wml_tests +++ b/run_wml_tests @@ -274,6 +274,19 @@ shift $(($OPTIND - 1)) extra_opts+="$*" +# Make sure the binary exists +if [ "$DebugMode" -eq 1 ]; then + if [ "! ( -f $BinPath/wesnoth-debug -a -x $BinPath/wesnoth-debug )" ]; then + echo "Wesnoth binary not found at $BinPath/wesnoth-debug" + exit 1 + fi +else + if [ "! ( -f $BinPath/wesnoth -a -x $BinPath/wesnoth )" ]; then + echo "Wesnoth binary not found at $BinPath/wesnoth" + exit 1 + fi +fi + if [ "$Verbose" -ge 2 ]; then if [ "${#extra_opts}" -ge 0 ]; then echo "Found additional arguments to wesnoth: " "$extra_opts"