summaryrefslogtreecommitdiffstats
path: root/Lib/test/libregrtest
Commit message (Collapse)AuthorAgeFilesLines
* bpo-31217: Fix regrtest -R for small integer (#3260) (#3261)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> (cherry picked from commit 6c2feabc5dac2f3049b15134669e9ad5af573193)
* [3.6] bpo-30871: Add test.pythoninfo (#3174)Victor Stinner2017-08-211-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bpo-30871: Add test.pythoninfo (#3075) * 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 (cherry picked from commit b907abc88589f7bea52c5afe172ececc6edcda70) * bpo-30871: pythoninfo: add expat and _decimal (#3121) * bpo-30871: pythoninfo: add expat and _decimal * Remove _decimal.__version__ The string is hardcoded, not really interesting. (cherry picked from commit f6ebd838f00b4c211c72d85ee49749e910cd3afe) * bpo-30871: Add "make pythoninfo" (#3120) (cherry picked from commit a3a01a2fceab2188b282ab9911f79c99a4c32273) * bpo-30871: pythoninfo: more sys, os, time data (#3130) * bpo-30871: pythoninfo: more sys, os, time data PythonInfo now converts types other than intger to string by default. * fix typo (cherry picked from commit ad7eaed54382b346784e51a6f0122ce81e8842b5) * bpo-31231: Fix pythoninfo in Travis config (#3134) bpo-31231, bpo-30871: Replace "./python -m test.pythoninfo" with "make pythoninfo", since macOS uses ./python.exe. (cherry picked from commit 92b1f90143286385c0ff5be98d3721b90580a912)
* [3.6] bpo-31160: Backport reap_children() fixes from master to 3.6 (#3060)Victor Stinner2017-08-101-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | * bpo-31160: Fix test_builtin for zombie process (#3043) PtyTests.run_child() now calls os.waitpid() to read the exit status of the child process to avoid creating zombie process and leaking processes in the background. (cherry picked from commit 4baca1b0f7325032598cd38e7ceffc79b616d255) * bpo-31160: regrtest now reaps child processes (#3044) Add a post_test_cleanup() function which currently only calls support.reap_children(). (cherry picked from commit e3510d74aacc477c30f42f2b941d69689bbc478e) * bpo-31160: test_builtin: don't check waitpid() status (#3050) (cherry picked from commit 3ca9f50f96cfa5c1b7aa56639042531b57f07fbb) * bpo-31160: test_tempfile: Fix reap_children() warning (#3056) TestRandomNameSequence.test_process_awareness() now calls os.waitpid() to avoid leaking a zombie process. (cherry picked from commit 6c8c2943d996b59a48d331f61f22cbe72933910e)
* bpo-30822: Exclude tzdata from regrtest --all (#2775) (#2777)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. (cherry picked from commit 5b392bbaeb9d9b1db961ecfc7315d8c8662c27f6)
* bpo-30764: Fix regrtest --fail-env-changed --forever (#2536) (#2539)Victor Stinner2017-07-031-1/+3
| | | | --forever now stops if a fail changes the environment. (cherry picked from commit 5e87592fd12e0b7c41edc11d4885ed7298d5063b)
* [3.6] bpo-29512, bpo-30776: Backport regrtest enhancements from master to ↵Victor Stinner2017-06-301-10/+3
| | | | | | | | | | | | | | | | | 3.6 (#2513) * bpo-29512: Add test.bisect, bisect failing tests (#2452) Add a new "python3 -m test.bisect" tool to bisect failing tests. It can be used to find which test method(s) leak references, leak files, etc. (cherry picked from commit 84d9d14a1fa395fbd21262ba195490be25a7b3bc) * bpo-30776: regrtest: reduce memleak false positive (#2484) Only report a leak if each run leaks at least one memory block. (cherry picked from commit beeca6e1e5fd01531b1db7059498b13d07dca525)
* [3.6] bpo-30523, bpo-30764, bpo-30776: Sync regrtest from master (#2441)Victor Stinner2017-06-273-5/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bpo-30523: regrtest --list-cases --match (#2401) * 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. (cherry picked from commit ace56d583664f855d89d1219ece7c21c2fddcf30) * bpo-30764: regrtest: add --fail-env-changed option (#2402) * 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. (cherry picked from commit 63f54c68936d648c70ca411661e4208329edcf26) * bpo-30776: reduce regrtest -R false positives (#2422) * 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] (cherry picked from commit 48b5c422ffb03affb00c184b9a99e5537be92732)
* Synchronize libregrtest from master to 3.6 (#2244)Victor Stinner2017-06-165-52/+119
| | | | | | | * bpo-30523: regrtest: Add --list-cases option (#2238) * bpo-30284: Fix regrtest for out of tree build (#1481) * bpo-30540: regrtest: add --matchfile option (#1909) * bpo-30258: regrtest: Fix run_tests_multiprocess() (#1479) * bpo-30263: regrtest: log system load (#1452)
* bpo-27103: regrtest disables -W if -R is used (#1651) (#1656)Victor Stinner2017-05-181-0/+5
| | | | Workaround for a regrtest bug. (cherry picked from commit fcdd9b6b7e73427ce5aa63cf095312f603c4edce)
* regrtest: always show before/after of modified env (#1192) (#1406)Victor Stinner2017-05-031-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. (cherry picked from commit ec4b17239d899550be4ee6104b61751bb3c70382)
* bpo-29638: Fix spurious refleaks after typing is imported (#469) (#483)Ivan Levkivskyi2017-03-051-3/+8
|
* Issue #28950: Disallow -j0 combined with -T/-l in regrtest.Xiang Zhang2016-12-191-2/+2
|
* 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
|
* Merge 3.6: Issue #28409: regrtest: fix the parser of command line arguments.Victor Stinner2016-10-171-4/+7
|
* Merge 3.5 (issue #27829)Victor Stinner2016-09-231-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).
* regrtest: set interrupted to True if re-run is interruptedVictor Stinner2016-08-171-1/+2
|
* regrtest: add newlines in output for readabilityVictor Stinner2016-08-171-0/+3
|
* regrtest: nicer output for durationsVictor Stinner2016-08-171-12/+19
| | | | Use milliseconds and minutes units, not only seconds.
* regrtest: rename --slow option to --slowestVictor Stinner2016-08-171-1/+1
| | | | Thanks to optparse, --slow syntax still works ;-)
* Closes issue #24773: Implement PEP 495 (Local Time Disambiguation).Alexander Belopolsky2016-07-221-1/+3
|
* regrtest: display test result (passed, failed, ...)Victor Stinner2016-05-203-8/+26
| | | | | * in multiprocessing mode: always display the result * sequential mode: only display the result if the test did not pass
* regrtest doesn't ignore -j1 anymoreVictor Stinner2016-05-201-2/+0
| | | | | | | | * regrtest now uses subprocesses when the -j1 command line option is used: each test file runs in a fresh child process. Before, the -j1 option was ignored. * Tools/buildbot/test.bat script now uses -j1 by default to run each test file in fresh child process.
* Issue #26295: When using "python3 -m test --testdir=TESTDIR", regrtest doesn'tVictor Stinner2016-03-302-4/+9
| | | | | | add "test." prefix to test module names. regrtest also prepends testdir to sys.path.
* Merge 3.5 (regrtest)Victor Stinner2016-03-291-0/+1
|
* fix typo in commentVictor Stinner2016-03-291-1/+1
| | | | Thanks Arfrever for the report :)
* regrtest: round final timing towards +infVictor Stinner2016-03-271-3/+8
|
* Backed out changeset 245a16f33c4bVictor Stinner2016-03-251-279/+202
| | | | Serhiy asked me to review it.
* Rework libregrtest.save_envVictor Stinner2016-03-251-202/+279
| | | | | | | | | | | * Replace get/restore methods with a Resource class and Resource subclasses * Create ModuleAttr, ModuleAttrList and ModuleAttrDict helper classes * Use __subclasses__() to get resource classes instead of using an hardcoded list (2 shutil resources were missinged in the list!) * Don't define MultiprocessingProcessDangling resource if the multiprocessing module is missing * Nicer diff for dictionaries. Useful for the big os.environ dict * Reorder code to group resources
* Cleanup regrtest "main()" functionVictor Stinner2016-03-242-23/+27
| | | | | | | * Rename libregrtest.main_in_temp_cwd() to libregrtest.main() * Add regrtest.main_in_temp_cwd() alias to libregrtest.main() * Move old main_in_temp_cwd() code into libregrtest.Regrtest.main() * Update multiple scripts to call libregrtest.main()
* regrtest: when parallel tests are interrupted, display progressVictor Stinner2016-03-241-6/+18
|
* regrtest: mention in tests run sequentially or in parallelVictor Stinner2016-03-242-0/+4
|
* regrtest: fix --fromfile featureVictor Stinner2016-03-241-6/+17
| | | | | * Update code for the name regrtest output format. * Enhance also test_regrtest test on --fromfile
* regrtest: display test duration in sequential modeVictor Stinner2016-03-233-7/+26
| | | | Only display duration if a test takes more than 30 seconds.
* regrtest: add timeout to main process when using -jNVictor Stinner2016-03-231-2/+11
| | | | | libregrtest: add a watchdog to run_tests_multiprocess() using faulthandler.dump_traceback_later().
* regrtest: add time to outputVictor Stinner2016-03-221-5/+18
| | | | | Timestamps should help to debug slow buildbots, and timeout and hang on buildbots.
* regrtest: Fix module.__path__Victor Stinner2016-03-151-2/+2
| | | | | | | Issue #26538: libregrtest: Fix setup_tests() to keep module.__path__ type (_NamespacePath), don't convert to a list. Add _NamespacePath.__setitem__() method to importlib._bootstrap_external.
* regrtest: display progress every 30 seconds (instead of 60 seconds) whenVictor Stinner2015-11-041-1/+1
| | | | running tests in multiprocessing mode (-jN).
* Issue #25523: Merge a-to-an corrections from 3.5.Serhiy Storchaka2015-11-021-1/+1
|
* Close #25373: Fix regrtest --slow with interrupted testVictor Stinner2015-10-111-4/+8
| | | | | | | * Fix accumulate_result(): don't use time on interrupted and failed test * Add unit test for interrupted test * Add unit test on --slow with interrupted test, with and without multiprocessing