From bec827febcd375cec8a687d3efe0a4c127e5c4dd Mon Sep 17 00:00:00 2001 From: Bryan Herman Date: Sat, 21 Feb 2015 22:47:06 -0500 Subject: [PATCH] fixed failure return code from CTest script --- tests/run_tests.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/tests/run_tests.py b/tests/run_tests.py index 133f1a3e3..531225d9a 100755 --- a/tests/run_tests.py +++ b/tests/run_tests.py @@ -87,17 +87,23 @@ set(ENV{{COVERAGE}} ${{COVERAGE}}) {subproject} ctest_start("{dashboard}") -ctest_configure() +ctest_configure(RETURN_VALUE res) {update} -ctest_build() -ctest_test({tests} PARALLEL_LEVEL {n_procs}) +ctest_build(RETURN_VALUE res) +ctest_test({tests} PARALLEL_LEVEL {n_procs}, RETURN_VALUE res) if(MEM_CHECK) -ctest_memcheck({tests}) +ctest_memcheck({tests}, RETURN_VALUE res) endif(MEM_CHECK) if(COVERAGE) -ctest_coverage() +ctest_coverage(RETURN_VALUE res) endif(COVERAGE) -{submit}""" +{submit} + +if (res EQUAL 0) +else() +message(FATAL_ERROR "") +endif() +""" # Define test data structure tests = OrderedDict()