]> sourceware.org Git - glibc.git/commitdiff
Avoid readline conflicts in pexpect
authorJan Kratochvil <jan.kratochvil@redhat.com>
Fri, 8 Feb 2019 18:49:19 +0000 (13:49 -0500)
committerDJ Delorie <dj@redhat.com>
Thu, 14 Feb 2019 21:28:03 +0000 (16:28 -0500)
In some cases, sensitive to readline version and the user's
environment, gdb might emit escape codes while run under python's
pexpect (i.e. testing pretty printers).  This patch, suggested
by Jan, helps isolate the test from the user's environment.

Tested on RHEL 7 x86_64 with DTS 7 and EPEL, which is one
magic combination of components that triggers this bug.

ChangeLog
scripts/test_printers_common.py

index d9852ab95c38f63cf6dd43af43fe7d58ffcd171b..d3560ade54b7ba0fa34b5288d58c93040d75a163 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2019-02-14  Jan Kratochvil <jan.kratochvil@redhat.com>
+
+       * scripts/test_printers_common.py: Set TERM to a known harmless
+       value.
+
 2019-02-14  Joseph Myers  <joseph@codesourcery.com>
 
        * sunrpc/xdr.c (xdr_int): Add fall-through comment.
index dada6aadde35de42d49be1403da64a869aab0120..b2bd4ba1ccfd687393677e61d54cae4686f16f0a 100644 (file)
@@ -60,6 +60,10 @@ TIMEOUTFACTOR = os.environ.get('TIMEOUTFACTOR')
 if TIMEOUTFACTOR:
     timeout = int(TIMEOUTFACTOR)
 
+# Otherwise GDB is run in interactive mode and readline may send escape
+# sequences confusing output for pexpect.
+os.environ["TERM"]="dumb"
+
 try:
     # Check the gdb version.
     version_cmd = '{0} --version'.format(gdb_invocation, timeout=timeout)
This page took 0.074027 seconds and 5 git commands to generate.