[sagemath] 02/02: Better way of disabling test failures, that will automatically get re-enabled on upload

Ximin Luo infinity0 at debian.org
Tue Nov 29 12:24:52 UTC 2016


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch master
in repository sagemath.

commit 281d0635244489230e46b16608fae538e8e93e24
Author: Ximin Luo <infinity0 at debian.org>
Date:   Tue Nov 29 13:16:52 2016 +0100

    Better way of disabling test failures, that will automatically get re-enabled on upload
---
 debian/rules | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/debian/rules b/debian/rules
index 12b2dba..00e7ebc 100755
--- a/debian/rules
+++ b/debian/rules
@@ -147,7 +147,7 @@ ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
 	# `debian/rules build` twice it will go directly to (override_)dh_auto_test
 	# (and then this target) without trying (override_)dh_auto_build again.
 	cd sage && ./sage -t -p --all --long $(EXTRA_SAGE_TEST_FLAGS) --logfile=logs/ptestlong.log || true
-	debian/rules had-few-failures
+	test $$(dpkg-parsechangelog -SDistribution) = UNRELEASED || debian/rules had-few-failures
 endif
 
 # If the docbuild fails and you want to try again, you should run this first.
@@ -168,15 +168,14 @@ build-dep: debian/control
 
 had-few-failures:
 	# Allow < 80 tests to fail, but no "special" failures like Killed etc
-	# test "$$(debian/rules -s --no-print-directory failed-tests-total)" -lt 80
-	# Never fail, as long as we are in test mode. Change before uploading.
-	sleep 0
+	test "$$(debian/rules -s --no-print-directory failed-tests-total)" -lt 80
 
 FAILED_TESTS = grep '^sage -t .*  \#' sage/logs/ptestlong.log
 failed-tests:
 	$(FAILED_TESTS)
 
 failed-tests-total:
+	test -f sage/logs/ptestlong.log
 	grep "Failed example:" sage/logs/ptestlong.log | wc -l
 	$(FAILED_TESTS) | { ! grep '# [^0-9]'; }
 

-- 
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