aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
diff options
context:
space:
mode:
authorHemmo Nieminen <hemmo.nieminen@iki.fi>2022-02-01 00:00:00 +0200
committerEli Schwartz <eschwartz93@gmail.com>2022-06-09 18:58:33 -0400
commit9f26eae541ddf3f3162009339e0c007d0008b45f (patch)
tree8dc7b42ae44bad481a35dafc0e96e7a5c26d7a26 /mesonbuild
parent64d204710f67b167c34ff6a36bc169ab23ade8df (diff)
downloadmeson-9f26eae541ddf3f3162009339e0c007d0008b45f.zip
meson-9f26eae541ddf3f3162009339e0c007d0008b45f.tar.gz
meson-9f26eae541ddf3f3162009339e0c007d0008b45f.tar.bz2
mtest: make ConsoleLogger's detail property a function
As fetching the returned data is non-trivial (we e.g. iterate over all subtest results) it is best not to hide that fact from the caller of the property / function.
Diffstat (limited to 'mesonbuild')
-rw-r--r--mesonbuild/mtest.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/mesonbuild/mtest.py b/mesonbuild/mtest.py
index 0beaf42..17fd108 100644
--- a/mesonbuild/mtest.py
+++ b/mesonbuild/mtest.py
@@ -550,9 +550,9 @@ class ConsoleLogger(TestLogger):
timeout=self.progress_test.timeout,
durlen=harness.duration_max_len)
right += 's'
- detail = self.progress_test.detail
- if detail:
- right += ' ' + detail
+ details = self.progress_test.get_details()
+ if details:
+ right += ' ' + details
line = harness.format(self.progress_test, colorize=True,
max_left_width=self.max_left_width,
@@ -900,8 +900,7 @@ class TestRun:
def direct_stdout(self) -> bool:
return self.verbose and not self.is_parallel and not self.needs_parsing
- @property
- def detail(self) -> str:
+ def get_details(self) -> str:
if self.res is TestResult.PENDING:
return ''
if self.returncode:
@@ -1641,9 +1640,9 @@ class TestHarness:
res=result.res.get_text(colorize),
dur=result.duration,
durlen=self.duration_max_len + 3)
- detail = result.detail
- if detail:
- right += ' ' + detail
+ details = result.get_details()
+ if details:
+ right += ' ' + details
return prefix + left + middle + right
def summary(self) -> str: