From 2c2f5936ebbd4d708a6290999f92d89ee8cc21be Mon Sep 17 00:00:00 2001 From: underscorediscovery Date: Sat, 6 Jun 2020 10:38:43 -0700 Subject: [PATCH] tests; warn against missing wren_test binary correctly --- util/test.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/util/test.py b/util/test.py index 0892d7f1..a6349bab 100755 --- a/util/test.py +++ b/util/test.py @@ -10,7 +10,7 @@ import re from subprocess import Popen, PIPE import sys from threading import Timer - +import platform # Runs the tests. parser = ArgumentParser() @@ -25,7 +25,11 @@ is_debug = args.suffix.startswith('_d') WREN_DIR = dirname(dirname(realpath(__file__))) WREN_APP = join(WREN_DIR, 'bin', 'wren_test' + args.suffix) -if not isfile(WREN_APP): +WREN_APP_WITH_EXT = WREN_APP +if platform.system() == "Windows": + WREN_APP_WITH_EXT += ".exe" + +if not isfile(WREN_APP_WITH_EXT): print("The binary file 'wren_test' was not found, expected it to be at " + WREN_APP) print("In order to run the tests, you need to build Wren first!") sys.exit(1)