From 666652ed841dc38d39d88ec5ba739e0b0e7c0871 Mon Sep 17 00:00:00 2001
From: Brian Warner <warner@lothar.com>
Date: Thu, 12 Feb 2009 15:18:29 -0700
Subject: [PATCH] Makefile: add figleaf-delta-output, to render figleaf
 coverage differences with a previous run

---
 Makefile | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 3671ad1f..d7e66fb9 100644
--- a/Makefile
+++ b/Makefile
@@ -82,7 +82,8 @@ endif
 
 # TESTING
 
-.PHONY: signal-error-deps test test-figleaf figleaf-output
+.PHONY: signal-error-deps test test-figleaf quicktest quicktest-figleaf
+.PHONY: figleaf-output get-old-figleaf-coverage figleaf-delta-output
 
 
 signal-error-deps:
@@ -127,6 +128,18 @@ quicktest-figleaf: src/allmydata/_version.py
 
 figleaf-output:
 	$(RUNPP) -p -c "misc/figleaf2html -d coverage-html -r src -x misc/figleaf.excludes"
+	cp .figleaf coverage-html/figleaf.pickle
+	@echo "now point your browser at coverage-html/index.html"
+
+# use these two targets to compare this coverage against the previous run.
+# The deltas only work if the old test was run in the same directory, since
+# it compares absolute filenames.
+get-old-figleaf-coverage:
+	wget --progress=dot -O old.figleaf http://allmydata.org/tahoe-figleaf/current/figleaf.pickle
+
+figleaf-delta-output:
+	$(RUNPP) -p -c "misc/figleaf2html -d coverage-html -r src -x misc/figleaf.excludes -o old.figleaf"
+	cp .figleaf coverage-html/figleaf.pickle
 	@echo "now point your browser at coverage-html/index.html"
 
 # after doing test-figleaf and figleaf-output, point your browser at
@@ -146,7 +159,6 @@ $(error COVERAGEDIR must be set when using UPLOAD_TARGET)
 endif
 
 upload-figleaf:
-	cp .figleaf coverage-html/figleaf.pickle
 	rsync -a coverage-html/ $(UPLOAD_TARGET)
 	ssh $(UPLOAD_HOST) make update-tahoe-figleaf COVERAGEDIR=$(COVERAGEDIR)
 else
-- 
2.45.2