@@ -158,7 +158,9 @@ class RegressionTest(metaclass=RegressionTestMeta):
158158 typ .List [str ])
159159
160160 #: List of systems supported by this test.
161- #: The general syntax for systems is ``<sysname>[:<partname]``.
161+ #: The general syntax for systems is ``<sysname>[:<partname>]``.
162+ #: Both <sysname> and <partname> accept the value ``*`` to mean any value.
163+ #: ``*`` is an alias of ``*:*``
162164 #:
163165 #: :type: :class:`List[str]`
164166 #: :default: ``[]``
@@ -949,19 +951,16 @@ def info(self):
949951
950952 return ret
951953
952- def supports_system (self , partition_name ):
953- if '*' in self .valid_systems :
954- return True
955-
956- if self .current_system .name in self .valid_systems :
957- return True
954+ def supports_system (self , name ):
955+ if name .find (':' ) != - 1 :
956+ system , partition = name .split (':' )
957+ else :
958+ system , partition = self .current_system .name , name
958959
959- # Check if this is a relative name
960- if partition_name .find (':' ) == - 1 :
961- partition_name = '%s:%s' % (self .current_system .name ,
962- partition_name )
960+ valid_matches = ['*' , '*:*' , system , f'{ system } :*' ,
961+ f'*:{ partition } ' , f'{ system } :{ partition } ' ]
963962
964- return partition_name in self .valid_systems
963+ return any ( n in self .valid_systems for n in valid_matches )
965964
966965 def supports_environ (self , env_name ):
967966 if '*' in self .valid_prog_environs :
0 commit comments