# HG changeset patch # Parent a8aee5a15b7b694d8d159151aaf813ebf9748a67 diff -r a8aee5a15b7b Lib/test/regrtest.py --- a/Lib/test/regrtest.py Tue Apr 06 12:36:51 2010 +0300 +++ b/Lib/test/regrtest.py Tue Apr 06 13:34:10 2010 +0300 @@ -1,10 +1,13 @@ #! /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: @@ -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,27 +48,19 @@ -- 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 +argumets 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. - --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). +-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. -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