Add support for running tests with debug Python versions

They are failing due to `[NNNN refs]` entries in daemon log and when switching 
modes in zsh without daemon, but who cares.
This commit is contained in:
ZyX 2014-12-05 23:09:21 +03:00
parent df14aaaa9c
commit cdfe6f03b2
2 changed files with 6 additions and 0 deletions

View File

@ -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:

View File

@ -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