summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_regrtest.py
Commit message (Collapse)AuthorAgeFilesLines
* bpo-38912: regrtest logs unraisable exception into sys.__stderr__ (GH-21718)Victor Stinner2020-08-031-4/+9
| | | | regrtest_unraisable_hook() temporarily replaces sys.stderr with sys.__stderr__ to help to display errors when a test captures stderr.
* bpo-40275: Use new test.support helper submodules in tests (GH-21219)Hai Shi2020-06-301-17/+18
|
* bpo-41043: Escape literal part of the path for glob(). (GH-20994)Serhiy Storchaka2020-06-201-1/+1
|
* bpo-40443: Remove unused imports in tests (GH-19805)Victor Stinner2020-04-291-1/+0
|
* bpo-37957: Allow regrtest to receive a file with test (and subtests) to ↵Pablo Galindo2019-11-191-0/+54
| | | | | | | ignore (GH-16989) When building Python in some uncommon platforms there are some known tests that will fail. Right now, the test suite has the ability to ignore entire tests using the -x option and to receive a filter file using the --matchfile filter. The problem with the --matchfile option is that it receives a file with patterns to accept and when you want to ignore a couple of tests and subtests, is too cumbersome to lists ALL tests that are not the ones that you want to accept and he problem with -x is that is not easy to ignore just a subtests that fail and the whole test needs to be ignored. For these reasons, add a new option to allow to ignore a list of test and subtests for these situations.
* bpo-37531: regrtest ignores output on timeout (GH-16659)Victor Stinner2019-10-081-1/+0
| | | | | | | | | | | bpo-37531, bpo-38207: On timeout, regrtest no longer attempts to call `popen.communicate() again: it can hang until all child processes using stdout and stderr pipes completes. Kill the worker process and ignores its output. Reenable test_regrtest.test_multiprocessing_timeout(). bpo-37531: Change also the faulthandler timeout of the main process from 1 minute to 5 minutes, for Python slowest buildbots.
* bpo-36670: Enhance regrtest (GH-16556)Victor Stinner2019-10-031-6/+8
| | | | | | | | | | | | | | * Add log() method: add timestamp and load average prefixes to main messages. * WindowsLoadTracker: * LOAD_FACTOR_1 is now computed using SAMPLING_INTERVAL * Initialize the load to the arithmetic mean of the first 5 values of the Processor Queue Length value (so over 5 seconds), rather than 0.0. * Handle BrokenPipeError and when typeperf exit. * format_duration(1.5) now returns '1.5 sec', rather than '1 sec 500 ms'
* bpo-37531: Skip test_regrtest.test_multiprocessing_timeout() on all ↵Victor Stinner2019-09-191-2/+1
| | | | platforms (GH-16282)
* bpo-38203: faulthandler.dump_traceback_later() is always available (GH-16249)Victor Stinner2019-09-181-4/+1
| | | | dump_traceback_later() and cancel_dump_traceback_later() functions of the faulthandler module are always available since Python 3.7.
* bpo-37531: Skip test_regrtest.test_multiprocessing_timeout() on Windows ↵Victor Stinner2019-09-171-0/+2
| | | | | (GH-16247) It is a known and tracked bug: disable the test until it's fixed.
* bpo-37531: Fix regrtest timeout for subprocesses (GH-15072)Victor Stinner2019-08-141-0/+27
| | | Co-Authored-By: Joannah Nanjekye <joannah.nanjekye@ibm.com>
* bpo-37667: Add regression test for regrtest. (GH-14929)Gregory P. Smith2019-07-241-0/+26
| | | Verify that it appears to find roughly the right number of tests in the stdlib's testsuite.
* bpo-37359: Add --cleanup option to python3 -m test (GH-14332)Victor Stinner2019-06-241-0/+15
| | | | | * regrtest: Add --cleanup option to remove "test_python_*" directories of previous failed test jobs. * Add "make cleantest" to run "python3 -m test --cleanup".
* bpo-36511: Add buildbot scripts and fix tests for Windows ARM32 buildbot ↵Paul Monson2019-06-191-0/+4
| | | | (GH-13454)
* bpo-37069: regrtest uses sys.unraisablehook (GH-13759)Victor Stinner2019-06-121-1/+29
| | | | | | | | regrtest now uses sys.unraisablehook() to mark a test as "environment altered" (ENV_CHANGED) if it emits an "unraisable exception". Moreover, regrtest logs a warning in this case. Use "python3 -m test --fail-env-changed" to catch unraisable exceptions in tests.
* bpo-37181: Fix test_regrtest failures on Windows arm64 (GH-13872)Paul Monson2019-06-071-2/+6
|
* bpo-36719: Fix regrtest re-run (GH-12964)Victor Stinner2019-04-261-1/+22
| | | | | Properly handle a test which fail but then pass. Add test_rerun_success() unit test.
* bpo-36719: regrtest always detect uncollectable objects (GH-12951)Victor Stinner2019-04-261-6/+35
| | | | | | | regrtest now always detects uncollectable objects. Previously, the check was only enabled by --findleaks. The check now also works with -jN/--multiprocess N. --findleaks becomes a deprecated alias to --fail-env-changed.
* bpo-36725: Refactor regrtest multiprocessing code (GH-12961)Victor Stinner2019-04-261-2/+2
| | | | | | | | | | | | | | | | Rewrite run_tests_multiprocess() function as a new MultiprocessRunner class with multiple methods to better report errors and stop immediately when needed. Changes: * Worker processes are now killed immediately if tests are interrupted or if a test does crash (CHILD_ERROR): worker processes are killed. * Rewrite how errors in a worker thread are reported to the main thread. No longer ignore BaseException or parsing errors silently. * Remove 'finished' variable: use worker.is_alive() instead * Always compute omitted tests. Add Regrtest.get_executed() method.
* bpo-36725: regrtest: add TestResult type (GH-12960)Victor Stinner2019-04-261-13/+15
| | | | | | | | | | | | | | | * Add TestResult and MultiprocessResult types to ensure that results always have the same fields. * runtest() now handles KeyboardInterrupt * accumulate_result() and format_test_result() now takes a TestResult * cleanup_test_droppings() is now called by runtest() and mark the test as ENV_CHANGED if the test leaks support.TESTFN file. * runtest() now includes code "around" the test in the test timing * Add print_warning() in test.libregrtest.utils to standardize how libregrtest logs warnings to ease parsing the test output. * support.unload() is now called with abstest rather than test_name * Rename 'test' variable/parameter to 'test_name' * dash_R(): remove unused the_module parameter * Remove unused imports
* bpo-36465: Fix test_regrtest on Windows (GH-12945)Victor Stinner2019-04-241-1/+1
| | | | | | Fix Py_DEBUG constant: check for sys.gettotalrefcount attribute rather than sys.getobjects. Update also SpecialBuilds.txt documentation.
* bpo-35568: add 'raise_signal' function (GH-11335)Vladimir Matveev2019-01-081-2/+1
| | | | | | As in title, expose C `raise` function as `raise_function` in `signal` module. Also drop existing `raise_signal` in `_testcapi` module and replace all usages with new function. https://bugs.python.org/issue35568
* bpo-34279: regrtest consider that skipped tests are ran (GH-11132)Victor Stinner2018-12-141-0/+14
| | | | | | bpo-34279, bpo-35412: support.run_unittest() no longer raises TestDidNotRun if a test result contains skipped tests. The exception is now only raised if no test have been run and no test have been skipped.
* bpo-34279, regrtest: Issue a warning if no tests have been executed (GH-10150)Pablo Galindo2018-11-291-5/+81
|
* bpo-35202: Remove unused imports in Lib directory (GH-10450)Srinivas Thatiparthy (శ్రీనివాస్ తాటిపర్తి)2018-11-151-1/+0
|
* bpo-34605, libregrtest: Rename --slaveargs to --worker-args (GH-9099)Victor Stinner2018-09-071-4/+4
| | | Rename also run_tests_slave() to run_tests_worker().
* bpo-33718: regrtest: use format_duration() to display failed tests (GH-7686)Victor Stinner2018-06-141-0/+25
| | | | | * Enhance also format_duration(): work on integers and rounds towards +infinity (math.ceil). * Write unit tests on format_duration()
* bpo-33718: regrtest: use "xxx then yyy" result if re-run (GH-7521)Victor Stinner2018-06-081-6/+37
| | | | | | If tests are re-run, use "xxx then yyy" result format (ex: "FAILURE then SUCCESS") to show that some failing tests have been re-run. Add also test_regrtest.test_rerun_fail() test.
* bpo-33352: Skip test_regrtest test if rt.bat does not exist (GH-6654)Andrés Delfino2018-04-301-0/+2
|
* bpo-31370: Remove support for threads-less builds (#3385)Antoine Pitrou2017-09-071-6/+2
| | | | | | * Remove Setup.config * Always define WITH_THREAD for compatibility.
* bpo-31009: Fix support.fd_count() on Windows (#2862)Victor Stinner2017-07-251-13/+1
| | | | | | | | | | * bpo-31009: Fix support.fd_count() on Windows On Windows, test.support.fd_count() now calls msvcrt.CrtSetReportMode() to not kill the process nor log any error on stderr on os.dup(fd) if the file descriptor is invalid. * Fix for release mode
* bpo-30822: Exclude tzdata from regrtest --all (#2775)Victor Stinner2017-07-201-1/+12
| | | | | | | | | | | | | When running the test suite using --use=all / -u all, exclude tzdata since it makes test_datetime too slow (15-20 min on some buildbots) which then times out on some buildbots. -u tzdata must now be enabled explicitly, -u tzdata or -u all,tzdata, to run all test_datetime tests. Fix also regrtest command line parser to allow passing -u extralargefile to run test_zipfile64. Travis CI: remove -tzdata. Replace -u all,-tzdata,-cpu with -u all,-cpu since tzdata is now excluded from -u all.
* bpo-30776: reduce regrtest -R false positives (#2422)Victor Stinner2017-06-271-18/+35
| | | | | | | | | | | | | | * Change the regrtest --huntrleaks checker to decide if a test file leaks or not. Require that each run leaks at least 1 reference. * Warmup runs are now completely ignored: ignored in the checker test and not used anymore to compute the sum. * Add an unit test for a reference leak. Example of reference differences previously considered a failure (leak) and now considered as success (success, no leak): [3, 0, 0] [0, 1, 0] [8, -8, 1]
* bpo-30764: regrtest: add --fail-env-changed option (#2402)Victor Stinner2017-06-261-13/+40
| | | | | | | | | | | | * bpo-30764: regrtest: change exit code on failure * Exit code 2 if failed tests ("bad") * Exit code 3 if interrupted * bpo-30764: regrtest: add --fail-env-changed option If the option is set, mark a test as failed if it alters the environment, for example if it creates a file without removing it.
* bpo-30523: regrtest --list-cases --match (#2401)Victor Stinner2017-06-261-0/+9
| | | | | | | * regrtest --list-cases now supports --match and --match-file options. Example: ./python -m test --list-cases -m FileTests test_os * --list-cases now also sets support.verbose to False to prevent messages to stdout when loading test modules. * Add support._match_test() private function.
* bpo-30523: Add --list-cases unittest (#2243)Louie Lu2017-06-161-1/+17
| | | | | | | | * bpo-30523: Add --list-cases unittest * Addressed haypo's request * Addressed haypo's request
* bpo-30540: regrtest: add --matchfile option (#1909)Victor Stinner2017-06-091-3/+62
| | | | | | | | | | | | | | | * Add a new option taking a filename to get a list of test names to filter tests. * support.match_tests becomes a list. * Modify run_unittest() to accept to match the whole test identifier, not just a part of a test identifier. For example, the following command only runs test_default_timeout() of the BarrierTests class of test_threading: $ ./python -m test -v test_threading -m test.test_threading.BarrierTests.test_default_timeout Remove also some empty lines from test_regrtest.py to make flake8 tool happy.
* bpo-30263: regrtest: log system load (#1452)Victor Stinner2017-05-041-1/+4
| | | | | | | | * bpo-30263: regrtest: log system load * regrtest: log the number of CPUs Log the number of CPUs in the header. --verbose now imply --header.
* regrtest: don't fail immediately if a child does crashVictor Stinner2017-02-061-1/+12
| | | | | | Issue #29362: Catch a crash of a worker process as a normal failure and continue to run next tests. It allows to get the usual test summary: single line result (OK/FAIL), total duration, etc.
* Issue #29035: Simplify a regex in libregrtestVictor Stinner2017-01-031-0/+8
| | | | | regrtest: simplify the regex used to match test names for the --fromfile command line option.
* Issue #28950: Disallow -j0 combined with -T/-l in regrtest.Xiang Zhang2016-12-191-0/+2
|\
| * Issue #28950: Disallow -j0 combined with -T/-l/-M in regrtest.Xiang Zhang2016-12-191-0/+3
| |
* | Issue #28484: Skip tests if GIL is not used or multithreading is disabledMartin Panter2016-10-201-1/+6
| |
* | Merge 3.6: Issue #28409: regrtest: fix the parser of command line arguments.Victor Stinner2016-10-171-0/+9
|\ \ | |/
| * Issue #28409: regrtest: fix the parser of command line arguments.Victor Stinner2016-10-171-0/+10
| |
* | Fix test_huntrleaks_fd_leak() of test_regrtestVictor Stinner2016-09-181-5/+2
| | | | | | | | | | Issue #28195: Don't expect the fd leak message to be on a specific line number, just make sure that the line is present in the output.
* | #27364: fix "incorrect" uses of escape character in the stdlib.R David Murray2016-09-081-2/+2
| | | | | | | | | | | | | | And most of the tools. Patch by Emanual Barry, reviewed by me, Serhiy Storchaka, and Martin Panter.
* | regrtest: replace "Result:" with "Tests result:"Victor Stinner2016-08-191-1/+1
| |
* | regrtest: add a summary of the summary, "Result: xxx"Victor Stinner2016-08-171-4/+17
| | | | | | | | | | | | | | It's sometimes hard to check quickly if tests succeeded, failed or something bad happened. I added a final "Result: xxx" line which summarizes all outputs into a single line, written at the end (it should always be the last line of the output).
* | regrtest: nicer output for durationsVictor Stinner2016-08-171-2/+2
| | | | | | | | Use milliseconds and minutes units, not only seconds.