Skip to content

Commit

Permalink
vmksft-p: report build failures
Browse files Browse the repository at this point in the history
On a build failure return a meaningful result field instead
of an empty one:
	"results": [
		{
			"test": "build",
			"group": "selftests-tc-testing",
			"result": "fail",
			"link": ""
		}
	],

Which in turn gets reported correctly in the status dashboard.

Signed-off-by: Pedro Tammela <[email protected]>
  • Loading branch information
tammela authored and kuba-moo committed Mar 28, 2024
1 parent 59d1b6c commit 43c46f7
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions contest/remote/vmksft-p.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,18 @@ def test(binfo, rinfo, cbarg):
rinfo['run-cookie']
rinfo['link'] = link
target = config.get('ksft', 'target')
grp_name = "selftests-" + namify(target)

vm = VM(config)
vm.build([f"tools/testing/selftests/{target}/config"])

if vm.build([f"tools/testing/selftests/{target}/config"]) == False:
return [{
'test': 'build',
'group': grp_name,
'result': 'fail',
'link': '',
}]

shutil.copy(os.path.join(config.get('local', 'tree_path'), '.config'),
results_path + '/config')
vm.tree_cmd("make headers")
Expand Down Expand Up @@ -286,7 +295,6 @@ def test(binfo, rinfo, cbarg):
for i in range(thr_cnt):
threads[i].join()

grp_name = "selftests-" + namify(target)
cases = []
while not out_queue.empty():
r = out_queue.get()
Expand Down

0 comments on commit 43c46f7

Please sign in to comment.