[Lldb-commits] [lldb] r226037 - test: Add workaround for FreeBSD libedit vs readline issue
Ed Maste
emaste at freebsd.org
Wed Jan 14 12:32:33 PST 2015
Author: emaste
Date: Wed Jan 14 14:32:33 2015
New Revision: 226037
URL: http://llvm.org/viewvc/llvm-project?rev=226037&view=rev
Log:
test: Add workaround for FreeBSD libedit vs readline issue
If stdout is not a terminal Python executes
rl_variable_bind ("enable-meta-key", "off");
This produces a warning with FreeBSD's libedit because the
enable-meta-key variable is unknown. Not an issue on Apple because
cpython commit f0ab6f9f0603 added a #ifndef __APPLE__ around the call.
See http://bugs.python.org/issue19884 for more information.
For now we just discard the warning output to get the tests working
again on FreeBSD.
Modified:
lldb/trunk/test/dotest.py
Modified: lldb/trunk/test/dotest.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/dotest.py?rev=226037&r1=226036&r2=226037&view=diff
==============================================================================
--- lldb/trunk/test/dotest.py (original)
+++ lldb/trunk/test/dotest.py Wed Jan 14 14:32:33 2015
@@ -1067,6 +1067,18 @@ def setupSysPath():
if lldb_dash_p_result and not lldb_dash_p_result.startswith(("<", "lldb: invalid option:")) \
and not lldb_dash_p_result.startswith("Traceback"):
lines = lldb_dash_p_result.splitlines()
+
+ # Workaround for readline vs libedit issue on FreeBSD. If stdout
+ # is not a terminal Python executes
+ # rl_variable_bind ("enable-meta-key", "off");
+ # This produces a warning with FreeBSD's libedit because the
+ # enable-meta-key variable is unknown. Not an issue on Apple
+ # because cpython commit f0ab6f9f0603 added a #ifndef __APPLE__
+ # around the call. See http://bugs.python.org/issue19884 for more
+ # information. For now we just discard the warning output.
+ if len(lines) >= 1 and lines[0].startswith("bind: Invalid command"):
+ lines.pop(0)
+
if len(lines) >= 1 and os.path.isfile(os.path.join(lines[0], init_in_python_dir)):
lldbPath = lines[0]
if "freebsd" in sys.platform or "linux" in sys.platform:
More information about the lldb-commits
mailing list