Skip to content

Commit c545659

Browse files
Set classname to first ID segment for Polarion matching
The previous fix cleared classname to empty, but jump.py (helpers.py:143) requires a non-empty classname — tests without one are skipped entirely ("doesn't have a classname and therefore it won't be uploaded to Polarion"). jump.py builds the match key as "classname.name" (line 156). The registered automation-test-ids have the format: sig-installer.Suite_openshift_openstack.<category>.<desc> Split the formatted name at the first dot so that: - classname = "sig-installer" (first segment) - name = "Suite_openshift_openstack.<category>.<desc>" (rest) This produces full_name = "sig-installer.Suite_openshift_openstack..." which matches the Polarion entries (RHOSO-11212 to RHOSO-11266). Related-Issue: OSPRH-32990 Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 4844ebf commit c545659

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

collection/tools/roles/tools_openshift_tests/scripts/modifyE2ETags.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,12 @@ def format_test_case_name(s):
5151
new_tc_name = format_test_case_name(tc_name)
5252
if new_tc_name.startswith('OTP.'):
5353
new_tc_name = new_tc_name[4:]
54-
tc.set('name', new_tc_name)
55-
tc.set('classname', '')
54+
if '.' in new_tc_name:
55+
tc_classname, tc_name_rest = new_tc_name.split('.', 1)
56+
tc.set('classname', tc_classname)
57+
tc.set('name', tc_name_rest)
58+
else:
59+
tc.set('name', new_tc_name)
5660
print('TestCase added to output XML:', new_tc_name)
5761
ts.set('tests', str(len(ts.getchildren())))
5862

0 commit comments

Comments
 (0)