From bf4771a7ed8782d0ca2d8380064c33c3e8bafc83 Mon Sep 17 00:00:00 2001 From: hbina4326 Date: Sat, 2 Feb 2019 06:20:56 -0500 Subject: [PATCH] Script helper getBuildExecutable now works properly on Windows --- scripts/scriptCommon.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/scriptCommon.py b/scripts/scriptCommon.py index 4b70f961..eadf9ff3 100644 --- a/scripts/scriptCommon.py +++ b/scripts/scriptCommon.py @@ -6,8 +6,13 @@ import subprocess catchPath = os.path.dirname(os.path.realpath( os.path.dirname(sys.argv[0]))) def getBuildExecutable(): - dir = os.environ.get('CATCH_DEV_OUT_DIR', "cmake-build-debug/projects/SelfTest") - return dir + if os.name == 'nt': + dir = os.environ.get('CATCH_DEV_OUT_DIR', "cmake-build-debug/projects/SelfTest.exe") + return dir + else: + dir = os.environ.get('CATCH_DEV_OUT_DIR', "cmake-build-debug/projects/SelfTest") + return dir + def runAndCapture( args ): child = subprocess.Popen(" ".join( args ), shell=True, stdout=subprocess.PIPE)