Skip to content

Commit ba68789

Browse files
Jeny SadadiaJenySadadia
Jeny Sadadia
authored andcommitted
src/send_kcidb: send tests only if KCIDB test mapping exists
All test suite definitions must have `kcidb_test_suite` property i.e. KCIDB test suite mapping. Only send tests for those the mapping is found. Signed-off-by: Jeny Sadadia <[email protected]>
1 parent 1231d6c commit ba68789

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/send_kcidb.py

+7
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,10 @@ def _parse_node_path(self, path, is_checkout_child):
201201
suite_name = self._jobs[sub_path].kcidb_test_suite
202202
if suite_name:
203203
new_path.append(suite_name)
204+
else:
205+
self.log.error(f"KCIDB test suite mapping not found for \
206+
the test: {sub_path}")
207+
return None
204208
else:
205209
new_path.append(sub_path)
206210
# Handle path such as ['tast-ui-x86-intel', 'tast', 'os-release'] converted
@@ -359,6 +363,9 @@ def _get_test_data(self, node, origin,
359363
test_node, build_node = self._parse_test_node(
360364
origin, node
361365
)
366+
if not test_node['path']:
367+
self.log.info(f"Not sending test as path information is missing: {test_node['id']}")
368+
return
362369
parsed_test_node.append(test_node)
363370
if build_node:
364371
parsed_build_node.append(build_node)

0 commit comments

Comments
 (0)