[sagemath] 01/02: Print explanations when deciding if a test run was successful.
Tobias Hansen
thansen at moszumanska.debian.org
Sat Sep 16 14:21:40 UTC 2017
This is an automated email from the git hooks/post-receive script.
thansen pushed a commit to branch master
in repository sagemath.
commit 67897964ed4237331f6982f4dcd1dfcf64ba59a9
Author: Tobias Hansen <thansen at debian.org>
Date: Sat Sep 16 01:10:36 2017 +0100
Print explanations when deciding if a test run was successful.
---
debian/rules | 27 ++++++++++++++++++++++-----
1 file changed, 22 insertions(+), 5 deletions(-)
diff --git a/debian/rules b/debian/rules
index c37f41d..98751aa 100755
--- a/debian/rules
+++ b/debian/rules
@@ -5,6 +5,9 @@ include /usr/share/dpkg/architecture.mk
#export DH_VERBOSE=1
+MAX_TEST_FAILURES = 50
+MAX_TEST_FAILURES_RERUN = $(shell expr 2 \* $(MAX_TEST_FAILURES))
+
# If we're doing a pre-release, then be less strict about test failures, etc
ifneq (,$(filter $(DEB_DISTRIBUTION),UNRELEASED unstable-sage))
is_prerelease = true
@@ -168,13 +171,27 @@ else
IGNORE_FAILURES =
endif
had-few-failures:
- test -f $(LOGFILE)
- test "$$($(TESTS_MK) failed-tests-total-normal)" -lt 50
- test -z "$$($(TESTS_MK) failed-tests-special $(IGNORE_FAILURES))"
+ if ! test -f $(LOGFILE); then echo "Error: log file $(LOGFILE) not found"; false; fi
+ N_TEST_FAILURES="$$($(TESTS_MK) failed-tests-total-normal)"; \
+ if ! test $${N_TEST_FAILURES} -le $(MAX_TEST_FAILURES); then \
+ echo "Error: $${N_TEST_FAILURES} tests failed, up to $(MAX_TEST_FAILURES) failures are tolerated"; \
+ false; \
+ else \
+ echo "Success: $${N_TEST_FAILURES} tests failed, up to $(MAX_TEST_FAILURES) failures are tolerated"; \
+ fi
+ if ! test -z "$$($(TESTS_MK) failed-tests-special $(IGNORE_FAILURES))"; then \
+ echo "Error: critical test failures (e.g. timeout, segfault, etc.)"; false; fi
had-not-too-many-failures:
- test -f $(LOGFILE)
- test "$$($(TESTS_MK) failed-tests-total-normal)" -lt 80
+ echo "Checking number of failed tests to determine whether to rerun tests in series..."
+ if ! test -f $(LOGFILE); then echo "Error: log file $(LOGFILE) not found"; false; fi
+ N_TEST_FAILURES="$$($(TESTS_MK) failed-tests-total-normal)"; \
+ if ! test $${N_TEST_FAILURES} -le $(MAX_TEST_FAILURES_RERUN); then \
+ echo "No: $${N_TEST_FAILURES} tests failed, up to $(MAX_TEST_FAILURES_RERUN) failures are tolerated for rerun"; \
+ false; \
+ else \
+ echo "Yes: $${N_TEST_FAILURES} tests failed, up to $(MAX_TEST_FAILURES_RERUN) failures are tolerated for rerun"; \
+ fi
override_dh_auto_install:
rm -rf debian/build/usr/var/tmp/sage/build
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/sagemath.git
More information about the debian-science-commits
mailing list