Skip to content
This repository was archived by the owner on Aug 7, 2025. It is now read-only.

Commit a11afb9

Browse files
committed
Cleanups for building with test coverage
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
1 parent 33273c0 commit a11afb9

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ bsdump
1313
bspatch
1414
compile
1515
configure
16+
coverage/
1617
depcomp
1718
install-sh
1819
libbsdiff.la
@@ -21,6 +22,8 @@ ltmain.sh
2122
m4/
2223
missing
2324
src/.dirstamp
25+
src/*.gcda
26+
src/*.gcno
2427
stamp-h1
2528
bsdiff-*.tar.xz
2629
test/*.diff

Makefile.am

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,15 @@ EXTRA_DIST = \
2828
AUTOMAKE_OPTIONS = color-tests parallel-tests
2929

3030
if COVERAGE
31-
coverage:
31+
AM_CFLAGS += --coverage
32+
33+
coverage: coverage-clean
3234
mkdir -p coverage
3335
lcov --compat-libtool --directory . --capture --output-file coverage/report
3436
genhtml -o coverage/ coverage/report
35-
AM_CFLAGS += --coverage
37+
38+
coverage-clean:
39+
rm -rf coverage
3640
endif
3741

3842
bin_PROGRAMS = \
@@ -98,7 +102,10 @@ distclean-local:
98102
install-exec-hook:
99103
perl findstatic.pl */*.o | grep -v Checking ||:
100104

101-
check_PROGRAMS =
105+
TEST_EXTENSIONS = .sh
106+
TESTS = $(dist_check_SCRIPTS)
107+
dist_check_SCRIPTS = \
108+
test/run.sh
102109

103110
release:
104111
@git rev-parse v$(PACKAGE_VERSION) &> /dev/null; \

0 commit comments

Comments
 (0)