# HG changeset patch
# User Matthew Wild <mwild1@gmail.com>
# Date 1521279117 0
# Node ID 1f2fb8070c7c423058e65cc2ef91f199cfbb04cc
# Parent  937de0c392790584c58351f7550b2be1d8dd372d
GNUMakefile: Add 'coverage' target (requires luacov and luacov-console)

diff -r 937de0c39279 -r 1f2fb8070c7c GNUmakefile
--- a/GNUmakefile	Fri Mar 16 22:31:12 2018 +0000
+++ b/GNUmakefile	Sat Mar 17 09:31:57 2018 +0000
@@ -19,7 +19,7 @@
 MKDIR=install -d
 MKDIR_PRIVATE=$(MKDIR) -m750
 
-.PHONY: all test clean install
+.PHONY: all test coverage clean install
 
 all: prosody.install prosodyctl.install prosody.cfg.lua.install prosody.version
 	$(MAKE) -C util-src install
@@ -68,6 +68,13 @@
 test:
 	busted --lua=$(RUNWITH)
 
+coverage:
+	-rm -- luacov.*
+	busted --lua=$(RUNWITH) -c
+	luacov
+	luacov-console
+	luacov-console -s
+
 util/%.so:
 	$(MAKE) install -C util-src