debian/tests/python: Fix spurious failure due to misuse of stderr

While pycodestyle and pyflakes wrongly write error messages to stdout,
the unittest module has the opposite bug: it writes successful status
messages to stderr.
This commit is contained in:
Ben Hutchings 2019-02-07 04:13:56 +00:00
parent 886c02b804
commit 406f867ae8
2 changed files with 5 additions and 1 deletions

1
debian/changelog vendored
View File

@ -100,6 +100,7 @@ linux (4.19.17-1) UNRELEASED; urgency=medium
* [armhf,arm64] serial: 8250: Disable SERIAL_8250_DEPRECATED_OPTIONS
* percpu: convert spin_lock_irq to spin_lock_irqsave (fixes boot failure with
alpha-generic flavour)
* debian/tests/python: Fix spurious failure due to misuse of stderr
[ Marcin Juszkiewicz ]
* [arm64] enable ARM_CCI_PMU so ARM_CCI400_PMU and ARM_CCI5xx_PMU options

5
debian/tests/python vendored
View File

@ -34,4 +34,7 @@ if ! xargs pyflakes3 < "$sources"; then
fi
echo "I: Running debian_linux.debian unit tests..."
PYTHONPATH=debian/lib/python python3 -m debian_linux.debian || true
# unittest only writes to stderr
if ! PYTHONPATH=debian/lib/python python3 -m debian_linux.debian 2>&1; then
echo >&2 "E: some unit tests failed"
fi