(argv)
| 437 | |
| 438 | |
| 439 | def parse(argv): |
| 440 | import argparse |
| 441 | |
| 442 | parser = argparse.ArgumentParser( |
| 443 | prog=argv[0], description="pass xcodebuild output log, use stderr as log" |
| 444 | ) |
| 445 | parser.add_argument( |
| 446 | "input", nargs="?", default="-", help="input file, default will use stdin" |
| 447 | ) |
| 448 | parser.add_argument( |
| 449 | "-o", |
| 450 | "--output", |
| 451 | help="output file, when this not set, will dump to cwd .compile file, also generate a buildServer.json with indexStorePath", |
| 452 | ) |
| 453 | parser.add_argument( |
| 454 | "-a", |
| 455 | "--append", |
| 456 | action="store_true", |
| 457 | help="append to output file instead of replace. same item will be overwrite. should specify output", |
| 458 | ) |
| 459 | parser.add_argument( |
| 460 | "-l", "--xcactivitylog", help="xcactivitylog path, overwrite input param" |
| 461 | ) |
| 462 | parser.add_argument( |
| 463 | "-s", |
| 464 | "--sync", |
| 465 | help="xcode build root path, use to extract newest xcactivitylog, eg: /Users/xxx/Library/Developer/Xcode/DerivedData/XXXProject-xxxhash/", |
| 466 | ) |
| 467 | parser.add_argument( |
| 468 | "--scheme", |
| 469 | help=argparse.SUPPRESS |
| 470 | # help="scheme for extract from sync build root, default ignore this filter param", |
| 471 | ) |
| 472 | parser.add_argument( |
| 473 | "--skip-validate-bin", |
| 474 | help="if skip validate the compile command which start with swiftc or clang, you should use this only when use custom binary", |
| 475 | action="store_true", |
| 476 | ) |
| 477 | parser.add_argument( |
| 478 | "-v", |
| 479 | "--verbose", |
| 480 | action='count', |
| 481 | default=0, |
| 482 | help="Setup levels of verbosity of output (e.g., -v -vv -vvv).\n -v is for passing through errors,\n -vv is for passing through errors and warnings,\n -vvv is for passing through error, warnings and notes." |
| 483 | ) |
| 484 | a = parser.parse_args(argv[1:]) |
| 485 | within_output_lock(a.output, lambda: _parse(a)) |
| 486 | |
| 487 | |
| 488 | def main(argv=sys.argv): |
no test coverage detected