Skip to content

config: runtime: kunit: ensure result nodes are in "done" state #1212

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions config/runtime/kunit.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,15 @@ class Job(BaseJob):
def _parse_results(self, group):
node = {
'name': group['name'],
'state': 'done',
}
child_nodes = []
for test_case in group.get('test_cases', []):
child_nodes.append({
'node': {
'name': test_case['name'],
'result': RESULT_MAP[test_case['status']],
'state': 'done',
'kind': 'test'
},
'child_nodes': [],
Expand Down Expand Up @@ -131,6 +133,7 @@ cd {src_path}
results = {
'node': {
'result': step_results['exec'][0] or 'fail',
'state': 'done',
'artifacts': artifacts,
'data': {'arch': ARCH if ARCH else 'um'}
},
Expand All @@ -140,6 +143,7 @@ cd {src_path}
'kind': 'job' if child_nodes else 'test' ,
'name': name,
'result': result,
'state': 'done',
},
'child_nodes': child_nodes,
} for name, (result, child_nodes) in step_results.items()
Expand Down