@@ -291,27 +291,29 @@ def test(binfo, rinfo, cbarg):
291291
292292 vm = VM (config )
293293
294+ build_ok = True
294295 kconfs = []
295296 for target in targets :
296297 conf = f"tools/testing/selftests/{ target } /config"
297298 if os .path .exists (os .path .join (vm .tree_path , conf )):
298299 kconfs .append (conf )
299- if vm .build (kconfs ) == False :
300- vm .dump_log (results_path + '/build' )
300+ build_ok &= vm .build (kconfs )
301+
302+ shutil .copy (os .path .join (config .get ('local' , 'tree_path' ), '.config' ),
303+ results_path + '/config' )
304+ vm .tree_cmd ("make headers" )
305+ ret = vm .tree_cmd (["make" , "-C" , "tools/testing/selftests/" ,
306+ "TARGETS=" + " " .join (targets )])
307+ build_ok &= ret == 0
308+ vm .dump_log (results_path + '/build' )
309+ if not build_ok :
301310 return [{
302311 'test' : 'build' ,
303312 'group' : grp_name ,
304313 'result' : 'fail' ,
305314 'link' : link + '/build' ,
306315 }]
307316
308- shutil .copy (os .path .join (config .get ('local' , 'tree_path' ), '.config' ),
309- results_path + '/config' )
310- vm .tree_cmd ("make headers" )
311- for target in targets :
312- vm .tree_cmd (f"make -C tools/testing/selftests/{ target } /" )
313- vm .dump_log (results_path + '/build' )
314-
315317 progs = get_prog_list (vm , targets )
316318 progs .sort (reverse = True , key = lambda prog : cbarg .prev_runtime .get (prog , 0 ))
317319
0 commit comments