Use lint/junit output for compile test. (#22395)

* Refactor sanity classes for use in all tests.
* Use lint/junit output for compile test.
* Add missing options for compile test.
* Fix early bailout on requirements install.
This commit is contained in:
Matt Clay 2017-03-08 00:47:21 -08:00 committed by GitHub
commit 3ab344e8bd
6 changed files with 489 additions and 321 deletions

View file

@ -260,6 +260,7 @@ def parse_args():
choices=COMPILE_PYTHON_VERSIONS,
help='python version: %s' % ', '.join(COMPILE_PYTHON_VERSIONS))
add_lint(compiler)
add_extra_docker_options(compiler, integration=False)
sanity = subparsers.add_parser('sanity',
@ -286,14 +287,6 @@ def parse_args():
action='store_true',
help='list available tests')
sanity.add_argument('--lint',
action='store_true',
help='write lint output to stdout, everything else stderr')
sanity.add_argument('--junit',
action='store_true',
help='write test failures to junit xml files')
sanity.add_argument('--python',
metavar='VERSION',
choices=SUPPORTED_PYTHON_VERSIONS,
@ -302,6 +295,7 @@ def parse_args():
sanity.add_argument('--base-branch',
help=argparse.SUPPRESS)
add_lint(sanity)
add_extra_docker_options(sanity, integration=False)
shell = subparsers.add_parser('shell',
@ -377,6 +371,19 @@ def parse_args():
return args
def add_lint(parser):
"""
:type parser: argparse.ArgumentParser
"""
parser.add_argument('--lint',
action='store_true',
help='write lint output to stdout, everything else stderr')
parser.add_argument('--junit',
action='store_true',
help='write test failures to junit xml files')
def add_changes(parser, argparse):
"""
:type parser: argparse.ArgumentParser