summaryrefslogtreecommitdiffstats
path: root/Lib/test/libregrtest/main.py
diff options
context:
space:
mode:
authorAntoine Pitrou <antoine@python.org>2024-03-18 09:22:19 (GMT)
committerGitHub <noreply@github.com>2024-03-18 09:22:19 (GMT)
commitfcb230180faff828aa67ca2ee1aa94fc522e6daa (patch)
tree506950e0cd5d6b9aed881395189988c29b6a085c /Lib/test/libregrtest/main.py
parent2ac1b48a044429d7a290310348b53a87b9f2033a (diff)
downloadcpython-fcb230180faff828aa67ca2ee1aa94fc522e6daa.zip
cpython-fcb230180faff828aa67ca2ee1aa94fc522e6daa.tar.gz
cpython-fcb230180faff828aa67ca2ee1aa94fc522e6daa.tar.bz2
[3.12] gh-112536: Add --tsan test for reasonable TSAN execution times. (gh-116601) (#116929)
(cherry picked from commit ebf29b3) Co-authored-by: Donghee Na <donghee.na@python.org>
Diffstat (limited to 'Lib/test/libregrtest/main.py')
-rw-r--r--Lib/test/libregrtest/main.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/libregrtest/main.py b/Lib/test/libregrtest/main.py
index a9725fa..1dcf747 100644
--- a/Lib/test/libregrtest/main.py
+++ b/Lib/test/libregrtest/main.py
@@ -18,6 +18,7 @@ from .results import TestResults, EXITCODE_INTERRUPTED
from .runtests import RunTests, HuntRefleak
from .setup import setup_process, setup_test_dir
from .single import run_single_test, PROGRESS_MIN_TIME
+from .tsan import setup_tsan_tests
from .utils import (
StrPath, StrJSON, TestName, TestList, TestTuple, TestFilter,
strip_py_suffix, count, format_duration,
@@ -56,6 +57,7 @@ class Regrtest:
self.quiet: bool = ns.quiet
self.pgo: bool = ns.pgo
self.pgo_extended: bool = ns.pgo_extended
+ self.tsan: bool = ns.tsan
# Test results
self.results: TestResults = TestResults()
@@ -182,6 +184,9 @@ class Regrtest:
# add default PGO tests if no tests are specified
setup_pgo_tests(self.cmdline_args, self.pgo_extended)
+ if self.tsan:
+ setup_tsan_tests(self.cmdline_args)
+
exclude_tests = set()
if self.exclude:
for arg in self.cmdline_args: