Skip to content

Commit

Permalink
replace legacy regions and clean up syntax for test upload script (#443)
Browse files Browse the repository at this point in the history
  • Loading branch information
ykim-1 committed Dec 18, 2023
1 parent 5119842 commit 17895ae
Show file tree
Hide file tree
Showing 5 changed files with 344 additions and 34,641 deletions.
14 changes: 9 additions & 5 deletions scripts/test_report_upload_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,18 @@ def change_xml_report_to_tod_acceptable_version(file_name):
for child in testcase:
new_testcase.append(child)

branch_name = ET.SubElement(new_testsuite, branch_name)
branch_name.text = root.find('branch_name').text
gha_run_id = ET.SubElement(new_testsuite, gha_run_id)
gha_run_id.text = root.find('gha_run_id').text
gha_run_number = ET.SubElement(new_testsuite, gha_run_number)
gha_run_number.text = root.find('gha_run_number').text
release_tag = ET.SubElement(new_testsuite, release_tag)
release_tag.text = root.find('release_tag').text

# Save the new XML to a file
try:
new_tree = ET.ElementTree(new_testsuites)
new_root = new_tree.getroot()
new_root.append(root.get('branch_name'))
new_root.append(root.get('gha_run_id'))
new_root.append(root.get('gha_run_number'))
new_root.append(root.get('release_tag'))

new_tree.write(file_name, encoding="UTF-8", xml_declaration=True)

Expand Down
Loading

0 comments on commit 17895ae

Please sign in to comment.