Skip to content

Commit 6940d8c

Browse files
a-wainuclearcat
authored andcommitted
config: runtime: kunit: ensure result nodes are in "done" state
Nodes are created in `running` state by default. Recent changes to the API helper functions copy the `state` field from the node instead of setting it to `done` by default, meaning result nodes stay `running` until they time out. Fix this by making those nodes `done` right from the beginning. Signed-off-by: Arnaud Ferraris <[email protected]>
1 parent 35364d3 commit 6940d8c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

config/runtime/kunit.jinja2

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,15 @@ class Job(BaseJob):
3030
def _parse_results(self, group):
3131
node = {
3232
'name': group['name'],
33+
'state': 'done',
3334
}
3435
child_nodes = []
3536
for test_case in group.get('test_cases', []):
3637
child_nodes.append({
3738
'node': {
3839
'name': test_case['name'],
3940
'result': RESULT_MAP[test_case['status']],
41+
'state': 'done',
4042
'kind': 'test'
4143
},
4244
'child_nodes': [],
@@ -131,6 +133,7 @@ cd {src_path}
131133
results = {
132134
'node': {
133135
'result': step_results['exec'][0] or 'fail',
136+
'state': 'done',
134137
'artifacts': artifacts,
135138
'data': {'arch': ARCH if ARCH else 'um'}
136139
},
@@ -140,6 +143,7 @@ cd {src_path}
140143
'kind': 'job' if child_nodes else 'test' ,
141144
'name': name,
142145
'result': result,
146+
'state': 'done',
143147
},
144148
'child_nodes': child_nodes,
145149
} for name, (result, child_nodes) in step_results.items()

0 commit comments

Comments
 (0)