23 SKIPPED_STATUS = 80 |
23 SKIPPED_STATUS = 80 |
24 |
24 |
25 required_tools = ["python", "diff", "grep", "unzip", "gunzip", "bunzip2", "sed"] |
25 required_tools = ["python", "diff", "grep", "unzip", "gunzip", "bunzip2", "sed"] |
26 |
26 |
27 parser = optparse.OptionParser("%prog [options] [tests]") |
27 parser = optparse.OptionParser("%prog [options] [tests]") |
|
28 parser.add_option("-C", "--annotate", action="store_true", |
|
29 help="output files annotated with coverage") |
|
30 parser.add_option("-c", "--cover", action="store_true", |
|
31 help="print a test coverage report") |
|
32 parser.add_option("-f", "--first", action="store_true", |
|
33 help="exit on the first test failure") |
|
34 parser.add_option("-i", "--interactive", action="store_true", |
|
35 help="prompt to accept changed output") |
|
36 parser.add_option("-R", "--restart", action="store_true", |
|
37 help="restart at last error") |
|
38 parser.add_option("-r", "--retest", action="store_true", |
|
39 help="retest failed tests") |
|
40 parser.add_option("-s", "--cover_stdlib", action="store_true", |
|
41 help="print a test coverage report inc. standard libraries") |
|
42 parser.add_option("-t", "--timeout", type="int", |
|
43 help="kill errant tests after TIMEOUT seconds") |
28 parser.add_option("-v", "--verbose", action="store_true", |
44 parser.add_option("-v", "--verbose", action="store_true", |
29 help="output verbose messages") |
45 help="output verbose messages") |
30 parser.add_option("-t", "--timeout", type="int", |
|
31 help="kill errant tests after TIMEOUT seconds") |
|
32 parser.add_option("-c", "--cover", action="store_true", |
|
33 help="print a test coverage report") |
|
34 parser.add_option("-s", "--cover_stdlib", action="store_true", |
|
35 help="print a test coverage report inc. standard libraries") |
|
36 parser.add_option("-C", "--annotate", action="store_true", |
|
37 help="output files annotated with coverage") |
|
38 parser.add_option("-r", "--retest", action="store_true", |
|
39 help="retest failed tests") |
|
40 parser.add_option("-f", "--first", action="store_true", |
|
41 help="exit on the first test failure") |
|
42 parser.add_option("-R", "--restart", action="store_true", |
|
43 help="restart at last error") |
|
44 parser.add_option("-i", "--interactive", action="store_true", |
|
45 help="prompt to accept changed output") |
|
46 |
46 |
47 parser.set_defaults(timeout=180) |
47 parser.set_defaults(timeout=180) |
48 (options, args) = parser.parse_args() |
48 (options, args) = parser.parse_args() |
49 verbose = options.verbose |
49 verbose = options.verbose |
50 coverage = options.cover or options.cover_stdlib or options.annotate |
50 coverage = options.cover or options.cover_stdlib or options.annotate |