|
11 | 11 | import reframe.core.runtime as runtime |
12 | 12 |
|
13 | 13 |
|
14 | | -def _emit_gitlab_pipeline(testcases): |
| 14 | +def _emit_gitlab_pipeline(testcases, child_pipeline_opts): |
15 | 15 | config = runtime.runtime().site_config |
16 | 16 |
|
17 | 17 | # Collect the necessary ReFrame invariants |
@@ -44,7 +44,8 @@ def rfm_command(testcase): |
44 | 44 | f'--restore-session={restore_files}' if restore_files else '', |
45 | 45 | f'--report-junit={testcase.check.unique_name}-report.xml', |
46 | 46 | f'{"".join("-" + verbosity)}' if verbosity else '', |
47 | | - '-n', f"'^{testcase.check.unique_name}$'", '-r' |
| 47 | + '-n', f"'^{testcase.check.unique_name}$'", '-r', |
| 48 | + *child_pipeline_opts |
48 | 49 | ]) |
49 | 50 |
|
50 | 51 | max_level = 0 # We need the maximum level to generate the stages section |
@@ -77,9 +78,10 @@ def rfm_command(testcase): |
77 | 78 | return json |
78 | 79 |
|
79 | 80 |
|
80 | | -def emit_pipeline(fp, testcases, backend='gitlab'): |
| 81 | +def emit_pipeline(fp, testcases, child_pipeline_opts=None, backend='gitlab'): |
81 | 82 | if backend != 'gitlab': |
82 | 83 | raise errors.ReframeError(f'unknown CI backend {backend!r}') |
83 | 84 |
|
84 | | - yaml.dump(_emit_gitlab_pipeline(testcases), stream=fp, |
| 85 | + child_pipeline_opts = child_pipeline_opts or [] |
| 86 | + yaml.dump(_emit_gitlab_pipeline(testcases, child_pipeline_opts), stream=fp, |
85 | 87 | indent=2, sort_keys=False, width=sys.maxsize) |
0 commit comments