◐ Shell
clean mode source ↗

libregrtest from 3.14.2 by youknowone · Pull Request #6818 · RustPython/RustPython

Expand Up @@ -44,11 +44,19 @@ doing memory analysis on the Python interpreter, which process tends to consume too many resources to run the full regression test non-stop.
-S is used to continue running tests after an aborted run. It will maintain the order a standard run (ie, this assumes -r is not used). -S is used to resume running tests after an interrupted run. It will maintain the order a standard run (i.e. it assumes -r is not used). This is useful after the tests have prematurely stopped for some external reason and you want to start running from where you left off rather than starting from the beginning. reason and you want to resume the run from where you left off rather than starting from the beginning. Note: this is different from --prioritize.
--prioritize is used to influence the order of selected tests, such that the tests listed as an argument are executed first. This is especially useful when combined with -j and -r to pin the longest-running tests to start at the beginning of a test run. Pass --prioritize=test_a,test_b to make test_a run first, followed by test_b, and then the other tests. If test_a wasn't selected for execution by regular means, --prioritize will not make it execute.
-f reads the names of tests from the file given as f's argument, one or more test names per line. Whitespace is ignored. Blank lines and Expand Down Expand Up @@ -87,38 +95,40 @@ The argument is a comma-separated list of words indicating the resources to test. Currently only the following are defined:
all - Enable all special resources. all - Enable all special resources.
none - Disable all special resources (this is the default).
none - Disable all special resources (this is the default). audio - Tests that use the audio device. (There are known cases of broken audio drivers that can crash Python or even the Linux kernel.)
audio - Tests that use the audio device. (There are known cases of broken audio drivers that can crash Python or even the Linux kernel.) curses - Tests that use curses and will modify the terminal's state and output modes.
curses - Tests that use curses and will modify the terminal's state and output modes. largefile - It is okay to run some test that may create huge files. These tests can take a long time and may consume >2 GiB of disk space temporarily.
largefile - It is okay to run some test that may create huge files. These tests can take a long time and may consume >2 GiB of disk space temporarily. extralargefile - Like 'largefile', but even larger (and slower).
network - It is okay to run tests that use external network resource, e.g. testing SSL support for sockets. network - It is okay to run tests that use external network resource, e.g. testing SSL support for sockets.
decimal - Test the decimal module against a large suite that verifies compliance with standards. decimal - Test the decimal module against a large suite that verifies compliance with standards.
cpu - Used for certain CPU-heavy tests. cpu - Used for certain CPU-heavy tests.
walltime - Long running but not CPU-bound tests. walltime - Long running but not CPU-bound tests.
subprocess Run all tests for the subprocess module. subprocess Run all tests for the subprocess module.
urlfetch - It is okay to download files required on testing. urlfetch - It is okay to download files required on testing.
gui - Run tests that require a running GUI. gui - Run tests that require a running GUI.
tzdata - Run tests that require timezone data. tzdata - Run tests that require timezone data.
To enable all resources except one, use '-uall,-<resource>'. For example, to run all the tests except for the gui tests, give the Expand Down Expand Up @@ -158,13 +168,15 @@ def __init__(self, **kwargs) -> None: self.print_slow = False self.random_seed = None self.use_mp = None self.parallel_threads = None self.forever = False self.header = False self.failfast = False self.match_tests: TestFilter = [] self.pgo = False self.pgo_extended = False self.tsan = False self.tsan_parallel = False self.worker_json = None self.start = None self.timeout = None Expand Down Expand Up @@ -232,7 +244,7 @@ def _create_parser(): help='wait for user input, e.g., allow a debugger ' 'to be attached') group.add_argument('-S', '--start', metavar='START', help='the name of the test at which to start.' + help='resume an interrupted run at the following test.' + more_details) group.add_argument('-p', '--python', metavar='PYTHON', help='Command to run Python test subprocesses with.') Expand Down Expand Up @@ -262,6 +274,10 @@ def _create_parser(): group.add_argument('--no-randomize', dest='no_randomize', action='store_true', help='do not randomize test execution order, even if ' 'it would be implied by another option') group.add_argument('--prioritize', metavar='TEST1,TEST2,...', action='append', type=priority_list, help='select these tests first, even if the order is' ' randomized.' + more_details) group.add_argument('-f', '--fromfile', metavar='FILE', help='read names of tests to run from a file.' + more_details) Expand Down Expand Up @@ -317,6 +333,10 @@ def _create_parser(): 'a single process, ignore -jN option, ' 'and failed tests are also rerun sequentially ' 'in the same process') group.add_argument('--parallel-threads', metavar='PARALLEL_THREADS', type=int, help='run copies of each test in PARALLEL_THREADS at ' 'once') group.add_argument('-T', '--coverage', action='store_true', dest='trace', help='turn on code coverage tracing using the trace ' Expand Down Expand Up @@ -347,6 +367,9 @@ def _create_parser(): help='enable extended PGO training (slower training)') group.add_argument('--tsan', dest='tsan', action='store_true', help='run a subset of test cases that are proper for the TSAN test') group.add_argument('--tsan-parallel', action='store_true', help='run a subset of test cases that are appropriate ' 'for TSAN with `--parallel-threads=N`') group.add_argument('--fail-env-changed', action='store_true', help='if a test file alters the environment, mark ' 'the test as failed') Expand Down Expand Up @@ -398,6 +421,10 @@ def resources_list(string): return u

def priority_list(string): return string.split(",")

def _parse_args(args, **kwargs): # Defaults ns = Namespace() Expand Down Expand Up @@ -549,4 +576,10 @@ def _parse_args(args, **kwargs): print(msg, file=sys.stderr, flush=True) sys.exit(2)
ns.prioritize = [ test for test_list in (ns.prioritize or ()) for test in test_list ]
return ns