Issue #453: now run_tests.py checks ispc_exe availability otherwise prints an error message and exits
This commit is contained in:
15
run_tests.py
15
run_tests.py
@@ -60,6 +60,11 @@ if not is_windows:
|
|||||||
else:
|
else:
|
||||||
ispc_exe = "../Release/ispc.exe"
|
ispc_exe = "../Release/ispc.exe"
|
||||||
|
|
||||||
|
# checks the required ispc compiler otherwise prints an error message
|
||||||
|
if not os.path.exists(ispc_exe):
|
||||||
|
sys.stderr.write("Fatal error: missing the required ispc compiler \n")
|
||||||
|
sys.exit()
|
||||||
|
|
||||||
ispc_exe += " " + options.ispc_flags
|
ispc_exe += " " + options.ispc_flags
|
||||||
|
|
||||||
print ispc_exe
|
print ispc_exe
|
||||||
@@ -89,26 +94,20 @@ if options.compiler_exe == None:
|
|||||||
else:
|
else:
|
||||||
options.compiler_exe = "g++"
|
options.compiler_exe = "g++"
|
||||||
|
|
||||||
# checks the required compiler and ispc_exe otherwise prints an error message
|
# checks the required compiler otherwise prints an error message
|
||||||
PATH_dir = string.split(os.getenv("PATH"), os.pathsep)
|
PATH_dir = string.split(os.getenv("PATH"), os.pathsep)
|
||||||
compiler_exists = False
|
compiler_exists = False
|
||||||
ispc_exists = False
|
|
||||||
|
|
||||||
for counter in PATH_dir:
|
for counter in PATH_dir:
|
||||||
if os.path.exists(counter + os.sep + options.compiler_exe):
|
if os.path.exists(counter + os.sep + options.compiler_exe):
|
||||||
compiler_exists = True
|
compiler_exists = True
|
||||||
if (os.path.exists(counter + os.sep + "ispc") or os.path.exists(counter + os.sep + "ispc.exe")):
|
break
|
||||||
ispc_exists = True
|
|
||||||
|
|
||||||
if not compiler_exists:
|
if not compiler_exists:
|
||||||
sys.stderr.write("Fatal error: missing the required compiler: %s \n" %
|
sys.stderr.write("Fatal error: missing the required compiler: %s \n" %
|
||||||
options.compiler_exe)
|
options.compiler_exe)
|
||||||
sys.exit()
|
sys.exit()
|
||||||
|
|
||||||
if not ispc_exists:
|
|
||||||
sys.stderr.write("Fatal error: missing the required ispc_exe \n")
|
|
||||||
sys.exit()
|
|
||||||
|
|
||||||
def fix_windows_paths(files):
|
def fix_windows_paths(files):
|
||||||
ret = [ ]
|
ret = [ ]
|
||||||
for fn in files:
|
for fn in files:
|
||||||
|
|||||||
Reference in New Issue
Block a user