2828import reframe .utility .jsonext as jsonext
2929import reframe .utility .osext as osext
3030import reframe .utility .typecheck as typ
31+ from reframe .core .warnings import suppress_deprecations
3132from 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 :
@@ -1040,6 +1046,8 @@ def restrict_logging():
10401046 if options .describe_stored_sessions :
10411047 # Restore logging level
10421048 printer .setLevel (logging .INFO )
1049+ printer .set_handler_level (logging .WARNING ,
1050+ lambda htype : htype != 'stream' )
10431051 with exit_gracefully_on_error ('failed to retrieve session data' ,
10441052 printer ):
10451053 printer .info (jsonext .dumps (reporting .session_info (
@@ -1050,6 +1058,8 @@ def restrict_logging():
10501058 if options .describe_stored_testcases :
10511059 # Restore logging level
10521060 printer .setLevel (logging .INFO )
1061+ printer .set_handler_level (logging .WARNING ,
1062+ lambda htype : htype != 'stream' )
10531063 namepatt = '|' .join (n .replace ('%' , ' %' ) for n in options .names )
10541064 with exit_gracefully_on_error ('failed to retrieve test case data' ,
10551065 printer ):
0 commit comments