diff --git a/Makefile.coq.local b/Makefile.coq.local
index 320d96b05c3177332858a0ec1919c472043a1dcf..3ba077e8d8d2f0ba0f98d2c69f3432307df439d4 100644
--- a/Makefile.coq.local
+++ b/Makefile.coq.local
@@ -1,5 +1,5 @@
-# run tests with main build
-real-all: test
+# Run tests interleaved with main build.  They have to be in the same target for this.
+real-all: $(if $(NO_TEST),,test)
 
 # the test suite
 TESTFILES=$(wildcard tests/*.v)
@@ -23,7 +23,7 @@ $(TESTFILES:.v=.vo): %.vo: %.v $(if $(MAKE_REF),,%.ref)
 	  else \
 	    REF="tests/$$TEST.ref"; \
 	  fi && \
-	  echo $(if $(MAKE_REF),"COQTEST [make ref] `basename "$$REF"`","COQTEST$(if $(COQ_OLD), [ignored],) `basename "$$REF"`") && \
+	  echo "COQTEST$(if $(MAKE_REF), [make ref],$(if $(COQ_OLD), [no ref],)) $$REF" && \
 	  TMPFILE="$$(mktemp)" && \
 	  $(TIMER) $(COQ_TEST) $(COQFLAGS) $(COQLIBS) -load-vernac-source $< > "$$TMPFILE" && \
 	  $(if $(MAKE_REF), \