From ec8379bdfa44bd5030e8e7b43d2b2fcafae5cc13 Mon Sep 17 00:00:00 2001
From: Iustin Pop <iustin@google.com>
Date: Tue, 22 Mar 2011 11:26:13 +0100
Subject: [PATCH] Port the live-test htools rule to the main Makefile

This was a bit tricky, as the compilation from the top-dir changes the
paths in the .tix/.mix files.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
---
 Makefile.am | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/Makefile.am b/Makefile.am
index d913a1603..209eb346a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1068,6 +1068,21 @@ hs-coverage: $(haskell_tests)
 	hpc markup --destdir=doc/hs-coverage htools/test $(HPCEXCL)
 	hpc report htools/test $(HPCEXCL)
 
+# Special "kind-of-QA" target for htools, needs special setup (all
+# tools compiled with -fhpc)
+.PHONY: live-test
+live-test: all
+	set -e ; \
+	cd htools; \
+	rm -f .hpc; ln -s ../.hpc .hpc; \
+	rm -f *.tix *.mix; \
+	./live-test.sh; \
+	hpc sum --union $(HPCEXCL) $(addsuffix .tix,$(HPROGS:htools/%=%)) \
+	  --output=live-test.tix ; \
+	@mkdir_p@ ../doc/hs-coverage ; \
+	hpc markup --destdir=../doc/hs-coverage live-test \
+		--srcdir=.. $(HPCEXCL) ; \
+	hpc report --srcdir=.. live-test $(HPCEXCL)
 
 commit-check: distcheck lint apidoc
 
-- 
GitLab