From 31c7a61f9d4ccf3ea44c0ddea084a82afa632c59 Mon Sep 17 00:00:00 2001 From: Matt Clay Date: Mon, 5 Aug 2019 13:29:50 -0700 Subject: [PATCH] Clean up old ansible-test references and code. (#60103) * Remove obsolete ansible-test retry.py. * Use ansible-test from bin/ intead of test/runner/. --- docs/bin/testing_formatter.sh | 2 +- test/runner/retry.py | 118 --------------------------------- test/utils/dci/dci-coverage.sh | 2 +- 3 files changed, 2 insertions(+), 120 deletions(-) delete mode 100755 test/runner/retry.py diff --git a/docs/bin/testing_formatter.sh b/docs/bin/testing_formatter.sh index 4f18d0891b..8db81bf030 100755 --- a/docs/bin/testing_formatter.sh +++ b/docs/bin/testing_formatter.sh @@ -16,7 +16,7 @@ For information on how to run these tests, see :ref:\`sanity testing guide 0: - time.sleep(args.sleep) - - try: - raw_command(command, env=os.environ) - return - except SubprocessError as ex: - display.error(ex) - except ApplicationWarning as ex: - display.warning(str(ex)) - exit(0) - except ApplicationError as ex: - display.error(str(ex)) - exit(1) - except KeyboardInterrupt: - exit(2) - except IOError as ex: - if ex.errno == errno.EPIPE: - exit(3) - raise - - -def parse_args(): - """Parse command line arguments.""" - parser = argparse.ArgumentParser() - - parser.add_argument('-v', '--verbose', - dest='verbosity', - action='count', - default=0, - help='display more output') - - parser.add_argument('--color', - metavar='COLOR', - nargs='?', - help='generate color output: %(choices)s', - choices=('yes', 'no', 'auto'), - const='yes', - default='auto') - - # noinspection PyTypeChecker - parser.add_argument('--tries', - metavar='TRIES', - type=int, - default=3, - help='number of tries to execute command (default: %(default)s)') - - # noinspection PyTypeChecker - parser.add_argument('--sleep', - metavar='SECONDS', - type=int, - default=3, - help='seconds to sleep between tries (default: %(default)s)') - - parser.add_argument('command', - help='command to execute') - - parser.add_argument('args', - metavar='...', - nargs=argparse.REMAINDER, - help='optional arguments for command') - - if argcomplete: - argcomplete.autocomplete(parser) - - args = parser.parse_args() - - if args.color == 'yes': - args.color = True - elif args.color == 'no': - args.color = False - elif 'SHIPPABLE' in os.environ: - args.color = True - else: - args.color = sys.stdout.isatty() - - return args - - -if __name__ == '__main__': - main() diff --git a/test/utils/dci/dci-coverage.sh b/test/utils/dci/dci-coverage.sh index 249844eb36..42eba4554b 100755 --- a/test/utils/dci/dci-coverage.sh +++ b/test/utils/dci/dci-coverage.sh @@ -9,7 +9,7 @@ if find test/results/coverage/ -mindepth 1 -name '.*' -prune -o -print -quit | g stub="" # shellcheck disable=SC2086 - test/runner/ansible-test coverage xml -v --requirements --group-by command --group-by version ${stub:+"$stub"} + bin/ansible-test coverage xml -v --requirements --group-by command --group-by version ${stub:+"$stub"} # upload coverage report to codecov.io for file in test/results/reports/coverage=*.xml; do