From 406f867ae8bf163ed3cd7dfd63a1821c1d167c7a Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Thu, 7 Feb 2019 04:13:56 +0000 Subject: [PATCH] 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. --- debian/changelog | 1 + debian/tests/python | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index b55ca1aac..0b1bf0061 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 diff --git a/debian/tests/python b/debian/tests/python index d395a3fd2..3f1f8c7e8 100755 --- a/debian/tests/python +++ b/debian/tests/python @@ -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