Skip to content

Commit 37545d2

Browse files
author
Vasileios Karakasis
authored
Merge pull request #2166 from jjotero/feat/fixtures
[feat] Support for test fixtures
2 parents d6c9a31 + f8c58ec commit 37545d2

24 files changed

+2809
-185
lines changed

docs/config_reference.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1257,6 +1257,21 @@ General Configuration
12571257
The command-line option sets the configuration option to ``false``.
12581258

12591259

1260+
.. js:attribute:: .general[].compact_test_names
1261+
1262+
:required: No
1263+
:default: ``false``
1264+
1265+
Use a compact test naming scheme.
1266+
When set to ``true``, the test parameter values will not be encoded into the test name.
1267+
Instead, the several test variants are differentiated by including the unique variant number into the test name.
1268+
1269+
.. warning::
1270+
The default value will be changed to ``true`` in version 4.0.0.
1271+
1272+
.. versionadded:: 3.9.0
1273+
1274+
12601275
.. js:attribute:: .general[].git_timeout
12611276

12621277
:required: No

docs/manpage.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -747,6 +747,21 @@ Here is an alphabetical list of the environment variables recognized by ReFrame:
747747
================================== ==================
748748

749749

750+
.. envvar:: RFM_COMPACT_TEST_NAMES
751+
752+
Enable the compact test naming scheme.
753+
754+
.. table::
755+
:align: left
756+
757+
================================== ==================
758+
Associated command line option N/A
759+
Associated configuration parameter :js:attr:`compact_test_names` general configuration parameter
760+
================================== ==================
761+
762+
.. versionadded:: 3.9.0
763+
764+
750765
.. envvar:: RFM_CONFIG_FILE
751766

752767
Set the configuration file for ReFrame.

docs/regression_test_api.rst

Lines changed: 393 additions & 60 deletions
Large diffs are not rendered by default.

reframe/core/decorators.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -111,12 +111,11 @@ def _register_parameterized_test(cls, args=None):
111111
'''
112112
def _instantiate(cls, args):
113113
if isinstance(args, collections.abc.Sequence):
114-
return cls(*args, _rfm_use_params=True)
114+
return cls(*args)
115115
elif isinstance(args, collections.abc.Mapping):
116-
args['_rfm_use_params'] = True
117116
return cls(**args)
118117
elif args is None:
119-
return cls(_rfm_use_params=True)
118+
return cls()
120119

121120
def _instantiate_all():
122121
ret = []
@@ -179,14 +178,14 @@ def simple_test(cls):
179178
'''Class decorator for registering tests with ReFrame.
180179
181180
The decorated class must derive from
182-
:class:`reframe.core.pipeline.RegressionTest`. This decorator is also
181+
:class:`reframe.core.pipeline.RegressionTest`. This decorator is also
183182
available directly under the :mod:`reframe` module.
184183
185184
.. versionadded:: 2.13
186185
'''
187186
if _validate_test(cls):
188-
for _ in cls.param_space:
189-
_register_test(cls, _rfm_use_params=True)
187+
for n in range(cls.num_variants):
188+
_register_test(cls, variant_num=n)
190189

191190
return cls
192191

0 commit comments

Comments
 (0)