Do not run test_gdb when gdb embeds Python 2. (GH-31956)

This commit is contained in:
Inada Naoki 2022-03-17 18:00:56 +09:00 committed by GitHub
parent 15df8f8d89
commit 7aeb06f78e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View 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)