aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZsolt Borbély <zsborbely.u-szeged@partner.samsung.com>2016-08-05 12:53:41 +0200
committerZsolt Borbély <zsborbely.u-szeged@partner.samsung.com>2016-08-08 12:56:48 +0200
commit2836f49eec34b49f16eef936b906f8a68377e9af (patch)
treed087cf57c330c60caee140622af27512b218bdd3
parent2eb2b22c49e6000dcf71865f21ae07e428efe5dc (diff)
Fix run-tests.py: don't override the return value of a testrun
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
-rwxr-xr-xtools/run-tests.py56
1 files changed, 28 insertions, 28 deletions
diff --git a/tools/run-tests.py b/tools/run-tests.py
index 3749a192..39613dcd 100755
--- a/tools/run-tests.py
+++ b/tools/run-tests.py
@@ -112,51 +112,51 @@ def create_binary(buildoptions):
return 0
def run_jerry_tests():
+ ret_build = ret_test = 0
for job in jerry_tests_options:
- ret = create_binary(job.build_args)
+ ret_build = create_binary(job.build_args)
+ if ret_build:
+ break
- if not ret:
- test_cmd = [TEST_RUNNER_SCRIPT, get_binary_path(job.out_dir), JERRY_TESTS_DIR]
- if job.test_args:
- test_cmd.extend(job.test_args)
+ test_cmd = [TEST_RUNNER_SCRIPT, get_binary_path(job.out_dir), JERRY_TESTS_DIR]
+ if job.test_args:
+ test_cmd.extend(job.test_args)
- ret = run_check(test_cmd)
- else:
- break
+ ret_test |= run_check(test_cmd)
- return ret
+ return ret_build | ret_test
def run_jerry_test_suite():
+ ret_build = ret_test = 0
for job in jerry_test_suite_options:
- ret = create_binary(job.build_args)
+ ret_build = create_binary(job.build_args)
+ if ret_build:
+ break
- if not ret:
- test_cmd = [TEST_RUNNER_SCRIPT, get_binary_path(job.out_dir)]
+ test_cmd = [TEST_RUNNER_SCRIPT, get_binary_path(job.out_dir)]
- if '--profile=minimal' in job.build_args:
- test_cmd.append(JERRY_TEST_SUITE_MINIMAL_LIST)
- else:
- test_cmd.append(JERRY_TEST_SUITE_DIR)
+ if '--profile=minimal' in job.build_args:
+ test_cmd.append(JERRY_TEST_SUITE_MINIMAL_LIST)
+ else:
+ test_cmd.append(JERRY_TEST_SUITE_DIR)
- if job.test_args:
- test_cmd.extend(job.test_args)
+ if job.test_args:
+ test_cmd.extend(job.test_args)
- ret = run_check(test_cmd)
- else:
- break
+ ret_test |= run_check(test_cmd)
- return ret
+ return ret_build | ret_test
def run_unittests():
+ ret_build = ret_test = 0
for job in jerry_unittests_options:
- ret = create_binary(job.build_args)
-
- if not ret:
- ret = run_check([UNITTEST_RUNNER_SCRIPT, get_bin_dir_path(job.out_dir)])
- else:
+ ret_build = create_binary(job.build_args)
+ if ret_build:
break
- return ret
+ ret_test |= run_check([UNITTEST_RUNNER_SCRIPT, get_bin_dir_path(job.out_dir)])
+
+ return ret_build | ret_test
def run_buildoption_test():
for job in jerry_buildoptions: