Commit Graph

376 Commits

Author SHA1 Message Date
Georg Brandl 61470246d0 Remove setting hash seed to regrtest's random seed and re-execv()ing: this doesn't preserve Python flags and fails from a temp directory. 2012-02-20 22:06:02 +01:00
Georg Brandl 09a7c72cad Merge from 3.1: Issue #13703: add a way to randomize the hash values of basic types (str, bytes, datetime)
in order to make algorithmic complexity attacks on (e.g.) web apps much more complicated.

The environment variable PYTHONHASHSEED and the new command line flag -R control this
behavior.
2012-02-20 21:31:46 +01:00
Georg Brandl 2daf6ae249 Issue #13703: add a way to randomize the hash values of basic types (str, bytes, datetime)
in order to make algorithmic complexity attacks on (e.g.) web apps much more complicated.

The environment variable PYTHONHASHSEED and the new command line flag -R control this
behavior.
2012-02-20 19:54:16 +01:00
Meador Inge b0ae0ac668 Issue #13786: Remove unimplemented 'trace' long option from regrtest.py. 2012-01-14 11:50:33 -06:00
Meador Inge 3f55e59282 Issue #13725: regrtest does not recognize -d flag.
Patch by Erno Tukia.
2012-01-14 09:12:55 -06:00
Senthil Kumaran 3ffd7ca041 Fix issue13726: -S accepts an argument just as --start. 2012-01-14 21:07:31 +08:00
Senthil Kumaran 9bbcb254db Adding the -o option for Issue13726 2012-01-14 18:38:28 +08:00
Senthil Kumaran bcfe56d77c Issue13726 - Fix the ambiguous -S flag in regrtest. It is -o/--slow for printing the 10 slowest test. 2012-01-14 18:26:27 +08:00
Éric Araujo ff91306127 Add a regrtest cleanup check for shutil registries 2011-11-29 16:45:07 +01:00
Meador Inge 11e381310b Issue #13380: add an internal function for resetting the ctypes caches 2011-11-25 22:33:32 -06:00
Nadeem Vawda c1fba3ea0c Make regrtest complain when -M and -j are used together.
-j doesn't pass the memlimit on to child processes, so this doesn't work at
present, and even if it did, running multiple bigmem tests at once would
usually not be desirable (since you generally want to devote as much of the
available RAM as possible to each test).
2011-08-27 15:22:05 +02:00
Antoine Pitrou 5bd8b8d80f A warning doesn't equate a failed test
(this broken -F with e.g. test_multiprocessing)
2011-08-23 19:32:26 +02:00
Antoine Pitrou b9c73e8cf0 Issue #12626: In regrtest, allow to filter tests using a glob filter
with the `-m` (or `--match`) option.  This works with all test cases
using the unittest module.  This is useful with long test suites
such as test_io or test_subprocess.
2011-07-29 23:53:38 +02:00
Antoine Pitrou 216a3bc36d Issue #12624: It is now possible to fail after the first failure when
running in verbose mode (`-v` or `-W`), by using the `--failfast`
(or `-G`) option to regrtest.  This is useful with long test suites
such as test_io or test_subprocess.
2011-07-23 22:33:39 +02:00
Antoine Pitrou c081c0c6a0 Issue #12573: Add resource checks for dangling Thread and Process objects. 2011-07-15 22:12:24 +02:00
Victor Stinner fcc2a21fae Issue #12400: regrtest.runtest() uses stream.seek(0) before .truncate()
.truncate(0) doesn't rewind.
2011-06-29 20:01:29 +02:00
Victor Stinner 85b3a492d6 Issue #12400: runtest() truncates the StringIO stream before a new test 2011-06-29 17:26:38 +02:00
Victor Stinner ea95de75dd Issue #12400: regrtest, force verbose mode to True with option -W
If verbose is False, the output is empty. Fix also a typo in a variable name.
2011-06-29 15:34:48 +02:00
Victor Stinner 8313d6aef8 Issue #12400: runtest() reuses the same io.StringIO instance for all calls
* Don't force verbose to True with option -W
 * Rename rerun_failed variable to output_on_failure
2011-06-29 15:22:26 +02:00
Victor Stinner bd98f9367c Issue #12400: remove unused variable 2011-06-29 13:24:28 +02:00
Victor Stinner a7c33e5168 Issue #12400: regrtest -W doesn't rerun the tests twice anymore, but captures
the output and displays it on failure instead. regrtest -v doesn't print the
error twice anymore if there is only one error.
2011-06-29 13:00:54 +02:00
Ezio Melotti 84f75c680c #12074: remove the /0 when there are no failures. 2011-05-24 01:00:10 +03:00
Victor Stinner a2a895c46c Issue #12074: regrtest displays also the current number of failures 2011-05-23 23:14:05 +02:00
Antoine Pitrou ee4293400c Fix possible "file already exists" error when running the tests in parallel.
This is a perfect example of LBYL going wrong: that code could be executed
by several workers in parallel, and os.mkdir() attempted on the same
path by multiple processes.
2011-04-16 18:53:59 +02:00
Ross Lagerwall 226580e6dc Merge with 3.1 2011-04-09 20:05:04 +02:00
Ross Lagerwall e620d10701 Issue #11719: Fix message about unexpected test_msilib skip.
Patch by Nadeem Vawda.
2011-04-09 19:30:03 +02:00
Antoine Pitrou 293954dd76 Issue #11653: fix -W with -j in regrtest 2011-03-23 23:01:49 +01:00
Antoine Pitrou 779a5b0b3a Always print out the traceback when a test "crashed" 2011-03-21 19:55:16 +01:00
Ezio Melotti 0123e055fa Add a check for sys.warnoptions in regrtest. 2011-03-20 15:09:26 +02:00
Brett Cannon 63eef1e0dd Get --coverage to be an acceptable flag for test.regrtest again. 2011-01-06 22:32:41 +00:00
Georg Brandl be41a48fb8 On Py3k, -tt and -3 are no-op and unsupported respectively. 2011-01-05 21:47:47 +00:00
Victor Stinner 4b2b43d988 regrtest: close the new stdout and restore the original stdout at exit
Fix a ResourceWarning(unclosed file).
2011-01-05 03:54:26 +00:00
Antoine Pitrou 41d5866e56 Merged revisions 87704-87705 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r87704 | antoine.pitrou | 2011-01-03 21:38:52 +0100 (lun., 03 janv. 2011) | 5 lines

  Issue #6293: Have regrtest.py echo back sys.flags.  This is done by default
  in whole runs and enabled selectively using `--header` when running an
  explicit list of tests.  Original patch by Collin Winter.
........
  r87705 | antoine.pitrou | 2011-01-03 21:40:07 +0100 (lun., 03 janv. 2011) | 3 lines

  Mention --randseed in option list
........
2011-01-03 20:47:02 +00:00
Antoine Pitrou 68530ac3c0 Mention --randseed in option list 2011-01-03 20:40:07 +00:00
Antoine Pitrou 3c4402f879 Issue #6293: Have regrtest.py echo back sys.flags. This is done by default
in whole runs and enabled selectively using `--header` when running an
explicit list of tests.  Original patch by Collin Winter.
2011-01-03 20:38:52 +00:00
R. David Murray 8e286c472b #7056: runtest and runtest_inner don't use testdir, so drop it from their sigs
I've only tested regular runs and -j runs.  If I've broken anything
else I'm sure I'll hear about it sooner or later.
2010-12-27 20:09:32 +00:00
Nick Coghlan 7bd5dbe9a0 More fine-grained monitoring of alterations to logging state 2010-12-05 07:17:25 +00:00
Nick Coghlan 7d8197516a Issue 10626 investigation: regrtest now checks for alterations to the logging state in the current process (and yes, test_pydoc alters it) 2010-12-05 06:45:03 +00:00
R. David Murray cd4f758407 Merged revisions 85086 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r85086 | r.david.murray | 2010-09-28 21:08:05 -0400 (Tue, 28 Sep 2010) | 4 lines

  #7110: have regrtest print test failures and tracebacks to stderr not stdout.

  Patch by Sandro Tosi.
........
2010-12-04 17:15:21 +00:00
Michael Foord 3ab34ccae3 Factor out common code from lib/test/__main__.py and lib/test/regrtest.py into a function. 2010-12-03 12:27:40 +00:00
Nick Coghlan 4c4c0f2fe6 Partially revert r78719 - it removed a check that is still needed in some cases (i.e. this will allow Michael to add the test.__main__ support that broke the buildbots previously) 2010-12-03 07:44:33 +00:00
Antoine Pitrou d95c7b5f8a Issue #10347: ignore leading test count ("[ 1/340]") when using the -f option to regrtest. 2010-11-07 20:50:51 +00:00
Antoine Pitrou a4f1afa640 Merged revisions 85935-85936 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r85935 | antoine.pitrou | 2010-10-29 21:34:45 +0200 (ven., 29 oct. 2010) | 4 lines

  Make a GC run before trying to clean up files left over by
  the latest test run.
........
  r85936 | antoine.pitrou | 2010-10-29 21:36:37 +0200 (ven., 29 oct. 2010) | 3 lines

  Fix typo
........
2010-10-31 13:15:20 +00:00
Benjamin Peterson 54ad0beae0 set literals and unions are our friends 2010-10-29 21:33:10 +00:00
Benjamin Peterson 65c66ab255 make gdb skip expected 2010-10-29 21:31:35 +00:00
Antoine Pitrou 2b40efdfe8 Fix typo 2010-10-29 19:36:37 +00:00
Antoine Pitrou c14efc4e80 Make a GC run before trying to clean up files left over by
the latest test run.
2010-10-29 19:34:45 +00:00
Antoine Pitrou aa8796598a Actually restore the original asyncore socket map by making a copy of the dict 2010-10-29 11:54:38 +00:00
Skip Montanaro 97019ff665 test_gdb should be skipped on darwin (not up to v7 yet) 2010-10-25 01:35:48 +00:00
Antoine Pitrou ba8071241b Revert debug printout 2010-10-15 13:52:53 +00:00