manasarm | 5dedfaf | 2018-02-07 14:54:54 +0530 | [diff] [blame] | 1 | #!/usr/bin/env python |
| 2 | |
George Keishing | 9fbdf79 | 2016-10-18 06:16:09 -0500 | [diff] [blame] | 3 | r""" |
manasarm | 5dedfaf | 2018-02-07 14:54:54 +0530 | [diff] [blame] | 4 | Use robot framework API to extract test result data from output.xml generated |
| 5 | by robot tests. For more information on the Robot Framework API, see |
| 6 | http://robot-framework.readthedocs.io/en/3.0/autodoc/robot.result.html |
George Keishing | 9fbdf79 | 2016-10-18 06:16:09 -0500 | [diff] [blame] | 7 | """ |
manasarm | 5dedfaf | 2018-02-07 14:54:54 +0530 | [diff] [blame] | 8 | |
Gunnar Mills | 096cd56 | 2018-03-26 10:19:12 -0500 | [diff] [blame] | 9 | import sys |
| 10 | import os |
George Keishing | 9fbdf79 | 2016-10-18 06:16:09 -0500 | [diff] [blame] | 11 | import getopt |
| 12 | import csv |
George Keishing | 9fbdf79 | 2016-10-18 06:16:09 -0500 | [diff] [blame] | 13 | import robot.errors |
manasarm | 5dedfaf | 2018-02-07 14:54:54 +0530 | [diff] [blame] | 14 | import re |
| 15 | from datetime import datetime |
George Keishing | 9fbdf79 | 2016-10-18 06:16:09 -0500 | [diff] [blame] | 16 | from robot.api import ExecutionResult |
| 17 | from robot.result.visitor import ResultVisitor |
George Keishing | 74777bd | 2017-02-07 01:43:38 -0600 | [diff] [blame] | 18 | from xml.etree import ElementTree |
manasarm | 5dedfaf | 2018-02-07 14:54:54 +0530 | [diff] [blame] | 19 | |
| 20 | # Remove the python library path to restore with local project path later. |
| 21 | save_path_0 = sys.path[0] |
| 22 | del sys.path[0] |
George Keishing | c2a6f09 | 2019-02-20 12:26:54 -0600 | [diff] [blame] | 23 | sys.path.append(os.path.join(os.path.dirname(__file__), "../../lib")) |
manasarm | 5dedfaf | 2018-02-07 14:54:54 +0530 | [diff] [blame] | 24 | |
| 25 | from gen_arg import * |
| 26 | from gen_print import * |
| 27 | from gen_valid import * |
| 28 | |
| 29 | # Restore sys.path[0]. |
| 30 | sys.path.insert(0, save_path_0) |
| 31 | |
Steven Sombar | a5e32f2 | 2019-03-01 13:33:15 -0600 | [diff] [blame] | 32 | |
| 33 | this_program = sys.argv[0] |
| 34 | info = " For more information: " + this_program + ' -h' |
| 35 | if len(sys.argv) == 1: |
| 36 | print (info) |
| 37 | sys.exit(1) |
| 38 | |
| 39 | |
manasarm | 5dedfaf | 2018-02-07 14:54:54 +0530 | [diff] [blame] | 40 | parser = argparse.ArgumentParser( |
Steven Sombar | a5e32f2 | 2019-03-01 13:33:15 -0600 | [diff] [blame] | 41 | usage=info, |
manasarm | 5dedfaf | 2018-02-07 14:54:54 +0530 | [diff] [blame] | 42 | description="%(prog)s uses a robot framework API to extract test result\ |
| 43 | data from output.xml generated by robot tests. For more information on the\ |
| 44 | Robot Framework API, see\ |
George Keishing | 11b7af9 | 2018-06-11 10:39:01 -0500 | [diff] [blame] | 45 | http://robot-framework.readthedocs.io/en/3.0/autodoc/robot.result.html", |
manasarm | 5dedfaf | 2018-02-07 14:54:54 +0530 | [diff] [blame] | 46 | formatter_class=argparse.ArgumentDefaultsHelpFormatter, |
| 47 | prefix_chars='-+') |
| 48 | |
| 49 | parser.add_argument( |
| 50 | '--source', |
| 51 | '-s', |
Steven Sombar | a5e32f2 | 2019-03-01 13:33:15 -0600 | [diff] [blame] | 52 | help='The output.xml robot test result file path. This parameter is \ |
| 53 | required.') |
manasarm | 5dedfaf | 2018-02-07 14:54:54 +0530 | [diff] [blame] | 54 | |
| 55 | parser.add_argument( |
| 56 | '--dest', |
| 57 | '-d', |
Steven Sombar | a5e32f2 | 2019-03-01 13:33:15 -0600 | [diff] [blame] | 58 | help='The directory path where the generated .csv files will go. This \ |
| 59 | parameter is required.') |
manasarm | 5dedfaf | 2018-02-07 14:54:54 +0530 | [diff] [blame] | 60 | |
manasarm | e4f79c9 | 2018-02-22 13:02:46 +0530 | [diff] [blame] | 61 | parser.add_argument( |
| 62 | '--version_id', |
| 63 | help='Driver version of openbmc firmware which was used during test,\ |
Steven Sombar | a5e32f2 | 2019-03-01 13:33:15 -0600 | [diff] [blame] | 64 | e.g. "v2.1-215-g6e7eacb". This parameter is required.') |
manasarm | e4f79c9 | 2018-02-22 13:02:46 +0530 | [diff] [blame] | 65 | |
| 66 | parser.add_argument( |
| 67 | '--platform', |
George Keishing | 19533d5 | 2018-04-09 03:08:03 -0500 | [diff] [blame] | 68 | help='OpenBMC platform which was used during test,\ |
Steven Sombar | a5e32f2 | 2019-03-01 13:33:15 -0600 | [diff] [blame] | 69 | e.g. "Witherspoon". This parameter is required.') |
manasarm | e4f79c9 | 2018-02-22 13:02:46 +0530 | [diff] [blame] | 70 | |
George Keishing | 19533d5 | 2018-04-09 03:08:03 -0500 | [diff] [blame] | 71 | parser.add_argument( |
| 72 | '--level', |
| 73 | help='OpenBMC release level which was used during test,\ |
Steven Sombar | a5e32f2 | 2019-03-01 13:33:15 -0600 | [diff] [blame] | 74 | e.g. "Master", "OBMC920". This parameter is required.') |
| 75 | |
| 76 | parser.add_argument( |
| 77 | '--test_phase', |
| 78 | help='Name of testing phase, e.g. "DVT", "SVT", etc.\ |
| 79 | This parameter is optional.', |
| 80 | default="FVT") |
| 81 | |
| 82 | parser.add_argument( |
| 83 | '--processor', |
| 84 | help='Name of processor, e.g. "P9". This parameter is optional.', |
| 85 | default="OPENPOWER") |
| 86 | |
George Keishing | 19533d5 | 2018-04-09 03:08:03 -0500 | [diff] [blame] | 87 | |
manasarm | 5dedfaf | 2018-02-07 14:54:54 +0530 | [diff] [blame] | 88 | # Populate stock_list with options we want. |
| 89 | stock_list = [("test_mode", 0), ("quiet", 0), ("debug", 0)] |
| 90 | |
| 91 | |
| 92 | def exit_function(signal_number=0, |
| 93 | frame=None): |
manasarm | 5dedfaf | 2018-02-07 14:54:54 +0530 | [diff] [blame] | 94 | r""" |
| 95 | Execute whenever the program ends normally or with the signals that we |
| 96 | catch (i.e. TERM, INT). |
| 97 | """ |
| 98 | |
| 99 | dprint_executing() |
| 100 | |
| 101 | dprint_var(signal_number) |
| 102 | |
| 103 | qprint_pgm_footer() |
| 104 | |
| 105 | |
| 106 | def signal_handler(signal_number, |
| 107 | frame): |
manasarm | 5dedfaf | 2018-02-07 14:54:54 +0530 | [diff] [blame] | 108 | r""" |
| 109 | Handle signals. Without a function to catch a SIGTERM or SIGINT, the |
| 110 | program would terminate immediately with return code 143 and without |
| 111 | calling the exit_function. |
| 112 | """ |
| 113 | |
| 114 | # Our convention is to set up exit_function with atexit.register() so |
| 115 | # there is no need to explicitly call exit_function from here. |
| 116 | |
| 117 | dprint_executing() |
| 118 | |
| 119 | # Calling exit prevents us from returning to the code that was running |
| 120 | # when the signal was received. |
| 121 | exit(0) |
| 122 | |
| 123 | |
| 124 | def validate_parms(): |
manasarm | 5dedfaf | 2018-02-07 14:54:54 +0530 | [diff] [blame] | 125 | r""" |
| 126 | Validate program parameters, etc. Return True or False (i.e. pass/fail) |
| 127 | accordingly. |
| 128 | """ |
| 129 | |
| 130 | if not valid_file_path(source): |
| 131 | return False |
| 132 | |
| 133 | if not valid_dir_path(dest): |
| 134 | return False |
| 135 | |
| 136 | gen_post_validation(exit_function, signal_handler) |
| 137 | |
| 138 | return True |
George Keishing | 9fbdf79 | 2016-10-18 06:16:09 -0500 | [diff] [blame] | 139 | |
| 140 | |
Steven Sombar | a5e32f2 | 2019-03-01 13:33:15 -0600 | [diff] [blame] | 141 | def parse_output_xml(xml_file_path, csv_dir_path, version_id, platform, level, |
| 142 | test_phase, processor): |
manasarm | 5dedfaf | 2018-02-07 14:54:54 +0530 | [diff] [blame] | 143 | r""" |
| 144 | Parse the robot-generated output.xml file and extract various test |
| 145 | output data. Put the extracted information into a csv file in the "dest" |
| 146 | folder. |
| 147 | |
| 148 | Description of argument(s): |
Joy Onyerikwu | 004ad3c | 2018-06-11 16:29:56 -0500 | [diff] [blame] | 149 | xml_file_path The path to a Robot-generated output.xml |
| 150 | file. |
| 151 | csv_dir_path The path to the directory that is to |
| 152 | contain the .csv files generated by |
| 153 | this function. |
| 154 | version_id Version of the openbmc firmware |
| 155 | (e.g. "v2.1-215-g6e7eacb"). |
| 156 | platform Platform of the openbmc system. |
| 157 | level Release level of the OpenBMC system |
George Keishing | 360db63 | 2018-09-06 12:01:28 -0500 | [diff] [blame] | 158 | (e.g. "Master"). |
manasarm | 5dedfaf | 2018-02-07 14:54:54 +0530 | [diff] [blame] | 159 | """ |
| 160 | |
George Keishing | 74777bd | 2017-02-07 01:43:38 -0600 | [diff] [blame] | 161 | result = ExecutionResult(xml_file_path) |
George Keishing | 9fbdf79 | 2016-10-18 06:16:09 -0500 | [diff] [blame] | 162 | result.configure(stat_config={'suite_stat_level': 2, |
| 163 | 'tag_stat_combine': 'tagANDanother'}) |
| 164 | |
| 165 | stats = result.statistics |
George Keishing | f8a9ebe | 2018-08-06 12:49:11 -0500 | [diff] [blame] | 166 | print("--------------------------------------") |
| 167 | total_tc = stats.total.critical.passed + stats.total.critical.failed |
| 168 | print("Total Test Count:\t %d" % total_tc) |
| 169 | print("Total Test Failed:\t %d" % stats.total.critical.failed) |
| 170 | print("Total Test Passed:\t %d" % stats.total.critical.passed) |
| 171 | print("Test Start Time:\t %s" % result.suite.starttime) |
| 172 | print("Test End Time:\t\t %s" % result.suite.endtime) |
| 173 | print("--------------------------------------") |
George Keishing | 9fbdf79 | 2016-10-18 06:16:09 -0500 | [diff] [blame] | 174 | |
| 175 | # Use ResultVisitor object and save off the test data info |
| 176 | class TestResult(ResultVisitor): |
| 177 | def __init__(self): |
| 178 | self.testData = [] |
| 179 | |
| 180 | def visit_test(self, test): |
| 181 | self.testData += [test] |
| 182 | |
| 183 | collectDataObj = TestResult() |
| 184 | result.visit(collectDataObj) |
| 185 | |
| 186 | # Write the result statistics attributes to CSV file |
| 187 | l_csvlist = [] |
George Keishing | 74777bd | 2017-02-07 01:43:38 -0600 | [diff] [blame] | 188 | |
| 189 | # Default Test data |
George Keishing | 9fbdf79 | 2016-10-18 06:16:09 -0500 | [diff] [blame] | 190 | l_subsys = 'OPENBMC' |
Steven Sombar | a5e32f2 | 2019-03-01 13:33:15 -0600 | [diff] [blame] | 191 | l_test_type = test_phase |
George Keishing | 19533d5 | 2018-04-09 03:08:03 -0500 | [diff] [blame] | 192 | |
George Keishing | 360db63 | 2018-09-06 12:01:28 -0500 | [diff] [blame] | 193 | l_pse_rel = 'Master' |
George Keishing | 19533d5 | 2018-04-09 03:08:03 -0500 | [diff] [blame] | 194 | if level: |
| 195 | l_pse_rel = level |
| 196 | |
George Keishing | 74777bd | 2017-02-07 01:43:38 -0600 | [diff] [blame] | 197 | l_env = 'HW' |
Steven Sombar | a5e32f2 | 2019-03-01 13:33:15 -0600 | [diff] [blame] | 198 | l_proc = processor |
George Keishing | 74777bd | 2017-02-07 01:43:38 -0600 | [diff] [blame] | 199 | l_platform_type = "" |
| 200 | l_func_area = "" |
| 201 | |
Gunnar Mills | 096cd56 | 2018-03-26 10:19:12 -0500 | [diff] [blame] | 202 | # System data from XML meta data |
Joy Onyerikwu | 004ad3c | 2018-06-11 16:29:56 -0500 | [diff] [blame] | 203 | # l_system_info = get_system_details(xml_file_path) |
manasarm | e4f79c9 | 2018-02-22 13:02:46 +0530 | [diff] [blame] | 204 | |
| 205 | # First let us try to collect information from keyboard input |
| 206 | # If keyboard input cannot give both information, then find from xml file. |
| 207 | if version_id and platform: |
| 208 | l_driver = version_id |
| 209 | l_platform_type = platform |
George Keishing | f8a9ebe | 2018-08-06 12:49:11 -0500 | [diff] [blame] | 210 | print("BMC Version_id:%s" % version_id) |
| 211 | print("BMC Platform:%s" % platform) |
George Keishing | 74777bd | 2017-02-07 01:43:38 -0600 | [diff] [blame] | 212 | else: |
manasarm | e4f79c9 | 2018-02-22 13:02:46 +0530 | [diff] [blame] | 213 | # System data from XML meta data |
| 214 | l_system_info = get_system_details(xml_file_path) |
| 215 | l_driver = l_system_info[0] |
| 216 | l_platform_type = l_system_info[1] |
| 217 | |
| 218 | # Driver version id and platform are mandatorily required for CSV file |
Joy Onyerikwu | 004ad3c | 2018-06-11 16:29:56 -0500 | [diff] [blame] | 219 | # generation. If any one is not avaulable, exit CSV file generation |
| 220 | # process. |
manasarm | e4f79c9 | 2018-02-22 13:02:46 +0530 | [diff] [blame] | 221 | if l_driver and l_platform_type: |
George Keishing | f8a9ebe | 2018-08-06 12:49:11 -0500 | [diff] [blame] | 222 | print("Driver and system info set.") |
manasarm | e4f79c9 | 2018-02-22 13:02:46 +0530 | [diff] [blame] | 223 | else: |
George Keishing | f8a9ebe | 2018-08-06 12:49:11 -0500 | [diff] [blame] | 224 | print("Both driver and system info need to be set.\ |
| 225 | CSV file is not generated.") |
George Keishing | 74777bd | 2017-02-07 01:43:38 -0600 | [diff] [blame] | 226 | sys.exit() |
George Keishing | 9fbdf79 | 2016-10-18 06:16:09 -0500 | [diff] [blame] | 227 | |
| 228 | # Default header |
| 229 | l_header = ['test_start', 'test_end', 'subsys', 'test_type', |
George Keishing | 74777bd | 2017-02-07 01:43:38 -0600 | [diff] [blame] | 230 | 'test_result', 'test_name', 'pse_rel', 'driver', |
| 231 | 'env', 'proc', 'platform_type', 'test_func_area'] |
George Keishing | 9fbdf79 | 2016-10-18 06:16:09 -0500 | [diff] [blame] | 232 | |
| 233 | l_csvlist.append(l_header) |
| 234 | |
| 235 | # Generate CSV file onto the path with current time stamp |
George Keishing | 74777bd | 2017-02-07 01:43:38 -0600 | [diff] [blame] | 236 | l_base_dir = csv_dir_path |
George Keishing | 9fbdf79 | 2016-10-18 06:16:09 -0500 | [diff] [blame] | 237 | l_timestamp = datetime.utcnow().strftime("%Y-%m-%d-%H-%M-%S") |
George Keishing | 74777bd | 2017-02-07 01:43:38 -0600 | [diff] [blame] | 238 | # Example: 2017-02-20-08-47-22_Witherspoon.csv |
| 239 | l_csvfile = l_base_dir + l_timestamp + "_" + l_platform_type + ".csv" |
George Keishing | 9fbdf79 | 2016-10-18 06:16:09 -0500 | [diff] [blame] | 240 | |
George Keishing | f8a9ebe | 2018-08-06 12:49:11 -0500 | [diff] [blame] | 241 | print("Writing data into csv file:%s" % l_csvfile) |
George Keishing | 9fbdf79 | 2016-10-18 06:16:09 -0500 | [diff] [blame] | 242 | |
| 243 | for testcase in collectDataObj.testData: |
George Keishing | 74777bd | 2017-02-07 01:43:38 -0600 | [diff] [blame] | 244 | # Functional Area: Suite Name |
| 245 | # Test Name: Test Case Name |
| 246 | l_func_area = str(testcase.parent).split(' ', 1)[1] |
| 247 | l_test_name = str(testcase) |
George Keishing | 9fbdf79 | 2016-10-18 06:16:09 -0500 | [diff] [blame] | 248 | |
| 249 | # Test Result pass=0 fail=1 |
| 250 | if testcase.status == 'PASS': |
| 251 | l_test_result = 0 |
| 252 | else: |
| 253 | l_test_result = 1 |
| 254 | |
George Keishing | 74777bd | 2017-02-07 01:43:38 -0600 | [diff] [blame] | 255 | # Format datetime from robot output.xml to "%Y-%m-%d-%H-%M-%S" |
| 256 | l_stime = xml_to_csv_time(testcase.starttime) |
| 257 | l_etime = xml_to_csv_time(testcase.endtime) |
George Keishing | 9fbdf79 | 2016-10-18 06:16:09 -0500 | [diff] [blame] | 258 | # Data Sequence: test_start,test_end,subsys,test_type, |
George Keishing | 74777bd | 2017-02-07 01:43:38 -0600 | [diff] [blame] | 259 | # test_result,test_name,pse_rel,driver, |
George Keishing | 360db63 | 2018-09-06 12:01:28 -0500 | [diff] [blame] | 260 | # env,proc,platform_type,test_func_area, |
George Keishing | 74777bd | 2017-02-07 01:43:38 -0600 | [diff] [blame] | 261 | l_data = [l_stime, l_etime, l_subsys, l_test_type, l_test_result, |
| 262 | l_test_name, l_pse_rel, l_driver, l_env, l_proc, |
| 263 | l_platform_type, l_func_area] |
George Keishing | 9fbdf79 | 2016-10-18 06:16:09 -0500 | [diff] [blame] | 264 | l_csvlist.append(l_data) |
| 265 | |
George Keishing | a96e27c | 2016-12-04 23:05:04 -0600 | [diff] [blame] | 266 | # Open the file and write to the CSV file |
| 267 | l_file = open(l_csvfile, "w") |
| 268 | l_writer = csv.writer(l_file, lineterminator='\n') |
| 269 | l_writer.writerows(l_csvlist) |
| 270 | l_file.close() |
George Keishing | 9fbdf79 | 2016-10-18 06:16:09 -0500 | [diff] [blame] | 271 | |
| 272 | |
George Keishing | 74777bd | 2017-02-07 01:43:38 -0600 | [diff] [blame] | 273 | def xml_to_csv_time(xml_datetime): |
| 274 | r""" |
| 275 | Convert the time from %Y%m%d %H:%M:%S.%f format to %Y-%m-%d-%H-%M-%S format |
| 276 | and return it. |
| 277 | |
manasarm | 5dedfaf | 2018-02-07 14:54:54 +0530 | [diff] [blame] | 278 | Description of argument(s): |
Joy Onyerikwu | 004ad3c | 2018-06-11 16:29:56 -0500 | [diff] [blame] | 279 | datetime The date in the following format: %Y%m%d |
| 280 | %H:%M:%S.%f (This is the format |
| 281 | typically found in an XML file.) |
George Keishing | 74777bd | 2017-02-07 01:43:38 -0600 | [diff] [blame] | 282 | |
| 283 | The date returned will be in the following format: %Y-%m-%d-%H-%M-%S |
| 284 | """ |
manasarm | 5dedfaf | 2018-02-07 14:54:54 +0530 | [diff] [blame] | 285 | |
George Keishing | 74777bd | 2017-02-07 01:43:38 -0600 | [diff] [blame] | 286 | # 20170206 05:05:19.342 |
| 287 | l_str = datetime.strptime(xml_datetime, "%Y%m%d %H:%M:%S.%f") |
| 288 | # 2017-02-06-05-05-19 |
| 289 | l_str = l_str.strftime("%Y-%m-%d-%H-%M-%S") |
| 290 | return str(l_str) |
| 291 | |
| 292 | |
| 293 | def get_system_details(xml_file_path): |
| 294 | r""" |
| 295 | Get the system data from output.xml generated by robot and return it. |
Gunnar Mills | 28e403b | 2017-10-25 16:16:38 -0500 | [diff] [blame] | 296 | The list returned will be in the following order: [driver,platform] |
George Keishing | 74777bd | 2017-02-07 01:43:38 -0600 | [diff] [blame] | 297 | |
manasarm | 5dedfaf | 2018-02-07 14:54:54 +0530 | [diff] [blame] | 298 | Description of argument(s): |
Joy Onyerikwu | 004ad3c | 2018-06-11 16:29:56 -0500 | [diff] [blame] | 299 | xml_file_path The relative or absolute path to the |
| 300 | output.xml file. |
George Keishing | 74777bd | 2017-02-07 01:43:38 -0600 | [diff] [blame] | 301 | """ |
manasarm | 5dedfaf | 2018-02-07 14:54:54 +0530 | [diff] [blame] | 302 | |
manasarm | e4f79c9 | 2018-02-22 13:02:46 +0530 | [diff] [blame] | 303 | bmc_version_id = "" |
George Keishing | 74777bd | 2017-02-07 01:43:38 -0600 | [diff] [blame] | 304 | bmc_platform = "" |
| 305 | with open(xml_file_path, 'rt') as output: |
| 306 | tree = ElementTree.parse(output) |
| 307 | |
| 308 | for node in tree.iter('msg'): |
| 309 | # /etc/os-release output is logged in the XML as msg |
George Keishing | 360db63 | 2018-09-06 12:01:28 -0500 | [diff] [blame] | 310 | # Example: ${output} = VERSION_ID="v1.99.2-71-gbc49f79" |
George Keishing | 74777bd | 2017-02-07 01:43:38 -0600 | [diff] [blame] | 311 | if '${output} = VERSION_ID=' in node.text: |
George Keishing | 360db63 | 2018-09-06 12:01:28 -0500 | [diff] [blame] | 312 | # Get BMC version (e.g. v1.99.1-96-g2a46570) |
manasarm | e4f79c9 | 2018-02-22 13:02:46 +0530 | [diff] [blame] | 313 | bmc_version_id = str(node.text.split("VERSION_ID=")[1])[1:-1] |
George Keishing | 74777bd | 2017-02-07 01:43:38 -0600 | [diff] [blame] | 314 | |
| 315 | # Platform is logged in the XML as msg. |
| 316 | # Example: ${bmc_model} = Witherspoon BMC |
| 317 | if '${bmc_model} = ' in node.text: |
| 318 | bmc_platform = node.text.split(" = ")[1] |
| 319 | |
manasarm | e4f79c9 | 2018-02-22 13:02:46 +0530 | [diff] [blame] | 320 | print_vars(bmc_version_id, bmc_platform) |
| 321 | return [str(bmc_version_id), str(bmc_platform)] |
George Keishing | 74777bd | 2017-02-07 01:43:38 -0600 | [diff] [blame] | 322 | |
| 323 | |
manasarm | 5dedfaf | 2018-02-07 14:54:54 +0530 | [diff] [blame] | 324 | def main(): |
George Keishing | 9fbdf79 | 2016-10-18 06:16:09 -0500 | [diff] [blame] | 325 | |
manasarm | 5dedfaf | 2018-02-07 14:54:54 +0530 | [diff] [blame] | 326 | if not gen_get_options(parser, stock_list): |
| 327 | return False |
George Keishing | 9fbdf79 | 2016-10-18 06:16:09 -0500 | [diff] [blame] | 328 | |
manasarm | 5dedfaf | 2018-02-07 14:54:54 +0530 | [diff] [blame] | 329 | if not validate_parms(): |
| 330 | return False |
George Keishing | 9fbdf79 | 2016-10-18 06:16:09 -0500 | [diff] [blame] | 331 | |
manasarm | 5dedfaf | 2018-02-07 14:54:54 +0530 | [diff] [blame] | 332 | qprint_pgm_header() |
George Keishing | 9fbdf79 | 2016-10-18 06:16:09 -0500 | [diff] [blame] | 333 | |
Steven Sombar | a5e32f2 | 2019-03-01 13:33:15 -0600 | [diff] [blame] | 334 | parse_output_xml(source, dest, version_id, platform, level, |
| 335 | test_phase, processor) |
George Keishing | 9fbdf79 | 2016-10-18 06:16:09 -0500 | [diff] [blame] | 336 | |
manasarm | 5dedfaf | 2018-02-07 14:54:54 +0530 | [diff] [blame] | 337 | return True |
| 338 | |
| 339 | |
| 340 | # Main |
| 341 | |
| 342 | if not main(): |
| 343 | exit(1) |