mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
#12660: Skip test_gdb when run from an installed Python.
This commit is contained in:
parent
73954040f6
commit
f1b34ee61b
1 changed files with 4 additions and 0 deletions
|
@ -7,6 +7,7 @@ import os
|
|||
import re
|
||||
import subprocess
|
||||
import sys
|
||||
import sysconfig
|
||||
import unittest
|
||||
import locale
|
||||
|
||||
|
@ -24,6 +25,9 @@ if int(gdb_version_number.group(1)) < 7:
|
|||
raise unittest.SkipTest("gdb versions before 7.0 didn't support python embedding"
|
||||
" Saw:\n" + gdb_version.decode('ascii', 'replace'))
|
||||
|
||||
if not sysconfig.is_python_build():
|
||||
raise unittest.SkipTest("test_gdb only works on source builds at the moment.")
|
||||
|
||||
# Verify that "gdb" was built with the embedded python support enabled:
|
||||
cmd = "--eval-command=python import sys; print sys.version_info"
|
||||
p = subprocess.Popen(["gdb", "--batch", cmd],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue