]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Do not run test_gdb when gdb embeds Python 2. (GH-31956)
authorInada Naoki <songofacandy@gmail.com>
Thu, 17 Mar 2022 09:00:56 +0000 (18:00 +0900)
committerGitHub <noreply@github.com>
Thu, 17 Mar 2022 09:00:56 +0000 (18:00 +0900)
Lib/test/test_gdb.py

index 344fd3dd3f7fc2a841170c61625bd84448256860..0f39b8f45714ad341a6c2036caa96c3081ad4177 100644 (file)
@@ -117,6 +117,9 @@ gdbpy_version, _ = run_gdb("--eval-command=python import sys; print(sys.version_
 if not gdbpy_version:
     raise unittest.SkipTest("gdb not built with embedded python support")
 
+if "major=2" in gdbpy_version:
+    raise unittest.SkipTest("gdb built with Python 2")
+
 # Verify that "gdb" can load our custom hooks, as OS security settings may
 # disallow this without a customized .gdbinit.
 _, gdbpy_errors = run_gdb('--args', sys.executable)