From a4341923730d5c04d959acc76244d44ba0c4027f Mon Sep 17 00:00:00 2001 From: Aaron Traas Date: Wed, 28 Jun 2017 15:04:38 -0400 Subject: [PATCH] Fixed automated testing --- .gitlab-ci.yml | 3 +++ Makefile | 7 ++++--- tests/Makefile | 4 ++++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 20e466b..7198e7e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -88,7 +88,10 @@ test:debug: - apk add make gcc - apk add lcov --update-cache --repository http://dl-3.alpinelinux.org/alpine/edge/testing/ --allow-untrusted script: + - cd tests + - make - make coverage + - cd .. artifacts: paths: - coverage diff --git a/Makefile b/Makefile index d9436e0..f1e51f3 100644 --- a/Makefile +++ b/Makefile @@ -85,6 +85,7 @@ clean: rm -f README advent.6 MANIFEST *.tar.gz rm -f *~ rm -f .*~ + rm -rf coverage advent.info cd tests; $(MAKE) --quiet clean @@ -94,6 +95,9 @@ cheat: $(CHEAT_OBJS) linenoise.o newdb.o check: advent cheat cd tests; $(MAKE) --quiet +coverage: debug cheat + cd tests; $(MAKE) coverage --quiet + .SUFFIXES: .adoc .html .6 # Requires asciidoc and xsltproc/docbook stylesheets. @@ -153,7 +157,4 @@ debug: CCFLAGS += -O0 --coverage -ggdb debug: linty debug: cheat -coverage: debug check - lcov -t "advent" -o advent.info -c -d . - genhtml -o coverage/ advent.info diff --git a/tests/Makefile b/tests/Makefile index 07d39fd..d2ccb14 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -13,6 +13,10 @@ check: regress @-advent -x 2>/dev/null # Get usage message into coverage tests @-advent -l /dev/null /dev/null +coverage: check + lcov -t "advent" -o ../advent.info -c -d .. + genhtml -o ../coverage/ ../advent.info + .SUFFIXES: .chk clean: -- 2.31.1