@@ -270,30 +270,37 @@ def _parse_test_item(self, test_item):
270
270
y = yaml .safe_load (stream )
271
271
except yaml .YAMLError as exc :
272
272
log .die (exc )
273
+ common = y .get ('common' )
273
274
tests = y .get ('tests' )
274
275
if not tests :
275
276
log .die (f"No tests found in { yf } " )
276
277
item = tests .get (test_item )
277
278
if not item :
278
279
log .die (f"Test item { test_item } not found in { yf } " )
279
280
280
- for data in [ 'extra_args' , 'extra_configs' ]:
281
- extra = item . get ( data )
282
- if not extra :
281
+ sysbuild = False
282
+ for section in [ common , item ]:
283
+ if not section :
283
284
continue
284
- if isinstance (extra , str ):
285
- arg_list = extra .split (" " )
286
- else :
287
- arg_list = extra
288
- if data == 'extra_configs' :
289
- args = ["-D{}" .format (arg .replace ('"' , '\" ' )) for arg in arg_list ]
290
- elif data == 'extra_args' :
291
- args = ["-D{}" .format (arg .replace ('"' , '' )) for arg in arg_list ]
292
- if self .args .cmake_opts :
293
- self .args .cmake_opts .extend (args )
294
- else :
295
- self .args .cmake_opts = args
296
- self .args .sysbuild = item .get ('sysbuild' )
285
+ sysbuild = section .get ('sysbuild' , sysbuild )
286
+ for data in ['extra_args' , 'extra_configs' ]:
287
+ extra = section .get (data )
288
+ if not extra :
289
+ continue
290
+ if isinstance (extra , str ):
291
+ arg_list = extra .split (" " )
292
+ else :
293
+ arg_list = extra
294
+ if data == 'extra_configs' :
295
+ args = ["-D{}" .format (arg .replace ('"' , '\" ' )) for arg in arg_list ]
296
+ elif data == 'extra_args' :
297
+ args = ["-D{}" .format (arg .replace ('"' , '' )) for arg in arg_list ]
298
+ if self .args .cmake_opts :
299
+ self .args .cmake_opts .extend (args )
300
+ else :
301
+ self .args .cmake_opts = args
302
+
303
+ self .args .sysbuild = sysbuild
297
304
return found_test_metadata
298
305
299
306
def _sanity_precheck (self ):
0 commit comments