Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion reframe/core/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,13 @@
# Dependency kinds

#: Constant to be passed as the ``how`` argument of the
#: :func:`RegressionTest.depends_on` method. It denotes that test case
#: :func:`~RegressionTest.depends_on` method. It denotes that test case
#: dependencies will be explicitly specified by the user.
#:
#: This constant is directly available under the :mod:`reframe` module.
#:
#: .. deprecated:: 3.3
#: Please use a callable as the ``how`` argument.
DEPEND_EXACT = 1

#: Constant to be passed as the ``how`` argument of the
Expand All @@ -58,13 +61,19 @@
#: target test that use the same programming environment.
#:
#: This constant is directly available under the :mod:`reframe` module.
#:
#: .. deprecated:: 3.3
#: Please use a callable as the ``how`` argument.
DEPEND_BY_ENV = 2

#: Constant to be passed as the ``how`` argument of the
#: :func:`RegressionTest.depends_on` method. It denotes that each test case of
#: this test depends on all the test cases of the target test.
#:
#: This constant is directly available under the :mod:`reframe` module.
#:
#: .. deprecated:: 3.3
#: Please use a callable as the ``how`` argument.
DEPEND_FULLY = 3


Expand Down
22 changes: 13 additions & 9 deletions reframe/utility/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -565,10 +565,12 @@ def find_modules(substr, environ_mapping=None):

.. code:: python

@rfm.parameterized_test(*find_modules('netcdf'))
@rfm.simple_test
class MyTest(rfm.RegressionTest):
def __init__(self, s, e, m):
self.descr = f'{s}, {e}, {m}'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if you remove the description by mistake here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did it no purpose. It's not needed for what we need to show.

module_info = parameter(find_modules('netcdf'))

def __init__(self):
s, e, m = self.module_info
self.valid_systems = [s]
self.valid_prog_environs = [e]
self.modules = [m]
Expand All @@ -583,15 +585,17 @@ def __init__(self, s, e, m):
.. code:: python

my_find_modules = functools.partial(find_modules, environ_mapping={
r'.*CrayGNU.*': {'PrgEnv-gnu'},
r'.*CrayIntel.*': {'PrgEnv-intel'},
r'.*CrayCCE.*': {'PrgEnv-cray'}
r'.*CrayGNU.*': 'PrgEnv-gnu',
r'.*CrayIntel.*': 'PrgEnv-intel',
r'.*CrayCCE.*': 'PrgEnv-cray'
})

@rfm.parameterized_test(*my_find_modules('GROMACS'))
@rfm.simple_test
class MyTest(rfm.RegressionTest):
def __init__(self, s, e, m):
self.descr = f'{s}, {e}, {m}'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

module_info = parameter(my_find_modules('GROMACS'))

def __init__(self):
s, e, m = self.module_info
self.valid_systems = [s]
self.valid_prog_environs = [e]
self.modules = [m]
Expand Down