summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile23
-rw-r--r--TESTING7
2 files changed, 29 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index d7b0614..b5e3296 100644
--- a/Makefile
+++ b/Makefile
@@ -96,6 +96,21 @@ $(RUN_GEN_BIN) $(shell pwd) $(shell pwd)/bin $(shell pwd)/lib $(shell pwd)/plugi
chmod 755 $2
endef
+ifeq ($(COVER_GTT),yes)
+define GEN_LOCAL_TESTING_BIN
+
+$(RUN_GEN_BIN) $(shell pwd) $(shell pwd)/bin $(shell pwd)/lib $(shell pwd)/plugins $1 $2 $(shell pwd)/extras/luacov/src $(shell pwd)/.coverage/
+chmod 755 $2
+
+endef
+else
+define GEN_LOCAL_TESTING_BIN
+
+$(RUN_GEN_BIN) $(shell pwd) $(shell pwd)/bin $(shell pwd)/lib $(shell pwd)/plugins $1 $2
+chmod 755 $2
+
+endef
+endif
else
define GEN_LOCAL_BIN
@@ -103,6 +118,12 @@ $(RUN_GEN_BIN) $(shell pwd) $(shell pwd)/bin $(shell pwd)/lib $(shell pwd)/plugi
chmod 755 $2
endef
+define GEN_LOCAL_TESTING_BIN
+
+$(RUN_GEN_BIN) $(shell pwd) $(shell pwd)/bin $(shell pwd)/lib $(shell pwd)/plugins $1 $2
+chmod 755 $2
+
+endef
endif
define GEN_INSTALL_BIN
@@ -163,7 +184,7 @@ bin/%: bin/%.in $(GEN_BIN) FORCE
@$(call GEN_LOCAL_BIN,$<,$@)
testing/%: testing/%.in $(GEN_BIN) FORCE
- @$(call GEN_LOCAL_BIN,$<,$@)
+ @$(call GEN_LOCAL_TESTING_BIN,$<,$@)
lib/gitano/%.lua: lib/gitano/%.lua.in $(GEN_BIN) FORCE
@$(call GEN_LOCAL_MOD,$<,$@)
diff --git a/TESTING b/TESTING
index f9a9b5b..d648c96 100644
--- a/TESTING
+++ b/TESTING
@@ -314,3 +314,10 @@ should be excluded is not, then adjust the `.luacov` file which is the
configuration for the coverage tool. This is also loaded by the internal
in-tree-only module `lib/gitano/coverage.lua` which is generated at build time
from `lib/gitano/coverage.lua.in`.
+
+If you are trying to get coverage for the `gitano-test-tool` binary in the
+`testing` directory then you will need to **also** pass `COVER_GTT=yes` when
+running the test suite. This distinction is present since around two thirds of
+all invocations of coverable code in the test suite uses the test tool to
+perform some related task, meaning that covering it causes a significant
+slowdown in testing, and increases the cost of generating the coverage report.