Commit Graph

187 Commits

Author SHA1 Message Date
Victor Stinner 3c93153f7d
bpo-36915: regrtest always remove tempdir of worker processes (GH-13312)
When using multiprocessing (-jN option), worker processes now create
their temporary directory inside the temporary directory of the
main process. So the main process is able to remove temporary
directories of worker processes even if they crash or when they are
killed by regrtest on KeyboardInterrupt (CTRL+c).

Rework also how multiprocessing arguments are parsed in main.py.
2019-05-14 15:49:16 +02:00
Victor Stinner c923c3449f
bpo-36719: Fix regrtest MultiprocessThread (GH-13301)
MultiprocessThread.kill() now closes stdout and stderr to prevent
popen.communicate() to hang.
2019-05-14 03:47:32 +02:00
Victor Stinner b0917df329
bpo-36719: regrtest -jN no longer stops on crash (GH-13231)
"python3 -m test -jN ..." now continues the execution of next tests
when a worker process crash (CHILD_ERROR state). Previously, the test
suite stopped immediately. Use --failfast to stop at the first error.

Moreover, --forever now also implies --failfast.
2019-05-13 19:17:54 +02:00
Victor Stinner 00db7c73af
bpo-36719: regrtest closes explicitly WindowsLoadTracker (GH-12965)
Regrtest.finalize() now closes explicitly the WindowsLoadTracker
instance.
2019-04-26 11:12:26 +02:00
Victor Stinner 837acc1957
bpo-36719: Fix regrtest re-run (GH-12964)
Properly handle a test which fail but then pass.

Add test_rerun_success() unit test.
2019-04-26 09:56:37 +02:00
Victor Stinner 75120d2205
bpo-36719: regrtest always detect uncollectable objects (GH-12951)
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.
2019-04-26 09:28:53 +02:00
Victor Stinner 3cde440f20
bpo-36725: Refactor regrtest multiprocessing code (GH-12961)
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.
2019-04-26 08:40:25 +02:00
Victor Stinner 4d29983185
bpo-36725: regrtest: add TestResult type (GH-12960)
* 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
2019-04-26 04:08:53 +02:00
Paul Monson 264a0b40b0 bpo-36638: Fix WindowsLoadTracker exception on some Windows versions (GH-12849) 2019-04-17 18:06:06 -07:00
Victor Stinner bb4447897a
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.
2019-04-09 18:26:16 +02:00
Victor Stinner 5aaac94eeb
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().
2019-04-09 14:23:47 +02:00
Ammar Askar e16467af0b bpo-34060: Report system load when running test suite for Windows (GH-8357)
While Windows exposes the system processor queue length, the raw value
used for load calculations on Unix systems, it does not provide an API
to access the averaged value. Hence to calculate the load we must track
and average it ourselves. We can't use multiprocessing or a thread to
read it in the background while the tests run since using those would
conflict with test_multiprocessing and test_xxsubprocess.

Thus, we use Window's asynchronous IO API to run the tracker in the
background with it sampling at the correct rate. When we wish to access
the load we check to see if there's new data on the stream, if there is,
we update our load values.
2019-04-09 08:20:41 -04:00
Victor Stinner 79b5d29041
bpo-36565: Fix libregrtest for Python without builtin _abc (GH-12733)
Fix reference hunting (``python3 -m test -R 3:3``) when Python has no
built-in abc module: fix _get_dump() reimplementation of libregrtest.
2019-04-09 01:36:34 +02:00
Anthony Sottile 8377cd4fcd Clean up code which checked presence of os.{stat,lstat,chmod} (#11643) 2019-02-25 23:32:27 +01:00
Steve Dower 28f6cb34f6
bpo-35683: Improve Azure Pipelines steps (GH-11493) 2019-01-22 10:49:52 -08:00
sth 7108aab49c Fix typo in test module usage message (GH-11374)
A minor typo in the output of `python -m test -h`.
A space was missing in between two words.
howmuch -> how much
2018-12-30 21:41:39 -08:00
Victor Stinner 8db5b54463
bpo-35513, unittest: TextTestRunner uses time.perf_counter() (GH-11180)
TextTestRunner of unittest.runner now uses time.perf_counter() rather
than time.time() to measure the execution time of a test: time.time()
can go backwards, whereas time.perf_counter() is monotonic.

Similar change made in libregrtest, pprint and random.
2018-12-17 11:30:34 +01:00
Pablo Galindo 9724348b43 bpo-34279, regrtest: Issue a warning if no tests have been executed (GH-10150) 2018-11-29 18:17:44 +01:00
Steve Dower 38df97a03c
Add --tempdir option for test run (GH-10322) 2018-11-17 04:14:36 -08:00
Steve Dower d0f49d2f50
bpo-34582: Adds JUnit XML output for regression tests (GH-9210) 2018-09-18 09:10:26 -07:00
Victor Stinner 012f5b968a
bpo-34605, libregrtest: Rename --slaveargs to --worker-args (GH-9099)
Rename also run_tests_slave() to run_tests_worker().
2018-09-07 17:20:42 +02:00
Pablo Galindo 58ed7307ea
bpo-33873: Fix bug in `runtest.py` and add checks for invalid `-R` parameters (GH-7735)
Fix bug in `Lib/test/libregrtest/runtest.py` that makes running tests an extra time than the specified number of runs.

Add check for invalid --huntrleaks/-R parameters.
2018-06-26 15:17:26 +01:00
Pablo Galindo cac4fef886 bpo-33873: regrtest: Add warning on -R 1:3 (GH-7736)
regrtest: Add warning when using less than 3 warmup runs like -R 1:3.
2018-06-16 02:20:56 +02:00
Victor Stinner 4ffe9c2b25
bpo-33718: regrtest: use format_duration() to display failed tests (GH-7686)
* Enhance also format_duration(): work on integers and rounds towards
  +infinity (math.ceil).
* Write unit tests on format_duration()
2018-06-14 14:58:13 +02:00
Victor Stinner c45fc7673e
bpo-33718: regrtest: use "xxx then yyy" result if re-run (GH-7521)
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.
2018-06-08 09:53:51 +02:00
Brett Cannon 8425de4147
bpo-33562: Check the global asyncio event loop policy isn't set after any tests (GH-7328) 2018-06-01 20:34:09 -07:00
Victor Stinner 7ad16eb51c
bpo-33718: regrtest: enhance "running:" formatting (GH-7292)
* "running:" progress: Format number of seconds as hours and minutes
* format_duration(): count also minutes as hours
* Create Lib/test/libregrtest/utils.py
2018-06-01 11:04:45 +02:00
Victor Stinner 9e24930dfd
bpo-33718: regrtest keeps filters to re-run fails (GH-7291)
* No longer clear filters, like --match, to re-run failed tests in
  verbose mode (-w option).
* Tests result: always indicate if tests have been interrupted.
* Enhance tests summary
2018-06-01 00:48:57 +02:00
Victor Stinner c6c05d0e69
regrtest: repeat summary after re-run (GH-7159)
Using -w, when failing tests are re-run in verbose mode, display
again the tests results at the end.
2018-05-28 21:03:43 +02:00
Victor Stinner 4f0bc7f7ab
test.regrtest: flush stdout when display progress (#7105)
runtest_mp.py: call print() with flush=True.
2018-05-25 17:21:55 +02:00
Ned Deily e52ac04597
bpo-32872: Avoid regrtest compatibility issue with namespace packages. (GH-6276) 2018-03-28 01:57:13 -04:00
Ivan Levkivskyi 03e3c340a0
bpo-31333: Re-implement ABCMeta in C (#5273)
This adds C versions of methods used by ABCMeta that
improve performance of various ABC operations.
2018-02-18 12:41:58 +00:00
Ivan Levkivskyi d911e40e78
bpo-32226: PEP 560: improve typing module (#4906)
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.
2018-01-20 11:23:59 +00:00
Victor Stinner 803ddd8ce2
bpo-31324: Optimize support._match_test() (#4421)
* 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>
2017-11-21 15:34:02 -08:00
Victor Stinner 8c663fd60e
Replace KB unit with KiB (#4293)
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.
2017-11-08 14:44:44 -08:00
Victor Stinner ccef823939 bpo-25588: Fix regrtest when run inside IDLE (#3962)
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.
2017-10-13 12:59:12 -07:00
Antoine Pitrou a6a4dc816d bpo-31370: Remove support for threads-less builds (#3385)
* Remove Setup.config
* Always define WITH_THREAD for compatibility.
2017-09-07 18:56:24 +02:00
Victor Stinner 6c2feabc5d bpo-31217: Fix regrtest -R for small integer (#3260)
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>
2017-09-01 13:05:27 +02:00
Victor Stinner b907abc885 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
2017-08-17 16:40:51 +02:00
Victor Stinner b97d99cd7f regrtest: count also env changed as failures in progress (#3061) 2017-08-10 16:19:03 +02:00
Victor Stinner e3510d74aa bpo-31160: regrtest now reaps child processes (#3044)
Add a post_test_cleanup() function which currently only calls
support.reap_children().
2017-08-09 17:44:33 +02:00
Antoine Pitrou 896145d9d2 bpo-26732: fix too many fds in processes started with the "forkserver" 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
2017-07-22 13:22:54 +02:00
Victor Stinner 5b392bbaeb bpo-30822: Exclude tzdata from regrtest --all (#2775)
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.
2017-07-20 15:46:32 +02:00
Victor Stinner 5e87592fd1 bpo-30764: Fix regrtest --fail-env-changed --forever (#2536)
--forever now stops if a fail changes the environment.
2017-07-03 11:15:58 +02:00
Victor Stinner 21a0a6c9f8 threading_cleanup() failure marks test as ENV_CHANGED (#2500)
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.
2017-06-30 10:59:52 +02:00
Victor Stinner beeca6e1e5 bpo-30776: regrtest: reduce memleak false positive (#2484)
Only report a leak if each run leaks at least one memory block.
2017-06-29 10:32:49 +02:00
Victor Stinner 48b5c422ff 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]
2017-06-27 02:02:04 +02:00
Victor Stinner 63f54c6893 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.
2017-06-26 18:33:19 +02:00
Victor Stinner ace56d5836 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.
2017-06-26 14:18:51 +02:00
mlouielu a49c935cfd bpo-30523: regrtest: Add --list-cases option (#2238)
* 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
2017-06-16 11:36:19 +02:00
Victor Stinner f7e07840d7 bpo-30284: Fix regrtest for out of tree build (#1481)
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).
2017-06-15 00:44:05 +02:00
Victor Stinner ef8320cf6f bpo-30540: regrtest: add --matchfile option (#1909)
* 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.
2017-06-09 10:18:48 +02:00
Victor Stinner fcdd9b6b7e bpo-27103: regrtest disables -W if -R is used (#1651)
Workaround for a regrtest bug.
2017-05-18 13:03:24 -07:00
Victor Stinner 74683fc624 bpo-30258: regrtest: Fix run_tests_multiprocess() (#1479)
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().
2017-05-09 11:34:01 +02:00
Victor Stinner 3d0056842c bpo-30263: regrtest: log system load (#1452)
* bpo-30263: regrtest: log system load

* regrtest: log the number of CPUs

Log the number of CPUs in the header. --verbose now imply --header.
2017-05-04 15:21:12 +02:00
Victor Stinner ec4b17239d regrtest: always show before/after of modified env (#1192)
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.
2017-04-20 00:57:30 +02:00
Ivan Levkivskyi 7acffa23c9 bpo-29638: Fix spurious refleaks after typing is imported (#469) 2017-03-05 20:15:20 +02:00
Victor Stinner 17a63e2169 Fix regrtest -j0 -R output
Write also dots into stderr, instead of stdout.
2017-02-08 13:06:08 +01:00
Victor Stinner 5bad70def6 regrtest: don't fail immediately if a child does crash
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.
2017-02-06 12:42:00 +01:00
Victor Stinner e8cfec5abc Issue #29035: Simplify a regex in libregrtest
regrtest: simplify the regex used to match test names for the --fromfile
command line option.
2017-01-03 01:38:58 +01:00
Xiang Zhang f76df27806 Issue #28950: Merge 3.6. 2016-12-19 22:05:46 +08:00
Xiang Zhang 772bf2ed83 Issue #28950: Disallow -j0 combined with -T/-l in regrtest. 2016-12-19 22:00:22 +08:00
Victor Stinner c24217e144 regrtest --fromfile now accepts a list of filenames 2016-12-09 16:05:51 +01:00
Serhiy Storchaka 684cadaef9 Issue #23839: Various caches now are cleared before running every test file. 2016-11-11 11:48:22 +02:00
Serhiy Storchaka 839102603c Issue #23839: Various caches now are cleared before running every test file. 2016-11-11 11:46:44 +02:00
Serhiy Storchaka 1f9449589e Issue #28649: Clear the typing module caches when search for reference leaks. 2016-11-09 23:52:40 +02:00
Serhiy Storchaka 04c954d275 Issue #28649: Clear the typing module caches when search for reference leaks. 2016-11-09 23:51:54 +02:00
Victor Stinner 8f5dd35d8e Merge 3.7: Issue #28409: regrtest: fix the parser of command line arguments. 2016-10-17 18:15:07 +02:00
Victor Stinner a506a93b0b Merge 3.6: Issue #28409: regrtest: fix the parser of command line arguments. 2016-10-17 18:13:46 +02:00
Victor Stinner e7d3b0cf14 Merge 3.6 (issue #27829) 2016-09-23 11:16:32 +02:00
Victor Stinner 21c8c92422 Merge 3.5 (issue #27829) 2016-09-23 11:15:50 +02:00
Victor Stinner 3e56c23e7d regrtest: add -u for unbuffered stdout/stderr 2016-09-21 17:12:50 +02:00
Victor Stinner eddc4b7272 Merge 3.5 (regrtest) 2016-09-10 04:27:56 -04:00
Eric V. Smith 451d0e38fc Issue 27948: Allow backslashes in the literal string portion of f-strings, but not in the expressions. Also, require expressions to begin and end with literal curly braces. 2016-09-09 21:56:20 -04:00
Victor Stinner b96ef55d49 regrtest: log FS and locale encodings 2016-09-08 21:46:56 -07:00
Steve Dower 22d0698d3b Adds test.support.PGO and skips tests that are not useful for PGO. 2016-09-06 19:38:15 -07:00
Eric V. Smith 6a4efce7a5 Closes issue 27921: Disallow backslashes anywhere in f-strings. This is a 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. 2016-09-03 09:18:34 -04:00
Victor Stinner ad7b6c3720 Issue #27829: libregrtest.save_env: flush stderr
Use flush=True to try to get a warning which is missing in buildbots.

Use also f-string to make the code shorter.
2016-08-22 14:29:54 +02:00
Victor Stinner ab98367747 Cleanup libregrtest
* main.py: remove unused import
* runtest: simplify runtest_inner() parameters, reuse ns parameter
2016-08-22 14:28:52 +02:00
Martin Panter 051b2201a7 Issue #27787: Merge regrtest fixup from 3.5 2016-08-20 07:38:21 +00:00
Victor Stinner f2abf5c11a regrtest: replace "Result:" with "Tests result:" 2016-08-19 17:54:25 +02:00
Victor Stinner 636860354e regrtest: add a summary of the summary, "Result: xxx"
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).
2016-08-17 16:12:16 +02:00
Victor Stinner c5a01f8551 regrtest: set interrupted to True if re-run is interrupted 2016-08-17 16:00:12 +02:00
Victor Stinner 8f00319294 regrtest: add newlines in output for readability 2016-08-17 15:42:21 +02:00
Victor Stinner 435eaf4422 regrtest: nicer output for durations
Use milliseconds and minutes units, not only seconds.
2016-08-17 12:22:52 +02:00
Victor Stinner 6c44619ece regrtest: rename --slow option to --slowest
Thanks to optparse, --slow syntax still works ;-)
2016-08-17 11:25:43 +02:00
Alexander Belopolsky 5d0c598382 Closes issue #24773: Implement PEP 495 (Local Time Disambiguation). 2016-07-22 18:47:04 -04:00
Victor Stinner 1b8b42344e regrtest: display test result (passed, failed, ...)
* in multiprocessing mode: always display the result
* sequential mode: only display the result if the test did not pass
2016-05-20 13:37:40 +02:00
Victor Stinner 6d81a2136d regrtest doesn't ignore -j1 anymore
* 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.
2016-05-20 13:15:55 +02:00
Victor Stinner 9759dd3343 Issue #26295: When using "python3 -m test --testdir=TESTDIR", regrtest doesn't
add "test." prefix to test module names.

regrtest also prepends testdir to sys.path.
2016-03-30 02:32:52 +02:00
Victor Stinner 8a96389d47 Merge 3.5 (regrtest) 2016-03-29 13:34:06 +02:00
Victor Stinner 80ec58c497 fix typo in comment
Thanks Arfrever for the report :)
2016-03-29 09:50:18 +02:00
Victor Stinner 622583e9bf regrtest: round final timing towards +inf 2016-03-27 18:28:15 +02:00
Victor Stinner d7ac00e620 Backed out changeset 245a16f33c4b
Serhiy asked me to review it.
2016-03-25 19:13:06 +01:00
Victor Stinner ba8cf10873 Rework libregrtest.save_env
* 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
2016-03-25 17:36:33 +01:00
Victor Stinner 3aac0adfe0 Cleanup regrtest "main()" function
* 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()
2016-03-24 17:53:20 +01:00
Victor Stinner 56db16cd44 regrtest: when parallel tests are interrupted, display progress 2016-03-24 12:04:15 +01:00
Victor Stinner 2b60b7237e regrtest: mention in tests run sequentially or in parallel 2016-03-24 11:55:29 +01:00
Victor Stinner 5de16e80c1 regrtest: fix --fromfile feature
* Update code for the name regrtest output format.
* Enhance also test_regrtest test on --fromfile
2016-03-24 09:43:00 +01:00
Victor Stinner 69649f21f0 regrtest: display test duration in sequential mode
Only display duration if a test takes more than 30 seconds.
2016-03-23 12:14:10 +01:00