Skip to content

Commit d0e7c43

Browse files
committed
contest: make sure we fail hard if tests don't build
Turns out the net/af_unix tests haven't been building for a while. Signed-off-by: Jakub Kicinski <[email protected]>
1 parent f4343d6 commit d0e7c43

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

contest/remote/vmksft-p.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -291,27 +291,28 @@ 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+
ts = ' '.join(targets)
306+
build_ok &= vm.tree_cmd(f'make -C tools/testing/selftests/ TARGETS="{ts}"')
307+
vm.dump_log(results_path + '/build')
308+
if not build_ok:
301309
return [{
302310
'test': 'build',
303311
'group': grp_name,
304312
'result': 'fail',
305313
'link': link + '/build',
306314
}]
307315

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-
315316
progs = get_prog_list(vm, targets)
316317
progs.sort(reverse=True, key=lambda prog : cbarg.prev_runtime.get(prog, 0))
317318

0 commit comments

Comments
 (0)