diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2020-11-19 12:01:09 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2020-12-27 13:55:33 +0100 |
commit | aa03c06ffb6ca4c932edf14a0731e28937c6c094 (patch) | |
tree | 01e64eaf172f9163bf03efdf60c7dee4970d8ddd /mesonbuild | |
parent | df0d5ce34eec1f9758b741261dd6bb30a7f9819a (diff) | |
download | meson-aa03c06ffb6ca4c932edf14a0731e28937c6c094.zip meson-aa03c06ffb6ca4c932edf14a0731e28937c6c094.tar.gz meson-aa03c06ffb6ca4c932edf14a0731e28937c6c094.tar.bz2 |
mtest: merge print_stats and process_test_result
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'mesonbuild')
-rw-r--r-- | mesonbuild/mtest.py | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/mesonbuild/mtest.py b/mesonbuild/mtest.py index 8cdcba9..4a45624 100644 --- a/mesonbuild/mtest.py +++ b/mesonbuild/mtest.py @@ -1058,6 +1058,11 @@ class TestHarness: else: sys.exit('Unknown test result encountered: {}'.format(result.res)) + if result.res.is_bad(): + self.collected_failures.append(result) + for l in self.loggers: + l.log(self, result) + def format(self, result: TestRun, colorize: bool) -> str: result_str = '{num:{numlen}}/{testcount} {name:{name_max_len}} {res} {dur:.2f}s'.format( numlen=len(str(self.test_count)), @@ -1071,12 +1076,6 @@ class TestHarness: result_str += ' ' + returncode_to_status(result.returncode) return result_str - def print_stats(self, result: TestRun) -> None: - if result.res.is_bad(): - self.collected_failures.append(result) - for l in self.loggers: - l.log(self, result) - def summary(self) -> str: return textwrap.dedent(''' @@ -1269,7 +1268,6 @@ class TestHarness: return res = await test.run() self.process_test_result(res) - self.print_stats(res) def test_done(f: asyncio.Future) -> None: if not f.cancelled(): |