Package: libarchive
Severity: wishlist
This patch should reveal log files if any tests fail.
Bad side is that it doesn't fail the build if tests fail.
I tried to use $$? to check the exit status of dh_auto_test
and fail after showing the log files, but couldn't make it
work. Looks like gnu make doesn't support $$?
If you have a better idea to make it fail *after* showing the
log files, please apply it. It would be much better to see why
the errors fail directly in the buildd logs. :)
-- System Information:
Debian Release: wheezy/sid
APT prefers oneiric-updates
APT policy: (500, 'oneiric-updates'), (500, 'oneiric-security'), (500,
'oneiric'), (100, 'oneiric-backports')
Architecture: amd64 (x86_64)
Kernel: Linux 3.0.0-16-generic (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
--- debian/rules.1 2012-03-05 20:47:52.000000000 +0100
+++ debian/rules 2012-03-06 00:02:00.000000000 +0100
@@ -14,11 +14,15 @@
override_dh_auto_test:
ifneq (,$(shell locale -a | grep en_US.utf8))
- dh_auto_test --parallel
+ -dh_auto_test --parallel
else
mkdir -p tmp-locales
localedef -i /usr/share/i18n/locales/en_US -c -f UTF-8 \
-A /usr/share/locale/locale.alias tmp-locales/en_US.UTF-8
- LOCPATH=$(CURDIR)/tmp-locales dh_auto_test --parallel
+ -LOCPATH=$(CURDIR)/tmp-locales dh_auto_test --parallel
rm -rf tmp-locales
endif
+ # Show test log files (they exist only if tests failed)
+ -ls -l /tmp/libarchive* /tmp/bsdtar* /tmp/bsdcpio*
+ -find /tmp/libarchive* /tmp/bsdtar* /tmp/bsdcpio* -maxdepth 1 -type f \
+ -exec echo "FAILED LOGFILE {}" \; -exec cat "{}" \;