Script helper getBuildExecutable now works properly on Windows

This commit is contained in:
hbina4326 2019-02-02 06:20:56 -05:00 committed by Martin Hořeňovský
parent 7012a31a39
commit bf4771a7ed

View File

@ -6,9 +6,14 @@ import subprocess
catchPath = os.path.dirname(os.path.realpath( os.path.dirname(sys.argv[0]))) catchPath = os.path.dirname(os.path.realpath( os.path.dirname(sys.argv[0])))
def getBuildExecutable(): def getBuildExecutable():
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") dir = os.environ.get('CATCH_DEV_OUT_DIR', "cmake-build-debug/projects/SelfTest")
return dir return dir
def runAndCapture( args ): def runAndCapture( args ):
child = subprocess.Popen(" ".join( args ), shell=True, stdout=subprocess.PIPE) child = subprocess.Popen(" ".join( args ), shell=True, stdout=subprocess.PIPE)
lines = [] lines = []