Changeset View
Changeset View
Standalone View
Standalone View
test/functional/test_runner.py
Show First 20 Lines • Show All 147 Lines • ▼ Show 20 Lines | parser = argparse.ArgumentParser(add_help=False, | ||||
usage='%(prog)s [test_runner.py options] [script options] [scripts]', | usage='%(prog)s [test_runner.py options] [script options] [scripts]', | ||||
description=__doc__, | description=__doc__, | ||||
epilog=''' | epilog=''' | ||||
Help text and arguments for individual test script:''', | Help text and arguments for individual test script:''', | ||||
formatter_class=argparse.RawTextHelpFormatter) | formatter_class=argparse.RawTextHelpFormatter) | ||||
parser.add_argument('--coverage', action='store_true', | parser.add_argument('--coverage', action='store_true', | ||||
help='generate a basic coverage report for the RPC interface') | help='generate a basic coverage report for the RPC interface') | ||||
parser.add_argument( | parser.add_argument( | ||||
'--exclude', '-x', help='specify a comma-seperated-list of scripts to exclude. Do not include the .py extension in the name.') | '--exclude', '-x', help='specify a comma-separated-list of scripts to exclude. Do not include the .py extension in the name.') | ||||
parser.add_argument('--extended', action='store_true', | parser.add_argument('--extended', action='store_true', | ||||
help='run the extended test suite in addition to the basic tests') | help='run the extended test suite in addition to the basic tests') | ||||
parser.add_argument('--cutoff', type=int, default=DEFAULT_EXTENDED_CUTOFF, | parser.add_argument('--cutoff', type=int, default=DEFAULT_EXTENDED_CUTOFF, | ||||
help='set the cutoff runtime for what tests get run') | help='set the cutoff runtime for what tests get run') | ||||
parser.add_argument('--force', '-f', action='store_true', | parser.add_argument('--force', '-f', action='store_true', | ||||
help='run tests even on platforms where they are disabled by default (e.g. windows).') | help='run tests even on platforms where they are disabled by default (e.g. windows).') | ||||
parser.add_argument('--help', '-h', '-?', | parser.add_argument('--help', '-h', '-?', | ||||
action='store_true', help='print help text and exit') | action='store_true', help='print help text and exit') | ||||
parser.add_argument('--jobs', '-j', type=int, default=DEFAULT_JOBS, | parser.add_argument('--jobs', '-j', type=int, default=DEFAULT_JOBS, | ||||
help='how many test scripts to run in parallel. Default=4.') | help='how many test scripts to run in parallel. Default=4.') | ||||
parser.add_argument('--keepcache', '-k', action='store_true', | parser.add_argument('--keepcache', '-k', action='store_true', | ||||
help='the default behavior is to flush the cache directory on startup. --keepcache retains the cache from the previous testrun.') | help='the default behavior is to flush the cache directory on startup. --keepcache retains the cache from the previous testrun.') | ||||
parser.add_argument('--quiet', '-q', action='store_true', | parser.add_argument('--quiet', '-q', action='store_true', | ||||
help='only print results summary and failure logs') | help='only print results summary and failure logs') | ||||
parser.add_argument('--tmpdirprefix', '-t', | parser.add_argument('--tmpdirprefix', '-t', | ||||
default=tempfile.gettempdir(), help="Root directory for datadirs") | default=tempfile.gettempdir(), help="Root directory for datadirs") | ||||
parser.add_argument('--junitouput', '-ju', | parser.add_argument('--junitouput', '-ju', | ||||
default=os.path.join(build_dir, 'junit_results.xml'), help="file that will store JUnit formated test results.") | default=os.path.join(build_dir, 'junit_results.xml'), help="file that will store JUnit formatted test results.") | ||||
args, unknown_args = parser.parse_known_args() | args, unknown_args = parser.parse_known_args() | ||||
# Create a set to store arguments and create the passon string | # Create a set to store arguments and create the passon string | ||||
tests = set(arg for arg in unknown_args if arg[:2] != "--") | tests = set(arg for arg in unknown_args if arg[:2] != "--") | ||||
passon_args = [arg for arg in unknown_args if arg[:2] == "--"] | passon_args = [arg for arg in unknown_args if arg[:2] == "--"] | ||||
passon_args.append("--configfile={}".format(configfile)) | passon_args.append("--configfile={}".format(configfile)) | ||||
▲ Show 20 Lines • Show All 551 Lines • Show Last 20 Lines |