Skip to content

Commit 50d601c

Browse files
authored
Merge pull request #3531 from vkarak/enhancement/describe-checks-more-attrs
[enhancement] Show more test attributes with `--describe`
2 parents 1ef9b5b + c42a804 commit 50d601c

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

reframe/frontend/cli.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
import reframe.utility.jsonext as jsonext
2929
import reframe.utility.osext as osext
3030
import reframe.utility.typecheck as typ
31+
from reframe.core.warnings import suppress_deprecations
3132
from reframe.frontend.testgenerators import (distribute_tests,
3233
getallnodes, repeat_tests,
3334
parameterize_tests)
@@ -149,13 +150,18 @@ def describe_checks(testcases, printer):
149150
#
150151
# 1. Add other fields that are relevant for users
151152
# 2. Remove all private fields
152-
rec['name'] = tc.check.name
153-
rec['unique_name'] = tc.check.unique_name
154-
rec['display_name'] = tc.check.display_name
153+
cls = type(tc.check)
154+
if hasattr(cls, 'loggable_attrs'):
155+
for name, alt_name in cls.loggable_attrs():
156+
key = alt_name if alt_name else name
157+
try:
158+
with suppress_deprecations():
159+
rec.setdefault(key, getattr(tc.check, name))
160+
except AttributeError:
161+
rec.setdefault(key, '<undefined>')
162+
155163
rec['pipeline_hooks'] = {}
156164
rec['perf_variables'] = list(rec['perf_variables'].keys())
157-
rec['prefix'] = tc.check.prefix
158-
rec['variant_num'] = tc.check.variant_num
159165
for stage, hooks in tc.check.pipeline_hooks().items():
160166
for hk in hooks:
161167
if hk.__name__ not in tc.check.disabled_hooks:

0 commit comments

Comments
 (0)