Improve Makefile recipe for coverage testing.
This commit is contained in:
parent
1efd1027f7
commit
12d39ef72b
1 changed files with 8 additions and 1 deletions
9
Makefile
9
Makefile
|
@ -65,10 +65,12 @@ cheat: $(CHEAT_OBJS) dungeon.o
|
|||
check: advent cheat
|
||||
cd tests; $(MAKE) --quiet
|
||||
|
||||
# Requires gcov, lcov, libasan6, and libubsan1
|
||||
# The last two are Ubuntu names, might vary onb other distributions.
|
||||
# After this, run your browser on coverage/open-adventure/index.html
|
||||
# to see coverage results. Browse coverage/adventure.yaml.html
|
||||
# to see symbol coverage over the YAML file.
|
||||
coverage: debug
|
||||
coverage: clean debug
|
||||
cd tests; $(MAKE) coverage --quiet
|
||||
|
||||
.SUFFIXES: .adoc .html .6
|
||||
|
@ -129,6 +131,11 @@ linty: CCFLAGS += -Winit-self
|
|||
linty: CCFLAGS += -Wpointer-arith
|
||||
linty: advent cheat
|
||||
|
||||
# These seem to be more modeern options for enabling coverage testing.
|
||||
# Documenting them here in case a future version bump disables --coverage.
|
||||
#debug: CCFLAGS += -ftest-coverage
|
||||
#debug: CCFLAGS += -fprofile-arcs
|
||||
|
||||
debug: CCFLAGS += -O0
|
||||
debug: CCFLAGS += --coverage
|
||||
debug: CCFLAGS += -ggdb
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue