From: Inada Naoki Date: Thu, 17 Mar 2022 09:00:56 +0000 (+0900) Subject: Do not run test_gdb when gdb embeds Python 2. (GH-31956) X-Git-Tag: v3.11.0a7~215 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7aeb06f78ee4abba64ca2c5c7a848fd2616da6fb;p=thirdparty%2FPython%2Fcpython.git Do not run test_gdb when gdb embeds Python 2. (GH-31956) --- diff --git a/Lib/test/test_gdb.py b/Lib/test/test_gdb.py index 344fd3dd3f7f..0f39b8f45714 100644 --- a/Lib/test/test_gdb.py +++ b/Lib/test/test_gdb.py @@ -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)