]> granicus.if.org Git - python/commitdiff
This check can still fail on RHEL6
authorNick Coghlan <ncoghlan@gmail.com>
Sun, 22 Sep 2013 09:36:09 +0000 (19:36 +1000)
committerNick Coghlan <ncoghlan@gmail.com>
Sun, 22 Sep 2013 09:36:09 +0000 (19:36 +1000)
Lib/test/test_gdb.py

index 5302b5adb428635c81a792bd1e643a87e0197771..d1e656704bd291db306b206b2318df4ffc2e27f5 100644 (file)
@@ -53,13 +53,13 @@ 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")
 
-# Verify that "gdb" can load our custom hooks.  In theory this should never
-# fail, but we don't handle the case of the hooks file not existing if the
-# tests are run from an installed Python (we'll produce failures in that case).
+# Verify that "gdb" can load our custom hooks, as OS security settings may
+# disallow this without a customised .gdbinit.
 cmd = ['--args', sys.executable]
 _, gdbpy_errors = run_gdb('--args', sys.executable)
 if "auto-loading has been declined" in gdbpy_errors:
     msg = "gdb security settings prevent use of custom hooks: "
+    raise unittest.SkipTest(msg + gdbpy_errors.rstrip())
 
 def python_is_optimized():
     cflags = sysconfig.get_config_vars()['PY_CFLAGS']