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
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
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
772bf2ed83
Issue #28950 : Disallow -j0 combined with -T/-l in regrtest.
2016-12-19 22:00:22 +08:00
Xiang Zhang
270a21fda0
Issue #28950 : Disallow -j0 combined with -T/-l/-M in regrtest.
2016-12-19 21:01:33 +08:00
Martin Panter
56b2cf5e85
Issue #28484 : Skip tests if GIL is not used or multithreading is disabled
2016-10-20 21:45:49 +00: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
1f6b69b749
Issue #28409 : regrtest: fix the parser of command line arguments.
2016-10-17 18:11:03 +02:00
Victor Stinner
254ad58c07
Fix test_huntrleaks_fd_leak() of test_regrtest
...
Issue #28195 : Don't expect the fd leak message to be on a specific line number,
just make sure that the line is present in the output.
2016-09-19 00:11:30 +02:00
R David Murray
44b548dda8
#27364 : fix "incorrect" uses of escape character in the stdlib.
...
And most of the tools.
Patch by Emanual Barry, reviewed by me, Serhiy Storchaka, and
Martin Panter.
2016-09-08 13:59:53 -04: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
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
Serhiy Storchaka
bae75cf3fe
Issue #19527 : Fixed tests with defined COUNT_ALLOCS.
2016-07-03 22:30:49 +03:00
Serhiy Storchaka
e437a10d15
Issue #23277 : Remove unused imports in tests.
2016-04-24 21:41:02 +03:00
Victor Stinner
8a34d416ba
Issue #26295 : Enhanc test_regrtest.test_tools_script_run_tests()
...
Pass all regrtest options, not only --testdir.
2016-03-30 08:51:15 +02:00
Victor Stinner
732599f793
Issue #26295 : Fix test_regrtest.test_tools_buildbot_test()
...
Pass also --testdir option.
2016-03-30 08:38:05 +02:00
Victor Stinner
d6e2502624
Issue #26295 : test_regrtest now uses a temporary directory
...
test_forever() stores its state into the builtins module since the test module
is reloaded at each run.
Remove also warning to detect leaked tests of a previous run.
2016-03-30 02:33:52 +02: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
Victor Stinner
24f949e10c
regrtest: add time to output
...
Timestamps should help to debug slow buildbots, and timeout and hang on
buildbots.
2016-03-22 15:14:09 +01:00
Victor Stinner
da43ee4316
Issue #25694 : Fix test_regrtest for installed Python
2015-11-22 15:18:54 +01:00
Victor Stinner
3909e58994
Close #25373 : Fix regrtest --slow with interrupted test
...
* 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
2015-10-11 10:37:25 +02:00
Victor Stinner
14b4662e18
test_regrtest: catch stderr in test_nowindows()
...
Check also that the deprecation warning is emited.
2015-10-11 10:04:26 +02:00
Victor Stinner
4967146c8d
Close #25369 : Fix test_regrtest without thread support
2015-10-11 10:03:28 +02:00
Victor Stinner
20d2118248
Issue #25306 : Try to fix test_huntrleaks_fd_leak() on Windows
...
Issue #25306 : Disable popup and logs to stderr on assertion failures in MSCRT.
2015-10-03 21:40:21 +02:00
Victor Stinner
33c30131db
Issue #25306 : Skip test_huntrleaks_fd_leak() of test_regrtest until the bug is
...
fixed.
2015-10-03 21:20:41 +02:00
Victor Stinner
46d75353c5
Issue #18174 : Fix test_regrtest when Python is compiled in release mode
2015-10-03 02:21:35 +02:00
Victor Stinner
5f9d3acc5e
Issue #22806 : Add ``python -m test --list-tests`` command to list tests.
2015-10-03 00:21:12 +02:00
Victor Stinner
076fc872bc
Issue #18174 : "python -m test --huntrleaks ..." now also checks for leak of
...
file descriptors. Patch written by Richard Oudkerk.
2015-10-03 00:20:56 +02:00
Victor Stinner
a53a818c3c
Fix regrtest --coverage on Windows
...
Issue #25260 : Fix ``python -m test --coverage`` on Windows. Remove the list of
ignored directories.
2015-10-01 00:53:09 +02:00
Victor Stinner
9a14214aee
Issue #25220 : Fix "-m test --forever"
...
* Fix "-m test --forever": replace _test_forever() with self._test_forever()
* Add unit test for --forever
* Add unit test for a failing test
* Fix also some pyflakes warnings in libregrtest
2015-09-30 13:51:17 +02:00
Victor Stinner
ecef622fec
Issue #25220 , libregrtest: Call setup_python(ns) in the slaves
...
Slaves (child processes running tests for regrtest -jN) now inherit
--memlimit/-M, --threshold/-t and --nowindows/-n options.
* -M, -t and -n are now supported with -jN
* Factorize code to run tests.
* run_test_in_subprocess() now pass the whole "ns" namespace to the child
process.
2015-09-30 01:39:28 +02:00
Victor Stinner
4277134035
Issue #25220 : Add test for --wait in test_regrtest
...
Replace script_helper.assert_python_ok() with subprocess.run().
2015-09-29 14:17:09 +02:00
Victor Stinner
feabaed054
Oops, revert unwanted change, sorry
2015-09-29 14:02:35 +02:00
Victor Stinner
3f7468507a
test
2015-09-29 13:47:15 +02:00
Victor Stinner
e143c1f94f
Fix test_regrtest.test_tools_buildbot_test()
...
Issue #25220 : Fix test_regrtest.test_tools_buildbot_test() on release build (on
Windows), pass "+d" option to test.bat.
2015-09-29 01:02:37 +02:00
Victor Stinner
6b415101a2
Issue #25220 : Add functional tests to test_regrtest
...
* test all available ways to run the Python test suite
* test many regrtest options: --slow, --coverage, -r, -u, etc.
Note: python -m test --coverage doesn't work on Windows.
2015-09-28 23:16:17 +02:00
Victor Stinner
3844fe5ed8
Issue #25220 : Move most regrtest.py code to libregrtest
2015-09-26 10:38:01 +02:00
Victor Stinner
98de5340d4
Issue #25220 : Create Lib/test/libregrtest/
...
Start to split regrtest.py into smaller parts with the creation of
Lib/test/libregrtest/cmdline.py: code to handle the command line, especially
parsing command line arguments. This part of the code is tested by
test_regrtest.
2015-09-26 09:43:45 +02:00
Victor Stinner
0cca00b67e
Issue #25220 : Backed out changeset eaf9a99b6bb8
2015-09-23 23:16:47 +02:00
Victor Stinner
7b92abf0e9
Issue #25220 : Create Lib/test/libregrtest/
...
Start to split regrtest.py into smaller parts with the creation of
Lib/test/libregrtest/cmdline.py.
2015-09-23 23:04:18 +02:00
Benjamin Peterson
95536b8405
rename some more tests to avoid duplicate names ( #19123 )
2013-09-29 15:18:43 -04:00
Benjamin Peterson
11f34caac4
delete duplicate test ( closes #19123 )
2013-09-29 10:39:51 -04:00
Charles-François Natali
833bf1fcb2
Issue #18935 : Fix test_regrtest.test_timeout when built --without-threads (the
...
'--timeout' option requires faulthandler.dump_traceback_later).
2013-09-08 12:27:33 +02:00
Eli Bendersky
e8de29669d
Remove unused --debug option of regrtest.
...
If bots fail due to using this flag, the buildbot scripts have to be modified
to omit it. Regrtest ignores it anyway.
2013-09-02 17:01:10 -07:00
Serhiy Storchaka
64f7c4e4ca
Issue #16799 : Switched from getopt to argparse style in regrtest's argument
...
parsing. Added more tests for regrtest's argument parsing.
2013-08-29 12:26:23 +03:00
Chris Jerdonek
15738427f6
Issue #16854 : Fix regrtest.usage() regression introduced in 6e2e5adc0400.
...
This fixes a regression introduced in the commit for issue #15302 , which
switched regrtest from getopt to argparse.
2013-01-07 17:07:32 -08:00