summaryrefslogtreecommitdiff
path: root/check.py
diff options
context:
space:
mode:
Diffstat (limited to 'check.py')
-rwxr-xr-xcheck.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/check.py b/check.py
index c3233b8f7..9ec638f10 100755
--- a/check.py
+++ b/check.py
@@ -343,11 +343,14 @@ def run_lit():
def run_gtest():
def run():
gtest = os.path.join(shared.options.binaryen_bin, 'binaryen-unittests')
- result = subprocess.run(gtest)
- if result.returncode != 0:
- shared.num_failures += 1
- if shared.options.abort_on_first_failure and shared.num_failures:
- raise Exception("gtest test failed")
+ if not os.path.isfile(gtest):
+ shared.warn('gtest binary not found - skipping tests')
+ else:
+ result = subprocess.run(gtest)
+ if result.returncode != 0:
+ shared.num_failures += 1
+ if shared.options.abort_on_first_failure and shared.num_failures:
+ raise Exception("gtest test failed")
shared.with_pass_debug(run)