[dak/master] Export a junit report of the tests when PYBUILD_EXTRA_ARGS is set
---
debian/rules | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/debian/rules b/debian/rules
index 2b07de7..5ed343e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -3,10 +3,17 @@
%:
dh $@
+ifneq ($(JENKINS_EXPORTS_DIR),)
+PYBUILD_EXTRA_ARGS = --junit-xml=$(JENKINS_EXPORTS_DIR)/test-results/tests.xml
+endif
+
override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
+ifneq ($(JENKINS_EXPORTS_DIR),)
+ mkdir -pv $(JENKINS_EXPORTS_DIR)/test-results
+endif
mkdir -p debian/test-gnupghome
- GNUPGHOME=$$(pwd)/debian/test-gnupghome py.test -v tests
+ GNUPGHOME=$$(pwd)/debian/test-gnupghome py.test -v tests $(PYBUILD_EXTRA_ARGS)
endif
# Replace with "debian/test-gnupghome/" in d/clean once
--
2.1.4
Reply to: