summaryrefslogtreecommitdiffstats
path: root/Lib/test/libregrtest/setup.py
Commit message (Collapse)AuthorAgeFilesLines
* bpo-34602: Avoid failures setting macOS stack resource limit (GH-14546)Miss Islington (bot)2019-07-021-16/+0
| | | | | | | | | | | | | | | | | | | | Under some conditions the earlier fix for bpo-18075, "Infinite recursion tests triggering a segfault on Mac OS X", now causes failures on macOS when attempting to change stack limit with resource.setrlimit resource.RLIMIT_STACK, like regrtest does when running the test suite. The reverted change had specified a non-default stack size when linking the python executable on macOS. As of macOS 10.14.4, the previous code causes a hard failure when running tests, although similar failures had been seen under some conditions under some earlier systems. Reverting the change to the interpreter stack size at link time helped for release builds but caused some tests to fail when built --with-pydebug. Try the opposite approach: continue to build the interpreter with an increased stack size on macOS and remove the failing setrlimit call in regrtest initialization. This will definitely avoid the resource.RLIMIT_STACK error and should have no, or fewer, side effects. (cherry picked from commit 5bbbc733e6cc0804f19b071944af8d4719e26ae6) Co-authored-by: Ned Deily <nad@python.org>
* [3.7] bpo-36560: regrtest: don't collect the GC twice (GH-12747) (GH-12749)Victor Stinner2019-04-091-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bpo-36560: Fix reference leak hunting in regrtest (GH-12744) Fix reference leak hunting in regrtest: compute also deltas (of reference count, allocated memory blocks, file descriptor count) during warmup, to ensure that everything is initialized before starting to hunt reference leaks. Other changes: * Replace gc.collect() with support.gc_collect() * Move calls to read memory statistics from dash_R_cleanup() to dash_R() * Pass regrtest 'ns' to dash_R() * dash_R() is now more quiet with --quiet option (don't display progress). * Precompute the full range for "for it in range(repcount):" to ensure that the iteration doesn't allocate anything new. * dash_R() now is responsible to call warm_caches(). (cherry picked from commit 5aaac94eeb44697e92b0951385cd557bc27e0f6a) * bpo-36560: regrtest: don't collect the GC twice (GH-12747) dash_R() function of libregrtest doesn't call support.gc_collect() directly anymore: it's already called by dash_R_cleanup(). Call dash_R_cleanup() before starting the loop. (cherry picked from commit bb4447897a5f141eecf42987a1191a3330c5d7ed)
* bpo-32872: Avoid regrtest compatibility issue with namespace packages. ↵Miss Islington (bot)2018-03-281-1/+1
| | | | | | | (GH-6276) (#6277) (cherry picked from commit e52ac045972a4f75d7f52e4ee0d6de128259134d) Co-authored-by: Ned Deily <nad@python.org>
* 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.
* Issue #26295: When using "python3 -m test --testdir=TESTDIR", regrtest doesn'tVictor Stinner2016-03-301-0/+5
| | | | | | add "test." prefix to test module names. regrtest also prepends testdir to sys.path.
* 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.
* Issue #23919: Prevents assert dialogs appearing in the test suite.Steve Dower2015-10-081-3/+9
|
* Issue #25220, libregrtest: Set support.use_resources in setup_tests()Victor Stinner2015-09-301-1/+3
| | | | | * Rename setup_python() to setup_tests() * Remove use_resources parameter of runtest()
* Issue #25220, libregrtest: Move setup_python() to a new submoduleVictor Stinner2015-09-291-0/+108