Approval tests can use Catch path fixed in env. var, and convert nullptr and __null to 0 for comparison

This commit is contained in:
Phil Nash 2017-01-09 14:12:12 +00:00
parent 37e1e24309
commit 976a655496
5 changed files with 158 additions and 140 deletions

View file

@ -2,8 +2,13 @@ import os
import sys
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/SelfTest")
return dir
def runAndCapture( args ):
child = subprocess.Popen(" ".join( args ), shell=True, stdout=subprocess.PIPE)
lines = []
@ -18,4 +23,4 @@ def runAndCapture( args ):
line = ""
else:
line = line + out
return lines
return lines