X Tutup
Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
a4e5e7b
Revert "[3.11] gh-101634: regrtest reports decoding error as failed t…
vstinner Sep 2, 2023
39bf879
Revert "[3.11] bpo-46523: fix tests rerun when `setUp[Class|Module]` …
vstinner Sep 2, 2023
9a03f9c
Revert "gh-95027: Fix regrtest stdout encoding on Windows (GH-98492)"
vstinner Sep 2, 2023
57c050e
Revert "[3.11] gh-94026: Buffer regrtest worker stdout in temporary f…
vstinner Sep 2, 2023
f8e8df3
Revert "Run Tools/scripts/reindent.py (GH-94225)"
vstinner Sep 2, 2023
b95c315
Revert "gh-94052: Don't re-run failed tests with --python option (GH-…
vstinner Sep 2, 2023
9689029
Revert "[3.11] gh-84461: Fix Emscripten umask and permission issues (…
vstinner Sep 2, 2023
9583edd
gh-93353: regrtest checks for leaked temporary files (#93776)
vstinner Jun 14, 2022
7f3f0b3
gh-93353: Fix regrtest for -jN with N >= 2 (GH-93813)
vstinner Jun 14, 2022
9007571
gh-93353: regrtest supports checking tmp files with -j2 (#93909)
vstinner Jun 16, 2022
cb9c17d
gh-84461: Fix Emscripten umask and permission issues (GH-94002)
tiran Jun 19, 2022
70d8b30
gh-94052: Don't re-run failed tests with --python option (#94054)
tiran Jun 21, 2022
5c87ac3
Run Tools/scripts/reindent.py (#94225)
vstinner Jun 26, 2022
24d94ca
gh-94026: Buffer regrtest worker stdout in temporary file (GH-94253)
tiran Jun 29, 2022
693a035
gh-96465: Clear fractions hash lru_cache under refleak testing (GH-96…
zware Sep 8, 2022
73334eb
gh-95027: Fix regrtest stdout encoding on Windows (#98492)
vstinner Oct 21, 2022
2cc75b6
gh-98903: Test suite fails with exit code 4 if no tests ran (#98904)
vstinner Nov 2, 2022
c5bfed5
gh-100086: Add build info to test.libregrtest (#100093)
vstinner Dec 8, 2022
14ef8cf
bpo-46523: fix tests rerun when `setUp[Class|Module]` fails (#30895)
sobolevn Apr 7, 2023
ec875d5
gh-82054: allow test runner to split test_asyncio to execute in paral…
zitterbewegung Apr 30, 2023
5d764de
Display the sanitizer config in the regrtest header. (#105301)
gpshead Jun 6, 2023
f848b2b
gh-101634: regrtest reports decoding error as failed test (#106169)
vstinner Jun 28, 2023
15425da
gh-108223: test.pythoninfo and libregrtest log Py_NOGIL (#108238)
vstinner Aug 21, 2023
deb932f
gh-90791: test.pythoninfo logs ASAN_OPTIONS env var (#108289)
vstinner Aug 22, 2023
30120ff
gh-108388: regrtest splits test_asyncio package (#108393)
vstinner Aug 24, 2023
b882af4
regrtest computes statistics (#108793)
vstinner Sep 2, 2023
b8104bf
gh-108822: Add Changelog entry for regrtest statistics (#108821)
vstinner Sep 2, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
gh-94052: Don't re-run failed tests with --python option (#94054)
(cherry picked from commit 0ff7b99)
  • Loading branch information
tiran authored and vstinner committed Sep 2, 2023
commit 70d8b30d1fafab8e8702105941ef0abe37947feb
8 changes: 6 additions & 2 deletions Lib/test/libregrtest/cmdline.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import argparse
import os
import shlex
import sys
from test.support import os_helper

Expand Down Expand Up @@ -372,8 +373,11 @@ def _parse_args(args, **kwargs):
parser.error("-s and -f don't go together!")
if ns.use_mp is not None and ns.trace:
parser.error("-T and -j don't go together!")
if ns.python is not None and ns.use_mp is None:
parser.error("-p requires -j!")
if ns.python is not None:
if ns.use_mp is None:
parser.error("-p requires -j!")
# The "executable" may be two or more parts, e.g. "node python.js"
ns.python = shlex.split(ns.python)
if ns.failfast and not (ns.verbose or ns.verbose3):
parser.error("-G/--failfast needs either -v or -W")
if ns.pgo and (ns.verbose or ns.verbose2 or ns.verbose3):
Expand Down
11 changes: 10 additions & 1 deletion Lib/test/libregrtest/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,13 +306,22 @@ def list_cases(self):
printlist(self.skipped, file=sys.stderr)

def rerun_failed_tests(self):
self.log()

if self.ns.python:
# Temp patch for https://github.com/python/cpython/issues/94052
self.log(
"Re-running failed tests is not supported with --python "
"host runner option."
)
return

self.ns.verbose = True
self.ns.failfast = False
self.ns.verbose3 = False

self.first_result = self.get_tests_result()

self.log()
self.log("Re-running failed tests in verbose mode")
rerun_list = list(self.need_rerun)
self.need_rerun.clear()
Expand Down
4 changes: 1 addition & 3 deletions Lib/test/libregrtest/runtest_mp.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import json
import os.path
import queue
import shlex
import signal
import subprocess
import sys
Expand Down Expand Up @@ -59,8 +58,7 @@ def run_test_in_subprocess(testname: str, ns: Namespace, tmp_dir: str) -> subpro
worker_args = (ns_dict, testname)
worker_args = json.dumps(worker_args)
if ns.python is not None:
# The "executable" may be two or more parts, e.g. "node python.js"
executable = shlex.split(ns.python)
executable = ns.python
else:
executable = [sys.executable]
cmd = [*executable, *support.args_from_interpreter_flags(),
Expand Down
X Tutup