Parse command line options. Returns: The parsed arguments object.
()
| 219 | |
| 220 | |
| 221 | def parse_cmd_line(): |
| 222 | """Parse command line options. |
| 223 | |
| 224 | Returns: |
| 225 | The parsed arguments object. |
| 226 | """ |
| 227 | desc = "Upload benchmark results to datastore." |
| 228 | opts = [ |
| 229 | ("-a", "--archivedir", str, None, True, |
| 230 | "Directory where benchmark files are archived."), |
| 231 | ("-d", "--datadir", str, None, True, |
| 232 | "Directory of benchmark files to upload."), |
| 233 | ] |
| 234 | |
| 235 | parser = argparse.ArgumentParser(description=desc) |
| 236 | for opt in opts: |
| 237 | parser.add_argument(opt[0], opt[1], type=opt[2], default=opt[3], |
| 238 | required=opt[4], help=opt[5]) |
| 239 | return parser.parse_args() |
| 240 | |
| 241 | |
| 242 | def main(): |
no test coverage detected