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/running.rst
+37-1Lines changed: 37 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -365,10 +365,29 @@ For example the following will select all the checks that can run with both ``Pr
365
365
366
366
If you are going to run a set of tests selected by programming environment, they will run only for the selected programming environment(s).
367
367
368
+
The ``-p`` option accepts also the Python `regular expression syntax <https://docs.python.org/3.6/library/re.html#regular-expression-syntax>`__.
369
+
In fact, the argument to ``-p`` option is treated as a regular expression always. This means that the ``-p PrgEnv-gnu`` will match also tests that support a ``PrgEnv-gnuXX`` environment.
370
+
If you would like to stricly select tests that support ``PrgEnv-gnu`` only and not ``PrgEnv-gnuXX``, you should write ``-p PrgEnv-gnu$``.
371
+
As described above multiple ``-p`` options are AND-ed.
372
+
Combining that with regular expressions can be quite powerful.
373
+
For example, the following will select all tests that support programming environment ``foo`` and either ``PrgEnv-gnu`` or ``PrgEnv-pgi``:
374
+
375
+
.. code-block:: bash
376
+
377
+
./bin/reframe -p foo -p 'PrgEnv-(gnu|pgi)' -l
378
+
379
+
380
+
.. note::
381
+
.. versionadded:: 2.17
382
+
383
+
The ``-p`` option recognizes regular expressions as arguments.
384
+
385
+
368
386
Selecting tests by tags
369
387
^^^^^^^^^^^^^^^^^^^^^^^
370
388
371
-
As we have seen in the `"ReFrame tutorial" <tutorial.html>`__, every regression test may be associated with a set of tags. Using the ``-t`` or ``--tag`` option you can select the regression tests associated with a specific tag.
389
+
As we have seen in the `"ReFrame tutorial" <tutorial.html>`__, every regression test may be associated with a set of tags.
390
+
Using the ``-t`` or ``--tag`` option you can select the regression tests associated with a specific tag.
372
391
For example the following will list all the tests that have a ``maintenance`` tag and can run on the current system:
373
392
374
393
.. code-block:: bash
@@ -378,6 +397,11 @@ For example the following will list all the tests that have a ``maintenance`` ta
378
397
Similarly to the ``-p`` option, you can chain multiple ``-t`` options together, in which case a regression test will be selected if it is associated with all the tags specified in the command line.
379
398
The list of tags associated with a check can be viewed in the listing output when specifying the ``-l`` option.
380
399
400
+
.. note::
401
+
.. versionadded:: 2.17
402
+
403
+
The ``-t`` option recognizes regular expressions as arguments.
404
+
381
405
Selecting tests by name
382
406
^^^^^^^^^^^^^^^^^^^^^^^
383
407
@@ -439,6 +463,18 @@ Similarly, you can exclude this test by passing the ``-x Example7Test`` option:
439
463
Found 12 check(s).
440
464
441
465
466
+
Both ``-n`` and ``-x`` options can be chained, in which case either the tests that have any of the specified names are selected or excluded from running.
467
+
They may also accept regular expressions as arguments.
468
+
469
+
.. note::
470
+
.. versionadded:: 2.17
471
+
472
+
The ``-n`` and ``-x`` options recognize regular expressions as arguments.
473
+
Chaining these options, e.g., ``-n A -n B``, is equivalent to a regular expression that applies OR to the individual arguments, i.e., equivalent to ``-n 'A|B'``.
0 commit comments