[Git][java-team/honeysql-clojure][master] 3 commits: Fix FTBFS by running tests in a specific order (Closes: #907765).

Cyril Brulebois gitlab at salsa.debian.org
Thu Feb 7 11:35:17 GMT 2019


Cyril Brulebois pushed to branch master at Debian Java Maintainers / honeysql-clojure


Commits:
3da0567f by Cyril Brulebois at 2018-12-30T22:00:19Z
Fix FTBFS by running tests in a specific order (Closes: #907765).

Instead of blindly (reverse-)sorting the results of the find command and
trusting it to be right, encode a suitable sequence of tests. Also make
sure to error out when tests are added or removed, to make sure this
sequence get refreshed when needed.

- - - - -
b2e175bd by Cyril Brulebois at 2018-12-30T22:01:49Z
Update Vcs-{Browser,Git} to point to salsa (alioth's replacement).

- - - - -
e95e1de7 by Cyril Brulebois at 2019-02-07T11:25:13Z
releasing version 0.8.2-2

- - - - -


3 changed files:

- debian/changelog
- debian/control
- debian/rules


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,15 @@
+honeysql-clojure (0.8.2-2) unstable; urgency=medium
+
+  * Team upload.
+  * Fix FTBFS by running tests in a specific order. Instead of blindly
+    (reverse-)sorting the results of the find command and trusting it to
+    be right, encode a suitable sequence of tests (Closes: #907765). Also
+    make sure to error out when tests are added or removed, to make sure
+    this sequence get refreshed when needed.
+  * Update Vcs-{Browser,Git} to point to salsa (alioth's replacement).
+
+ -- Cyril Brulebois <kibi at debian.org>  Thu, 07 Feb 2019 12:24:29 +0100
+
 honeysql-clojure (0.8.2-1) unstable; urgency=medium
 
   * Initial release (Closes: #855757)


=====================================
debian/control
=====================================
@@ -11,8 +11,8 @@ Build-Depends:
  libtext-markdown-perl | markdown,
  default-jdk
 Standards-Version: 4.0.0
-Vcs-Git: https://anonscm.debian.org/git/pkg-java/honeysql-clojure.git
-Vcs-Browser: https://anonscm.debian.org/cgit/pkg-java/honeysql-clojure.git
+Vcs-Git: https://salsa.debian.org/java-team/honeysql-clojure.git
+Vcs-Browser: https://salsa.debian.org/java-team/honeysql-clojure
 Homepage: https://github.com/jkk/honeysql
 
 Package: libhoneysql-clojure


=====================================
debian/rules
=====================================
@@ -22,9 +22,21 @@ override_jh_clean:
 	rm -f $(CURDIR)/$(PRODUCED_JAR)
 	rm -rf $(CURDIR)/doc/html
 
+# Tests can't run in a random order (#907765):
+override_dh_auto_test: ORDERED_TESTS=honeysql/format_test.cljc honeysql/core_test.cljc
+override_dh_auto_test: EXPECTED=$(shell echo "$(ORDERED_TESTS)" | sed 's/ /\n/g' | sort | xargs)
+override_dh_auto_test: FOUND=$(shell cd test && find -name '*.cljc' | sed 's,^[.]/,,' | sort | xargs)
 override_dh_auto_test:
-	(cd test && find . -name '*.cljc' | \
-		xargs clojure -cp $(CURDIR)/$(PRODUCED_JAR))
+	# Make sure to detect when tests appear or disappear:
+	@if [ "$(FOUND)" != "$(EXPECTED)" ]; then \
+		echo "E: sanity check failed, available tests don't match known tests:"; \
+		echo "    - found:    $(FOUND)"; \
+		echo "    - expected: $(EXPECTED)"; \
+		echo "=> Please update ORDERED_TESTS in debian/rules accordingly"; \
+		exit 1; \
+	fi
+	# Run tests:
+	(cd test && clojure -cp $(CURDIR)/$(PRODUCED_JAR) $(ORDERED_TESTS))
 
 %.html:%.md
 	cat debian/header.html > $@



View it on GitLab: https://salsa.debian.org/java-team/honeysql-clojure/compare/ebf8356ec77a82bf46108aa9ebbfc909b6bb7276...e95e1de7fd92cb170a7abe5adaaed22061f472ac

-- 
View it on GitLab: https://salsa.debian.org/java-team/honeysql-clojure/compare/ebf8356ec77a82bf46108aa9ebbfc909b6bb7276...e95e1de7fd92cb170a7abe5adaaed22061f472ac
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20190207/73bc0ebc/attachment.html>


More information about the pkg-java-commits mailing list