mirror of
https://github.com/powerline/powerline.git
synced 2025-07-25 06:46:33 +02:00
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:
parent
df14aaaa9c
commit
cdfe6f03b2
@ -28,6 +28,7 @@ except IOError:
|
|||||||
hostname = socket.gethostname()
|
hostname = socket.gethostname()
|
||||||
user = os.environ['USER']
|
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])|[=>])')
|
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:
|
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({
|
line = line.translate({
|
||||||
ord('\r'): None
|
ord('\r'): None
|
||||||
})
|
})
|
||||||
|
if REFS_RE.match(line):
|
||||||
|
continue
|
||||||
line = line.replace(hostname, 'HOSTNAME')
|
line = line.replace(hostname, 'HOSTNAME')
|
||||||
line = line.replace(user, 'USER')
|
line = line.replace(user, 'USER')
|
||||||
if pid is not None:
|
if pid is not None:
|
||||||
|
@ -91,8 +91,11 @@ run_test() {
|
|||||||
SH="$1"
|
SH="$1"
|
||||||
SESNAME="powerline-shell-test-${SH}-$$"
|
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}" \
|
run "${TEST_TYPE}" "${TEST_CLIENT}" "${SH}" \
|
||||||
screen -L -c tests/test_shells/screenrc -d -m -S "$SESNAME" \
|
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
|
while ! screen -S "$SESNAME" -X readreg a tests/test_shells/input.$SH ; do
|
||||||
sleep 0.1s
|
sleep 0.1s
|
||||||
|
Loading…
x
Reference in New Issue
Block a user