From e9862b9fdab7d01edef18572f4fa469b2d30a7e4 Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Wed, 6 Sep 2017 16:35:25 -0300 Subject: [PATCH] validate:launcher: Allow disabling using the number of failed tests as exitcode This is usefull on CI servers where the test results will be inspected and the status of the build built from it. --- validate/launcher/main.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/validate/launcher/main.py b/validate/launcher/main.py index 6baadff..81004ba 100644 --- a/validate/launcher/main.py +++ b/validate/launcher/main.py @@ -494,6 +494,9 @@ Note that all testsuite should be inside python modules, so the directory should help="Number of tests to execute simultaneously" " (Defaults to number of cores of the processor)", type=int) + dir_group.add_argument("--ignore-numfailures", dest="ignore_numfailures", + help="Ignore the number of failed test in exit code", + default=False, action='store_true') http_server_group = parser.add_argument_group( "Handle the HTTP server to be created") @@ -595,6 +598,8 @@ Note that all testsuite should be inside python modules, so the directory should pass finally: res = tests_launcher.final_report() + if options.ignore_numfailures: + res = 0 tests_launcher.clean_tests() httpsrv.stop() vfb_server.stop() -- 2.7.4