From fbb2fcada7de66c960d0178ab6cd6209ef5ca88d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Marczewski?= Date: Fri, 16 Oct 2020 19:52:31 +0200 Subject: [PATCH] [LibOS] test/ltp: Make sure we add all results to XML An early return caused the runner to skip writing the test cases that passed, but had no 'must-pass' list specified. This seems unintentional and caused the runner to lose information about results. --- LibOS/shim/test/ltp/runltp_xml.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/LibOS/shim/test/ltp/runltp_xml.py b/LibOS/shim/test/ltp/runltp_xml.py index e7174a19..599027dc 100755 --- a/LibOS/shim/test/ltp/runltp_xml.py +++ b/LibOS/shim/test/ltp/runltp_xml.py @@ -313,12 +313,10 @@ class TestRunner: returncode = await self._run_cmd() must_pass = self.cfgsection.getintset('must-pass') - if must_pass is None: - if returncode != 0: - raise Fail('returncode={}'.format(returncode)) - return - - self._parse_test_output(must_pass) + if must_pass is not None: + self._parse_test_output(must_pass) + elif returncode != 0: + raise Fail('returncode={}'.format(returncode)) except AbnormalTestResult as result: result.apply_to(self)