summaryrefslogtreecommitdiffstats
path: root/Lib/test/libregrtest
Commit message (Collapse)AuthorAgeFilesLines
* bpo-32226: PEP 560: improve typing module (#4906)Ivan Levkivskyi2018-01-201-5/+0
| | | | This PR re-designs the internal typing API using the new PEP 560 features. However, there are only few minor changes in the public API.
* bpo-31324: Optimize support._match_test() (#4421)Victor Stinner2017-11-212-3/+3
| | | | | | | | | | | * Rename support._match_test() to support.match_test(): make it public * Remove support.match_tests global variable. It is replaced with a new support.set_match_tests() function, so match_test() doesn't have to check each time if patterns were modified. * Rewrite match_test(): use different code paths depending on the kind of patterns for best performances. Co-Authored-By: Serhiy Storchaka <storchaka@gmail.com>
* Replace KB unit with KiB (#4293)Victor Stinner2017-11-081-1/+1
| | | | | | | | | | | kB (*kilo* byte) unit means 1000 bytes, whereas KiB ("kibibyte") means 1024 bytes. KB was misused: replace kB or KB with KiB when appropriate. Same change for MB and GB which become MiB and GiB. Change the output of Tools/iobench/iobench.py. Round also the size of the documentation from 5.5 MB to 5 MiB.
* bpo-25588: Fix regrtest when run inside IDLE (#3962)Victor Stinner2017-10-131-12/+31
| | | | | | | When regrtest in run inside IDLE, sys.stdout and sys.stderr are not TextIOWrapper objects and have no file descriptor associated: sys.stderr.fileno() raises io.UnsupportedOperation. Disable faulthandler and don't replace sys.stdout in that case.
* bpo-31370: Remove support for threads-less builds (#3385)Antoine Pitrou2017-09-072-13/+2
| | | | | | * Remove Setup.config * Always define WITH_THREAD for compatibility.
* bpo-31217: Fix regrtest -R for small integer (#3260)Victor Stinner2017-09-011-3/+11
| | | | | | | | Use a pool of integer objects toprevent false alarm when checking for memory block leaks. Fill the pool with values in -1000..1000 which are the most common (reference, memory block, file descriptor) differences. Co-Authored-By: Antoine Pitrou <pitrou@free.fr>
* bpo-30871: Add test.pythoninfo (#3075)Victor Stinner2017-08-171-3/+0
| | | | | | * Add Lib/test/pythoninfo.py: script collecting various informations about Python to help debugging test failures. * regrtest: remove sys.hash_info and sys.flags from header. * Travis CI, Appveyor: run pythoninfo before tests
* regrtest: count also env changed as failures in progress (#3061)Victor Stinner2017-08-101-2/+3
|
* bpo-31160: regrtest now reaps child processes (#3044)Victor Stinner2017-08-091-0/+5
| | | | Add a post_test_cleanup() function which currently only calls support.reap_children().
* bpo-26732: fix too many fds in processes started with the "forkserver" ↵Antoine Pitrou2017-07-221-31/+1
| | | | | | | | | | method (#2813) * bpo-26732: fix too many fds in processes started with the "forkserver" method A child process would inherit as many fds as the number of still-running children. * Add blurb and test comment
* bpo-30822: Exclude tzdata from regrtest --all (#2775)Victor Stinner2017-07-202-4/+13
| | | | | | | | | | | | | 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-30764: Fix regrtest --fail-env-changed --forever (#2536)Victor Stinner2017-07-031-1/+3
| | | --forever now stops if a fail changes the environment.
* threading_cleanup() failure marks test as ENV_CHANGED (#2500)Victor Stinner2017-06-302-1/+10
| | | | | | | If threading_cleanup() fails to cleanup threads, set a a new support.environment_altered flag to true, flag uses by save_env which is used by regrtest to check if a test altered the environment. At the end, the test file fails with ENV_CHANGED instead of SUCCESS, to report that it altered the environment.
* bpo-30776: regrtest: reduce memleak false positive (#2484)Victor Stinner2017-06-291-10/+3
| | | Only report a leak if each run leaks at least one memory block.
* bpo-30776: reduce regrtest -R false positives (#2422)Victor Stinner2017-06-271-3/+22
| | | | | | | | | | | | | | * 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-262-1/+12
| | | | | | | | | | | | * 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-1/+5
| | | | | | | * 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: regrtest: Add --list-cases option (#2238)mlouielu2017-06-163-8/+44
| | | | | | | | | | | * bpo-30523: regrtest: Add --list-cases option * bpo-30523: Enhance --list-cases * Add get_abs_module() function, use it in list_cases() * list_cases() now logs skipped tests into stderr * Remove unused doctest
* bpo-30284: Fix regrtest for out of tree build (#1481)Victor Stinner2017-06-141-1/+7
| | | | | | | | Use a build/ directory in the build directory, not in the source directory, since the source directory may be read-only and must not be modified. Fallback on the source directory if the build directory is not available (missing "abs_builddir" sysconfig variable).
* bpo-30540: regrtest: add --matchfile option (#1909)Victor Stinner2017-06-091-1/+19
| | | | | | | | | | | | | | | * 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-27103: regrtest disables -W if -R is used (#1651)Victor Stinner2017-05-181-0/+5
| | | Workaround for a regrtest bug.
* bpo-30258: regrtest: Fix run_tests_multiprocess() (#1479)Victor Stinner2017-05-092-1/+3
| | | | | | If the child process exited with a non-zero code, don't strip the last line of stdout anymore. Add also a sanity check in accumulate_result().
* bpo-30263: regrtest: log system load (#1452)Victor Stinner2017-05-042-24/+35
| | | | | | | | * 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: always show before/after of modified env (#1192)Victor Stinner2017-04-191-3/+2
| | | | | | | | Buildbots don't run tests with -vv and so only log "xxx was modified by test_xxx" which is not enough to debug such random issue. In many cases, I'm unable to reproduce the warning and so unable to fix it. Always logging the value before and value after should help to debug such warning on buildbots.
* bpo-29638: Fix spurious refleaks after typing is imported (#469)Ivan Levkivskyi2017-03-051-3/+8
|
* Fix regrtest -j0 -R outputVictor Stinner2017-02-081-1/+1
| | | | Write also dots into stderr, instead of stdout.
* regrtest: don't fail immediately if a child does crashVictor Stinner2017-02-062-5/+4
| | | | | | 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-5/+2
| | | | | regrtest: simplify the regex used to match test names for the --fromfile command line option.
* Issue #28950: Merge 3.6.Xiang Zhang2016-12-191-2/+2
|\
| * Issue #28950: Disallow -j0 combined with -T/-l in regrtest.Xiang Zhang2016-12-191-2/+2
| |
* | regrtest --fromfile now accepts a list of filenamesVictor Stinner2016-12-091-8/+6
| |
* | Issue #23839: Various caches now are cleared before running every test file.Serhiy Storchaka2016-11-112-26/+86
|\ \ | |/
| * Issue #23839: Various caches now are cleared before running every test file.Serhiy Storchaka2016-11-112-26/+86
| |
* | Issue #28649: Clear the typing module caches when search for reference leaks.Serhiy Storchaka2016-11-091-0/+8
|\ \ | |/
| * Issue #28649: Clear the typing module caches when search for reference leaks.Serhiy Storchaka2016-11-091-0/+8
| |
* | Merge 3.7: Issue #28409: regrtest: fix the parser of command line arguments.Victor Stinner2016-10-171-4/+7
|\ \ | |/
| * Merge 3.6: Issue #28409: regrtest: fix the parser of command line arguments.Victor Stinner2016-10-171-4/+7
| |
* | Merge 3.6 (issue #27829)Victor Stinner2016-09-231-1/+1
|\ \ | |/
| * Merge 3.5 (issue #27829)Victor Stinner2016-09-231-1/+1
| |
* | regrtest: add -u for unbuffered stdout/stderrVictor Stinner2016-09-211-1/+1
|/
* Merge 3.5 (regrtest)Victor Stinner2016-09-101-1/+1
|
* Issue 27948: Allow backslashes in the literal string portion of f-strings, ↵Eric V. Smith2016-09-101-1/+1
| | | | but not in the expressions. Also, require expressions to begin and end with literal curly braces.
* regrtest: log FS and locale encodingsVictor Stinner2016-09-091-1/+5
|
* Adds test.support.PGO and skips tests that are not useful for PGO.Steve Dower2016-09-071-0/+2
|
* Closes issue 27921: Disallow backslashes anywhere in f-strings. This is a ↵Eric V. Smith2016-09-031-1/+1
| | | | temporary restriction. In 3.6 beta 2, the plan is to again allow backslashes in the string parts of f-strings, but disallow them in the expression parts.
* Issue #27829: libregrtest.save_env: flush stderrVictor Stinner2016-08-221-6/+4
| | | | | | Use flush=True to try to get a warning which is missing in buildbots. Use also f-string to make the code shorter.
* Cleanup libregrtestVictor Stinner2016-08-222-37/+20
| | | | | * main.py: remove unused import * runtest: simplify runtest_inner() parameters, reuse ns parameter
* Issue #27787: Merge regrtest fixup from 3.5Martin Panter2016-08-201-0/+1
|
* 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-0/+8
| | | | | | | 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).