[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH XTF 3/3] xtf-runner: regularise runner exit code
Report the first "ERROR" and "FAILURE" if found, otherwise report "SKIP" if found. Eventually if everything is ok the exit code will be 0. See runner code for numeric exit code space. Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx> --- xtf-runner | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/xtf-runner b/xtf-runner index 17ce933..ebe5c27 100755 --- a/xtf-runner +++ b/xtf-runner @@ -249,17 +249,23 @@ def run_tests(args): if not len(tests): raise RunnerError("No tests to run") - rc = 0 + rc = exit_code('SUCCESS') results = [] for test in tests: res = run_test(test) - if res != "SUCCESS": - rc = 1 + if res in ("ERROR", "FAILURE") and rc == exit_code('SUCCESS'): + rc = exit_code(res) results.append(res) + if rc == exit_code('SUCCESS'): + for res in results: + if res == 'SKIP': + rc = exit_code('SKIP') + break + print "\nCombined test results:" for test, res in zip(tests, results): -- 2.1.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |