summaryrefslogtreecommitdiffstats
path: root/Lib/test/regrtest.py
Commit message (Collapse)AuthorAgeFilesLines
* bpo-30822: regrtest: remove tzdata (#2782)Victor Stinner2017-07-201-4/+1
| | | | | * Oops, tzdata was introduced in Python 3.6: remove it from regrtest * Remove also Lib/test/libregrtest/__init__.py file: add by mistake on a backport.
* bpo-30822: Exclude tzdata from regrtest --all (#2775) (#2781)Victor Stinner2017-07-201-3/+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. (cherry picked from commit 5b392bbaeb9d9b1db961ecfc7315d8c8662c27f6)
* [3.5] bpo-29512, bpo-30764, bpo-30776: Backport regrtest enhancements from ↵Victor Stinner2017-07-031-10/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | 3.6 to 3.5 (#2540) * [3.6] bpo-29512, bpo-30776: Backport regrtest enhancements from master to 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) (cherry picked from commit a3ca94d0504157a112a1f89bfe8be1307116fc73) * bpo-30764: Fix regrtest --fail-env-changed --forever (#2536) (#2539) --forever now stops if a fail changes the environment. (cherry picked from commit 5e87592fd12e0b7c41edc11d4885ed7298d5063b) (cherry picked from commit 4132adb4b8f90893d8f19ff46edff56f189faca0)
* [3.5] bpo-30523, bpo-30764, bpo-30776: Sync regrtest from master (#2442)Victor Stinner2017-06-271-5/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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)
* [3.5] bpo-30383: Backport regrtest and test_regrtest enhancements from ↵Victor Stinner2017-06-191-38/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | master to 3.5 (#2279) * bpo-30383: regrtest: prepend testdir to sys.path * bpo-30383: Backport test_regrtest * regrtest: rename --slow option to --slowest The old --slow syntax is still accepted. * regrtest: add a single oneliner summary Example: "Tests result: SUCCESS" * test_regrtest: add test_coverage() regrtest now also displays the number of successful tests when coverage is used. * test_regrtest: add test_crashed() Handle correctly crashing test: account the crash has a failed test, but continue to run other tests. * regrtest: backport --list-tests feature * regrtest: backport --fromfile enhancements * regrtest: backport displaying progress enhancements * test_regrtest: backport test_randseed() * regrtest: Fix --coverage on Windows Don't ignore any directory anymore. Change backported from master.
* [3.5] bpo-30540, bpo-30523: Add --matchfile and --list-cases options to ↵Victor Stinner2017-06-161-31/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | regrtest (#2250) * bpo-30540: regrtest: add --matchfile option * 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_access() of the FileTests class of test_os: $ ./python -m test -v -m test.test_os.FileTests.test_access test_os * bpo-30523: regrtest: Add --list-cases option * Add --list-cases option to regrtest * Add get_abs_module() function, use it in list_cases() * Add ns mandatory positional argument to runtest() and runtest_inner() * Add file optional parameter to printlist() Co-Authored-By: Louie Lu <git@louie.lu>
* bpo-30675: Fix multiprocessing code in regrtest (#2220)Victor Stinner2017-06-151-47/+63
| | | | | | | | | | | | | | * Rewrite code to pass slaveargs from the master process to worker processes: reuse the same code of the Python master branch * Move code to initialize tests in a new setup_tests() function, similar change was done in the master branch * In a worker process, call setup_tests() with the namespace built from slaveargs to initialize correctly tests Before this change, warm_caches() was not called in worker processes because the setup was done before rebuilding the namespace from slaveargs. As a consequence, the huntrleaks feature was unstable. For example, test_zipfile reported randomly false positive on reference leaks.
* bpo-27103: regrtest disables -W if -R is used (#1660)Victor Stinner2017-05-191-0/+5
| | | Workaround for a regrtest bug.
* regrtest: always show before/after of modified env (#1407)Victor Stinner2017-05-031-4/+3
| | | | | | | | | 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)
* Backport fix for spurious refleak failures (#482)Ivan Levkivskyi2017-03-051-3/+8
|
* Issue #28950: Disallow -j0 combined with -T/-l/-M in regrtest.Xiang Zhang2016-12-191-3/+3
|
* Issue #28688: Remove warnings.filters check from regrtestVictor Stinner2016-11-211-7/+1
| | | | | | | | Reloading the warnings module duplicates filters in warnings.filters. Fixing the issue is tricky. It was decided to simply remove the check from Python 3.5, since the bug only impacts Python unit tests, not real applications. The check is kept in Python 3.6 and newer.
* Issue #23839: Various caches now are cleared before running every test file.Serhiy Storchaka2016-11-111-25/+85
|
* Issue #28649: Clear the typing module caches when search for reference leaks.Serhiy Storchaka2016-11-091-0/+8
|
* Issue #28409: regrtest: fix the parser of command line arguments.Victor Stinner2016-10-171-4/+7
|
* Issue #27829: regrtest -W displays stderr if env changedVictor Stinner2016-09-231-1/+1
| | | | | | regrtest -W hides output if a test pass, but also when env changed and so the env changed warning is hidden. So it's hard to debug. With this change, stderr is now always displayed when a test doesn't pass.
* regrtest: accept options after test namesVictor Stinner2016-09-101-1/+1
|
* Issue #27787: Clean up weak references before checking for dangling threadsMartin Panter2016-08-201-0/+1
|
* Issue #26643: Add missing shutil resources to regrtest.pyVictor Stinner2016-03-291-0/+1
|
* Issue #25523: Merge a-to-an corrections from 3.4.Serhiy Storchaka2015-11-021-1/+1
|\
| * Issue #25523: Further a-to-an corrections.Serhiy Storchaka2015-11-021-1/+1
| |
* | lose #25373: Fix regrtest --slow with interrupted testVictor Stinner2015-10-111-1/+2
| |
* | Issue #23919: Prevents assert dialogs appearing in the test suite.Steve Dower2015-10-081-2/+11
| |
* | Issue #25188: Add a -P/--pgo flag to regrtest to silence error output.Brett Cannon2015-10-021-34/+50
| | | | | | | | | | | | Since PGO building doesn't care about test failures, silence them when running the test suite for performance reasons. Initial patch by Alecsandru Patrascu of Intel.
* | Merge 3.4Zachary Ware2015-08-091-4/+2
|\ \ | |/
| * regrtest: the 'bad' and 'environment_changed' sets of tests don't intersect ↵Zachary Ware2015-08-091-4/+2
| | | | | | | | anymore
* | Issue #24751: Merge with 3.4Zachary Ware2015-08-051-1/+8
|\ \ | |/
| * Issue #24751: When running regrtest with '-w', don't fail if re-run succeeds.Zachary Ware2015-08-051-3/+8
| |
* | Issue #24245: Eliminated senseless expect clauses that have no any effect.Serhiy Storchaka2015-05-201-4/+0
| | | | | | | | Patch by Martin Panter.
* | Issue #22390: test.regrtest now emits a warning if temporary files orSerhiy Storchaka2015-03-291-15/+11
|\ \ | |/ | | | | directories are left after running a test.
| * Issue #22390: test.regrtest now emits a warning if temporary files orSerhiy Storchaka2015-03-291-15/+11
| | | | | | | | directories are left after running a test.
* | Issue #23145: regrtest now shows errors and raises an exception ifVictor Stinner2015-01-061-0/+4
|/ | | | loader.loadTestsFromModule() logged errors.
* Issue #22104: Don't hold a reference to the loaded TestSuite in runtest_innerZachary Ware2014-08-041-2/+4
|
* merge 3.3Benjamin Peterson2014-02-161-6/+3
|\
| * backout fafac90b69c4Benjamin Peterson2014-02-161-7/+4
| |
* | merge 3.3Benjamin Peterson2014-01-091-3/+6
|\ \ | |/
| * clear zip stat cache after each ref leak runBenjamin Peterson2014-01-091-4/+7
| |
* | ssue #19183: Implement PEP 456 'secure and interchangeable hash algorithm'.Christian Heimes2013-11-201-0/+2
| | | | | | | | Python now uses SipHash24 on all major platforms.
* | Remove unused --debug option of regrtest.Eli Bendersky2013-09-031-9/+7
| | | | | | | | | | If bots fail due to using this flag, the buildbot scripts have to be modified to omit it. Regrtest ignores it anyway.
* | Fix docstring and some indentationEli Bendersky2013-09-021-4/+4
| |
* | Refactor the main function of regrtest a bit.Eli Bendersky2013-09-021-23/+33
| | | | | | | | Moving subprocess execution of tests into a function.
* | Issue #11798: fix tests for regrtest -R :Andrew Svetlov2013-09-011-0/+5
| |
* | Issue #8713: Cleanup before saving process._dangling.Richard Oudkerk2013-08-291-2/+6
| |
* | Issue #16799: Switched from getopt to argparse style in regrtest's argumentSerhiy Storchaka2013-08-291-290/+243
| | | | | | | | parsing. Added more tests for regrtest's argument parsing.
* | Issue #8713: Support alternative start methods in multiprocessing on Unix.Richard Oudkerk2013-08-141-1/+1
| | | | | | | | See http://hg.python.org/sandbox/sbt#spawn
* | Issue #18375: merge with 3.3Florent Xicluna2013-07-061-0/+1
|\ \ | |/
| * Issue #18375: Assume --randomize when --randseed is used for running the ↵Florent Xicluna2013-07-061-0/+1
| | | | | | | | testsuite.
* | Issue #15767: Excise the remaining instances of ModuleNotFoundErrorBrett Cannon2013-07-041-8/+8
| |
* | Issue #17914: Use os.cpu_count() instead of multiprocessing.cpu_count() whereCharles-François Natali2013-06-281-6/+2
| | | | | | | | applicable.
* | Issue #17206: test.regrtest and test.script_helper enable faulthandler moduleVictor Stinner2013-06-251-1/+2
| | | | | | | | in subprocesses.