Skip to content

Commit

Permalink
build: test and check targets both generate coverage info
Browse files Browse the repository at this point in the history
Previously, the test Makefile target didn't set `CFLAGS` correctly and then
failed the tests because the coverage info didn't exist.

Also add the `gcno`/`gcda` extensions to the ignore list.
  • Loading branch information
jaqx0r committed Aug 18, 2023
1 parent 65c6585 commit cbcf1bf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,5 @@ debian/debhelper-build-stamp
/libnss_cache.so
/*.c.gcov
/build/
*.gcda
*.gcno
11 changes: 4 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,10 @@ INDEX_DATA_TOUCH = $(TESTDATA)/.touch.index_data
.PHONY: all
all: $(LIBRARY)

.PHONY: test
test: test_getent time_lookups

.PHONY: check
check: CFLAGS += -O0 -g --coverage
check: LDFLAGS += --coverage
check: test_getent time_lookups
.PHONY: test check
test check: CFLAGS += -O0 -g --coverage
test check: LDFLAGS += --coverage
test check: test_getent time_lookups

lookup: lookup.o $(LIBNSSCACHE)

Expand Down

0 comments on commit cbcf1bf

Please sign in to comment.