Index: Lib/test/regrtest.py =================================================================== --- Lib/test/regrtest.py (revision 80154) +++ Lib/test/regrtest.py (working copy) @@ -1,11 +1,14 @@ #! /usr/bin/env python -"""Regression test. +"""Regression test runner. -This will find all modules whose name is "test_*" in the test -directory, and run them. Various command line options provide -additional facilities. +Usage: 1. python regrtest.py [options] [test_name1] ... + 2. python -m test.regrtest [options] [test_name1] ... + +Without arguments finds all modules whose name is "test_*" in the test +directory, and runs them. + Command line options: -h/--help -- print this text and exit @@ -20,7 +23,7 @@ Selecting tests --r/--random -- randomize test execution order +-r/--random -- randomize test execution order (see below) -f/--fromfile -- read names of tests to run from a file (see below) -x/--exclude -- arguments are tests to *exclude* -s/--single -- run only a single test (see below) @@ -45,28 +48,20 @@ -- call gc.set_threshold(THRESHOLD) -F/--forever -- run the selected tests in a loop, until an error happens -If non-option arguments are present, they are names for tests to run, -unless -x is given, in which case they are names for tests not to run. -If no test names are given, all tests are run. +Test names to execute are specified in 'test_name' format as positional +arguments on command line. If -x is given, they name tests to skip. -r randomizes test execution order. You can use --randseed=int to provide a int seed value for the randomizer; this is useful for reproducing troublesome test orders. --T turns on code coverage tracing with the trace module. +-s runs a single test and exits. This is useful for memory analysis on +the Python interpreter (which tend to consume too many resources to run +the full regression test non-stop). The name of test to run is read from +/tmp/pynexttest (actually it is not /tmp, but tempfile.gettempdir()). If +pynexttest is absent, the first test_*.py from command line or from testdir +is used. --D specifies the directory where coverage files are put. - --N Put coverage files alongside modules. - --s means to run only a single test and exit. This is useful when -doing memory analysis on the Python interpreter (which tend to consume -too many resources to run the full regression test non-stop). The -file /tmp/pynexttest is read to find the next test to run. If this -file is missing, the first test_*.py file in testdir or on the command -line is used. (actually tempfile.gettempdir() is used instead of -/tmp). - -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 lines beginning with '#' are ignored. This is especially useful for