Diff

GNUmakefile @ 8612:1f2fb8070c7c

GNUMakefile: Add 'coverage' target (requires luacov and luacov-console)
author Matthew Wild <mwild1@gmail.com>
date Sat, 17 Mar 2018 09:31:57 +0000
parent 8592:bd4f8a2b72c7
child 8782:daa518a22c34
line wrap: on
line diff
--- 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