aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2023-10-28 23:33:55 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2023-11-06 00:46:25 +0100
commita1dbb8c3e2b84df58356dc5c658c48377132ed39 (patch)
treecac811d6b39366b8e93b4c6dec70263cff99fe53
parentUncovered files now have ALL their lines marked as uncovered. (diff)
downloadcalp-a1dbb8c3e2b84df58356dc5c658c48377132ed39.tar.gz
calp-a1dbb8c3e2b84df58356dc5c658c48377132ed39.tar.xz
Split genhtml and coverage in Makefile.
-rw-r--r--Makefile18
1 files changed, 13 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index aaa52be1..169fc574 100644
--- a/Makefile
+++ b/Makefile
@@ -5,6 +5,7 @@ COV_FILE=coverage.info
litmus \
static \
$(COV_FILE) \
+ genhtml \
lcov.info \
unit-test-deps
@@ -103,9 +104,7 @@ unit-test-deps: calp $(GO_UNIT_TESTS) $(GO_FILES) $(TEST_FILES)
# TODO (current-processor-count)
$(COV_FILE): cpucount unit-test-deps
- ./testrunner.scm --threads $(shell ./cpucount) --coverage $@ --coverage-supplement tests/unit/coverage-supplement.scm
-
-unit-test-with-cov: $(COV_FILE)
+ ./testrunner.scm --threads $(shell ./cpucount) --coverage $@ --coverage-supplement tests/unit/coverage-supplement.scm
GENHTML_FLAGS=--show-details \
--hierarchical \
@@ -113,8 +112,17 @@ GENHTML_FLAGS=--show-details \
--no-function-coverage \
--quiet
-coverage: $(COV_FILE)
- genhtml $(GENHTML_FLAGS) --output-directory $@ $<
+# TODO order between these?
+# Is it guaranteed that COV_FILE will be made before genhtml?
+# Run full coverage test, then generate resulting HTML directory
+coverage: $(COV_FILE) genhtml
+
+# Only generate HTML output from coverage info.
+# Allows manually running
+# ./testrunner.scm --file <indiviual-file> -coverage coverage.info
+# To quickly get coverage data for a specific file.
+genhtml:
+ genhtml $(GENHTML_FLAGS) --output-directory coverage $(COV_FILE)
CHECK_FLAGS = \