@@ -70,11 +70,13 @@ String get_commit_pragma_tags(String pragma_suffix) {
7070 return pragma_tag
7171}
7272
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))
7678
77- return res ? ' ' + arg + ' = ' + res : ' '
79+ return res ? ' ' + launch_arg + ' = ' + res : ' '
7880}
7981
8082/* groovylint-disable-next-line MethodSize */
@@ -292,18 +294,20 @@ void call(Map config = [:]) {
292294
293295 // Assemble the ftest args from either the build parameters or commit pragmas
294296 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 )
297301 if (ftest_arg_provider) {
298302 // Use the specific provider defined by the stage
299303 result[' ftest_arg' ] + = ' --provider=' + ftest_arg_provider
300304 } else {
301305 // Only use a build parameter or commit pragma provider for non-provider-specific stages
302306 result[' ftest_arg' ] + = get_param_or_pragma(
303- ' TestProvider' , ' Test-provider' , ' --provider' , null )
307+ ' TestProvider' , ' Test-provider' , result[ ' pragma_suffix ' ], ' --provider' , null )
304308 }
305309 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 )
307311 if (result[' ftest_tag' ]) {
308312 result[' ftest_tag' ] = result[' ftest_tag' ]. trim()
309313 }
0 commit comments