Update XML Tags To New Design¶
Update XML entries¶
This script converts the job dependency settings in XML files to the new design and creates analysis group for all test cases of type TestSuiteTestcase.
$ ./contrib/updateXMLEntries.py -h
usage: updateXMLEntries.py [-h] -i PATH [-o PATH] [--extension PATTERN]
[--ignore PATTERN] [--testCaseFolder PATH]
[--createAnalysisTags]
Convert test case XML files to new design.
optional arguments:
-h, --help show this help message and exit
-i PATH, --input PATH
path to base folder.
-o PATH, --output PATH
path to output folder. (If not specified files in
input folders will be overwritten.)
--extension PATTERN Files used matching this extension only.
--ignore PATTERN pattern to ignore files.
--testCaseFolder PATH
path to test cases
--createAnalysisTags
For the update of the job dependencies the following command line should be sufficient stating the path to the base directory only:
updateXMLEntries.py -i <TRACE_SUITE_PATH>/distrib/testing/standard/level3
If the analysis groups have to be created two additional arguments have to be given. The test case folder has to be the path to all needed test cases of type TestSuiteTestCase.:
updateXMLEntries.py -i <TRACE_SUITE_PATH>/distrib/testing/standard/level3 --createAnalysisTags --testCaseFolder <PATH>
If only specific XML files are desired the search pattern and/or an ignore pattern can be defined:
updateXMLEntries.py -i <TESTING_PATH> --createAnalysisTags --extension bump_hybrid.xml --testCaseFolder <PATH>
updateXMLEntries.py -i <TESTING_PATH> --createAnalysisTags --ignore TRACE_SUITE*.xml --testCaseFolder <PATH>
The functionality can be tested using the following command in the contrib folder by setting the test case path correctly:
./updateXMLEntries.py -i ../data/orig/ -o ../data/ --createAnalysisTags --testCaseFolder <PATH>
In the folder data/orig two XML files in the old design are stored. As test suite test cases ‘cooling’ and ‘POST_bump_hybrid’ are selected. These two test cases must be present in the specified test case folder.
-
changeDependenciesInElement
(xmlElement, jobListGroupTag, jobListTag, jobTag)[source]¶ Convert all job dependencies in the selected job list group tag and job list tag
-
changeDependencyKeywords
(xmlRoot)[source]¶ Convert the dependencies in all occurrences of simulationGroup, restartGroup and jobList
- Parameters
xmlRoot (etree.Element) – base element
-
createAnalysisGroup
(options, xmlRoot, tcName)[source]¶ Create a default for the post-processing jobs in a TestSuiteTestCase
- Parameters
xmlRoot (etree.Element) – base element
tcName (str) – name of test case