From 52c96f45f2e5d82b695d6e7d1eaccd47287d92c5 Mon Sep 17 00:00:00 2001
From: Ralf Jung <jung@mpi-sws.org>
Date: Tue, 26 Jun 2018 18:05:18 +0200
Subject: [PATCH] don't check output on testsuite at all when running against
 8.9

---
 .gitlab-ci.yml     |  1 -
 Makefile.coq.local | 12 ++++++++----
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index bb8986232..2cc2051fa 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -29,7 +29,6 @@ variables:
 build-coq.dev:
   <<: *template
   variables:
-    MAKE_REF: "1" # don't check test output
     OPAM_PINS: "coq version dev"
     VALIDATE: "1"
 
diff --git a/Makefile.coq.local b/Makefile.coq.local
index 0937c4a9e..920da24df 100644
--- a/Makefile.coq.local
+++ b/Makefile.coq.local
@@ -8,6 +8,7 @@ test: $(TESTFILES:.v=.vo)
 .PHONY: test
 
 COQ_TEST=$(COQTOP) $(COQDEBUG) -batch -test-mode
+COQ_BROKEN=$(shell echo "$(COQ_VERSION)" | egrep "^8\.9" > /dev/null && echo 1)
 
 # Can't use pipes because that discards error codes and dash provides no way to control that.
 # Also egrep errors if it doesn't match anything, we have to ignore that.
@@ -20,13 +21,16 @@ tests/.coqdeps.d: $(TESTFILES)
 -include tests/.coqdeps.d
 
 $(TESTFILES:.v=.vo): %.vo: %.v $(if $(MAKE_REF),,%.ref)
-	$(SHOW)$(if $(MAKE_REF),COQTEST [ref],COQTEST) $<
+	$(SHOW)$(if $(COQ_BROKEN),COQTEST [ignore],$(if $(MAKE_REF),COQTEST [ref],COQTEST)) $<
 	$(HIDE)TEST="$$(basename -s .v $<)" && \
 	  TMPFILE="$$(mktemp)" && \
 	  $(TIMER) $(COQ_TEST) $(TIMING_ARG) $(COQFLAGS) $(COQLIBS) -load-vernac-source $< $(TIMING_EXTRA) > "$$TMPFILE" && \
 	  ($(REF_FILTER) < "$$TMPFILE" > "$$TMPFILE.filtered" || true) && \
-	  $(if $(MAKE_REF), \
-	    mv "$$TMPFILE.filtered" "tests/$$TEST.ref", \
-	    diff -u "tests/$$TEST.ref" "$$TMPFILE.filtered") && \
+	  $(if $(COQ_BROKEN), true, \
+	    $(if $(MAKE_REF), \
+	      mv "$$TMPFILE.filtered" "tests/$$TEST.ref", \
+	      diff -u "tests/$$TEST.ref" "$$TMPFILE.filtered" \
+            ) \
+          ) && \
 	  rm -f "$$TMPFILE" "$$TMPFILE.filtered" && \
 	  touch $@
-- 
GitLab