diff --git a/tests/test_shells/postproc.py b/tests/test_shells/postproc.py index 3ef35972..df8a6dad 100755 --- a/tests/test_shells/postproc.py +++ b/tests/test_shells/postproc.py @@ -28,6 +28,7 @@ except IOError: hostname = socket.gethostname() user = os.environ['USER'] +REFS_RE = re.compile(r'^\[\d+ refs\]\n') IPYPY_DEANSI_RE = re.compile(r'\033(?:\[(?:\?\d+[lh]|[^a-zA-Z]+[a-ln-zA-Z])|[=>])') with codecs.open(fname, 'r', encoding='utf-8') as R: @@ -42,6 +43,8 @@ with codecs.open(fname, 'r', encoding='utf-8') as R: line = line.translate({ ord('\r'): None }) + if REFS_RE.match(line): + continue line = line.replace(hostname, 'HOSTNAME') line = line.replace(user, 'USER') if pid is not None: diff --git a/tests/test_shells/test.sh b/tests/test_shells/test.sh index 275fa9c5..ddaafecf 100755 --- a/tests/test_shells/test.sh +++ b/tests/test_shells/test.sh @@ -91,8 +91,11 @@ run_test() { SH="$1" SESNAME="powerline-shell-test-${SH}-$$" + # Note: when running screen with setuid libc unsets LD_LIBRARY_PATH, so it + # cannot be added to the `env -i` call above. run "${TEST_TYPE}" "${TEST_CLIENT}" "${SH}" \ screen -L -c tests/test_shells/screenrc -d -m -S "$SESNAME" \ + env LD_LIBRARY_PATH="${LD_LIBRARY_PATH}" \ "$@" while ! screen -S "$SESNAME" -X readreg a tests/test_shells/input.$SH ; do sleep 0.1s