From 15c4abbfc4a593c39d6410440665c3e0df1cce9b Mon Sep 17 00:00:00 2001 From: Alexander Galazin Date: Thu, 7 May 2020 16:16:08 +0200 Subject: [PATCH] Ensure alphabetical order of xml attributes Python 3.8 removed artificial alphabetical ordering of attributes in ElementTree. The recommended solution to avoid changes in generated xml is to add attributes in the alphabetical order directly in the source code. See https://github.com/python/cpython/commit/63673916464bace8e2147357395fdf3497967ecb Components: Framework VK-GL-CTS issue: 2358 Change-Id: Ife4b93a01d76f1f99fcdf2c1d13291ae5c706d85 (cherry picked from commit b2d84418efc74c558be55c2934e14c2a93edefed) --- scripts/mustpass.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/mustpass.py b/scripts/mustpass.py index 1c17273..8c4ae98 100644 --- a/scripts/mustpass.py +++ b/scripts/mustpass.py @@ -293,9 +293,9 @@ def genSpecXML (mustpass): for config in package.configurations: configElem = ElementTree.SubElement(packageElem, "Configuration", - name = config.name, caseListFile = getCaseListFileName(package, config), - commandLine = getCommandLine(config)) + commandLine = getCommandLine(config), + name = config.name) return mustpassElem @@ -314,13 +314,13 @@ def genAndroidTestXml (mustpass): # add in metadata option for component name ElementTree.SubElement(configElement, "option", name="test-suite-tag", value="cts") - ElementTree.SubElement(configElement, "option", name="config-descriptor:metadata", key="component", value="deqp") - ElementTree.SubElement(configElement, "option", name="config-descriptor:metadata", key="parameter", value="not_instant_app") - ElementTree.SubElement(configElement, "option", name="config-descriptor:metadata", key="parameter", value="multi_abi") - ElementTree.SubElement(configElement, "option", name="config-descriptor:metadata", key="parameter", value="secondary_user") + ElementTree.SubElement(configElement, "option", key="component", name="config-descriptor:metadata", value="deqp") + ElementTree.SubElement(configElement, "option", key="parameter", name="config-descriptor:metadata", value="not_instant_app") + ElementTree.SubElement(configElement, "option", key="parameter", name="config-descriptor:metadata", value="multi_abi") + ElementTree.SubElement(configElement, "option", key="parameter", name="config-descriptor:metadata", value="secondary_user") controllerElement = ElementTree.SubElement(configElement, "object") - controllerElement.set("type", "module_controller") controllerElement.set("class", "com.android.tradefed.testtype.suite.module.TestFailureModuleController") + controllerElement.set("type", "module_controller") addOptionElement(controllerElement, "screenshot-on-failure", "false") for package in mustpass.packages: -- 2.7.4