bpo-37359: Add --cleanup option to python3 -m test (GH-14332)

* regrtest: Add --cleanup option to remove "test_python_*" directories
  of previous failed test jobs.
* Add "make cleantest" to run "python3 -m test --cleanup".
This commit is contained in:
Victor Stinner 2019-06-24 12:03:00 +02:00 committed by GitHub
parent 2ac3bab2a6
commit 47fbc4e45b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 65 additions and 14 deletions

View file

@ -272,8 +272,10 @@ def _create_parser():
group.add_argument('--junit-xml', dest='xmlpath', metavar='FILENAME',
help='writes JUnit-style XML results to the specified '
'file')
group.add_argument('--tempdir', dest='tempdir', metavar='PATH',
group.add_argument('--tempdir', metavar='PATH',
help='override the working directory for the test run')
group.add_argument('--cleanup', action='store_true',
help='remove old test_python_* directories')
return parser