@@ -70,11 +70,13 @@ String get_commit_pragma_tags(String pragma_suffix) {
70
70
return pragma_tag
71
71
}
72
72
73
- String get_param_or_pragma (param , pragma , arg , predefined ) {
74
- String res = params. $param ?: cachedCommitPragma(
75
- pragma + result[' pragma_suffix' ], cachedCommitPragma(pragma, predefined))
73
+ String get_param_or_pragma (param , pragma , pragma_suffix , launch_arg , predefined ) {
74
+ // Get the launch.py argument value from either the build parameter, stage-specific commit
75
+ // pragma, general commit pragma, or predefined value
76
+ String res = params. $param ?: cachedCommitPragma(
77
+ pragma + pragma_suffix, cachedCommitPragma(pragma, predefined))
76
78
77
- return res ? ' ' + arg + ' = ' + res : ' '
79
+ return res ? ' ' + launch_arg + ' = ' + res : ' '
78
80
}
79
81
80
82
/* groovylint-disable-next-line MethodSize */
@@ -292,18 +294,20 @@ void call(Map config = [:]) {
292
294
293
295
// Assemble the ftest args from either the build parameters or commit pragmas
294
296
result[' ftest_arg' ] = ' '
295
- result[' ftest_arg' ] + = get_param_or_pragma(' TestNvme' , ' Test-nvme' , ' --nvme' , ftest_arg_nvme)
296
- result[' ftest_arg' ] + = get_param_or_pragma(' TestRepeat' , ' Test-repeat' , ' --repeat' , null )
297
+ result[' ftest_arg' ] + = get_param_or_pragma(
298
+ ' TestNvme' , ' Test-nvme' , result[' pragma_suffix' ],' --nvme' , ftest_arg_nvme)
299
+ result[' ftest_arg' ] + = get_param_or_pragma(
300
+ ' TestRepeat' , ' Test-repeat' , result[' pragma_suffix' ], ' --repeat' , null )
297
301
if (ftest_arg_provider) {
298
302
// Use the specific provider defined by the stage
299
303
result[' ftest_arg' ] + = ' --provider=' + ftest_arg_provider
300
304
} else {
301
305
// Only use a build parameter or commit pragma provider for non-provider-specific stages
302
306
result[' ftest_arg' ] + = get_param_or_pragma(
303
- ' TestProvider' , ' Test-provider' , ' --provider' , null )
307
+ ' TestProvider' , ' Test-provider' , result[ ' pragma_suffix ' ], ' --provider' , null )
304
308
}
305
309
result[' ftest_arg' ] + = get_param_or_pragma(
306
- ' TestStorageTier' , ' Test-storage-tier' , ' --storage_tier' , null )
310
+ ' TestStorageTier' , ' Test-storage-tier' , result[ ' pragma_suffix ' ], ' --storage_tier' , null )
307
311
if (result[' ftest_tag' ]) {
308
312
result[' ftest_tag' ] = result[' ftest_tag' ]. trim()
309
313
}
0 commit comments