File tree Expand file tree Collapse file tree 2 files changed +12
-12
lines changed Expand file tree Collapse file tree 2 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -148,6 +148,17 @@ def disable_hook(cls, hook_name):
148148 '''
149149 cls ._rfm_disabled_hooks .add (hook_name )
150150
151+ @classmethod
152+ def hooks (cls ):
153+ ret = {}
154+ for c in cls .mro ():
155+ if hasattr (c , '_rfm_pipeline_hooks' ):
156+ for kind , hook in c ._rfm_pipeline_hooks .items ():
157+ ret .setdefault (kind , [])
158+ ret [kind ] += hook
159+
160+ return ret
161+
151162 #: The name of the test.
152163 #:
153164 #: :type: string that can contain any character except ``/``
@@ -949,17 +960,6 @@ def stderr(self):
949960 '''
950961 return self ._job .stderr
951962
952- @property
953- def hooks (self ):
954- ret = {}
955- for c in inspect .getmro (type (self )):
956- if hasattr (c , '_rfm_pipeline_hooks' ):
957- for k , v in c ._rfm_pipeline_hooks .items ():
958- ret .setdefault (k , [])
959- ret [k ].extend (v )
960-
961- return ret
962-
963963 @property
964964 def build_job (self ):
965965 return self ._build_job
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ def fmt_deps():
7171 'Node allocation' : node_alloc_scheme ,
7272 'Pipeline hooks' : {
7373 k : fmt_list (fn .__name__ for fn in v )
74- for k , v in check .hooks .items ()
74+ for k , v in type ( check ) .hooks () .items ()
7575 },
7676 'Tags' : fmt_list (check .tags ),
7777 'Valid environments' : fmt_list (check .valid_prog_environs ),
You can’t perform that action at this time.
0 commit comments