From 6db460fb8177ace8a7b5456ac35d37899e1ad811 Mon Sep 17 00:00:00 2001 From: Vsevolod Livinskij Date: Wed, 3 Apr 2013 02:34:42 +0400 Subject: [PATCH 1/4] Issue #453: now run_tests.py checks ispc_exe availability otherwise prints an error message --- run_tests.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/run_tests.py b/run_tests.py index 6f9a682a..1c75b977 100755 --- a/run_tests.py +++ b/run_tests.py @@ -89,20 +89,28 @@ if options.compiler_exe == None: else: options.compiler_exe = "g++" -# checks the required compiler otherwise prints an error message +# checks the required compiler and ispc_exe otherwise prints an error message PATH_dir = string.split(os.getenv("PATH"), os.pathsep) compiler_exists = False +ispc_exists = False for counter in PATH_dir: if os.path.exists(counter + os.sep + options.compiler_exe): compiler_exists = True break + if os.path.exists(counter + os.sep + "ispc_exe"): + ispc_exists = True + break if not compiler_exists: sys.stderr.write("Fatal error: missing the required compiler: %s \n" % options.compiler_exe) sys.exit() +if not ispc_exists: + sys.stderr.write("Fatal error: missing the required ispc_exe \n") + sys.exit() + def fix_windows_paths(files): ret = [ ] for fn in files: From 4ab89de343814589d1765b6fb216a1b273db714f Mon Sep 17 00:00:00 2001 From: Vsevolod Livinskij Date: Wed, 3 Apr 2013 02:58:16 +0400 Subject: [PATCH 2/4] Issue #453: now run_tests.py checks ispc_exe availability otherwise prints an error message --- run_tests.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/run_tests.py b/run_tests.py index 1c75b977..2f243e3a 100755 --- a/run_tests.py +++ b/run_tests.py @@ -97,10 +97,8 @@ ispc_exists = False for counter in PATH_dir: if os.path.exists(counter + os.sep + options.compiler_exe): compiler_exists = True - break - if os.path.exists(counter + os.sep + "ispc_exe"): + if (os.path.exists(counter + os.sep + "ispc") or os.path.exists(counter + os.sep + "ispc.exe")): ispc_exists = True - break if not compiler_exists: sys.stderr.write("Fatal error: missing the required compiler: %s \n" % From 78e03c64024aba25ba40316fd9a2d0e92bc7f84a Mon Sep 17 00:00:00 2001 From: Vsevolod Livinskij Date: Wed, 3 Apr 2013 16:51:16 +0400 Subject: [PATCH 3/4] Issue #453: now run_tests.py checks ispc_exe availability otherwise prints an error message and exits --- run_tests.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/run_tests.py b/run_tests.py index 2f243e3a..5c82c8ca 100755 --- a/run_tests.py +++ b/run_tests.py @@ -60,6 +60,11 @@ if not is_windows: else: 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 print ispc_exe @@ -89,26 +94,20 @@ if options.compiler_exe == None: else: 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) compiler_exists = False -ispc_exists = False for counter in PATH_dir: if os.path.exists(counter + os.sep + options.compiler_exe): compiler_exists = True - if (os.path.exists(counter + os.sep + "ispc") or os.path.exists(counter + os.sep + "ispc.exe")): - ispc_exists = True + break if not compiler_exists: sys.stderr.write("Fatal error: missing the required compiler: %s \n" % options.compiler_exe) sys.exit() -if not ispc_exists: - sys.stderr.write("Fatal error: missing the required ispc_exe \n") - sys.exit() - def fix_windows_paths(files): ret = [ ] for fn in files: From 4ea08116b8f4346dd0e191c919187e1a5e2ee2f8 Mon Sep 17 00:00:00 2001 From: Vsevolod Livinskij Date: Wed, 3 Apr 2013 18:04:11 +0400 Subject: [PATCH 4/4] Issue #453: now run_tests.py checks ispc_exe availability --- run_tests.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/run_tests.py b/run_tests.py index 5c82c8ca..2a803b61 100755 --- a/run_tests.py +++ b/run_tests.py @@ -62,8 +62,8 @@ else: # 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() + sys.stderr.write("Fatal error: missing ispc compiler: %s\n" % ispc_exe) + sys.exit() ispc_exe += " " + options.ispc_flags