You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/tutorial.rst
+14-2Lines changed: 14 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -341,8 +341,7 @@ We could do that simply by setting the :attr:`valid_prog_environs` as follows:
341
341
342
342
self.valid_prog_environs = ['+stream']
343
343
344
-
This tells ReFrame that this test is valid only for environments that define the ``stream`` feature; (the ``+`` prefix requests a feature, we will explain the syntax later in this section).
345
-
The syntax defined in :attr:`valid_prog_environs` allows for other requirements.
344
+
This tells ReFrame that this test is valid only for environments that define the ``stream`` feature (the ``+`` prefix requests a feature; we will explain the syntax later in this section).
346
345
If we try to run the test now, nothing will be run:
347
346
348
347
.. code-block:: bash
@@ -391,6 +390,19 @@ Let's look at some key elements of the configuration:
391
390
Their definitions are resolved in the :attr:`~config.environments` section.
392
391
* Every partition and environment can define a set of arbitrary features or key/value pairs in the :attr:`~config.environments.features` and :attr:`~config.environments.extras` options respectively.
393
392
ReFrame will try to match system partitions and environments to a test based on the test's specification in :attr:`valid_systems` and :attr:`valid_prog_environs`.
393
+
More specifically, a feature is requested with the ``+feat`` and excluded with ``-feat``, whereas an extra is requested with ``%key=val``.
394
+
Multiple features or extras can be ANDed if specified in the same :attr:`valid_systems` or :attr:`valid_prog_environs` elements or otherwise ORed if specified in different elements:
395
+
396
+
.. code-block:: python
397
+
398
+
# Valid only for system partitions that define `feat0` and `key0=val` but not `feat1`
399
+
valid_systems = [r'+feat0 -feat1 %key0=val']
400
+
401
+
# Valid only for environments with either feature `A` or `B`
402
+
valid_prog_environs = ['+A', '+B']
403
+
404
+
Finally, a system or system partition name can be specified in :attr:`valid_systems` and similarly an environment name in :attr:`valid_prog_environs`, in which case the test is bound to those specific system partitions and/or environments.
405
+
394
406
395
407
There are many options that we can be define for systems, partitions and environments.
396
408
We will cover several of them as we go through the tutorial, but for the complete reference you should refer to :doc:`config_reference`.
0 commit comments