Skip to content

Commit b580e7b

Browse files
author
Vasileios Karakasis
committed
Introduce properly the RFM_TRAP_JOB_ERRORS env. variable
1 parent 4b3b44b commit b580e7b

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

docs/config_reference.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1321,6 +1321,8 @@ General Configuration
13211321

13221322
Trap command errors in the generated job scripts and let them exit immediately.
13231323

1324+
.. versionadded:: 3.2
1325+
13241326

13251327
.. js:attribute:: .general[].keep_stage_files
13261328

docs/manpage.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1113,7 +1113,7 @@ Here is an alphabetical list of the environment variables recognized by ReFrame:
11131113

11141114
.. envvar:: RFM_TRAP_JOB_ERRORS
11151115

1116-
Ignore job exit code
1116+
Trap job errors in submitted scripts and fail tests automatically.
11171117

11181118
.. table::
11191119
:align: left
@@ -1122,6 +1122,8 @@ Here is an alphabetical list of the environment variables recognized by ReFrame:
11221122
Associated configuration parameter :js:attr:`trap_job_errors` general configuration parameter
11231123
================================== ==================
11241124

1125+
.. versionadded:: 3.9.0
1126+
11251127

11261128
.. envvar:: RFM_UNLOAD_MODULES
11271129

reframe/frontend/cli.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -530,6 +530,13 @@ def main():
530530
configvar='logging/handlers_perflog/syslog_address',
531531
help='Syslog server address'
532532
)
533+
argparser.add_argument(
534+
dest='trap_job_errors',
535+
envvar='RFM_TRAP_JOB_ERRORS',
536+
configvar='general/trap_job_errors',
537+
action='store_true',
538+
help='Trap job errors in job scripts and fail tests automatically'
539+
)
533540
argparser.add_argument(
534541
dest='use_login_shell',
535542
envvar='RFM_USE_LOGIN_SHELL',

0 commit comments

Comments
 (0)