Fixed automated testing
authorAaron Traas <aaron@traas.org>
Wed, 28 Jun 2017 19:04:38 +0000 (15:04 -0400)
committerAaron Traas <aaron@traas.org>
Thu, 29 Jun 2017 14:16:41 +0000 (10:16 -0400)
.gitlab-ci.yml
Makefile
tests/Makefile

index 20e466b958fca76dcbd8515397b5246bfcb539cc..7198e7e123fa068d0a31556478baaa38f384450a 100644 (file)
@@ -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:
     - 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
     - make coverage
+    - cd ..
   artifacts:
     paths:
       - coverage
   artifacts:
     paths:
       - coverage
index d9436e0d7633ec0acb01977cdb4644b8b5ac385f..f1e51f366f24106e6ef191d4b81c06b1ec4e0852 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -85,6 +85,7 @@ clean:
        rm -f README advent.6 MANIFEST *.tar.gz
        rm -f *~
        rm -f .*~
        rm -f README advent.6 MANIFEST *.tar.gz
        rm -f *~
        rm -f .*~
+       rm -rf coverage advent.info
        cd tests; $(MAKE) --quiet clean
 
 
        cd tests; $(MAKE) --quiet clean
 
 
@@ -94,6 +95,9 @@ cheat: $(CHEAT_OBJS) linenoise.o newdb.o
 check: advent cheat
        cd tests; $(MAKE) --quiet
 
 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.
 .SUFFIXES: .adoc .html .6
 
 # Requires asciidoc and xsltproc/docbook stylesheets.
@@ -153,7 +157,4 @@ debug: CCFLAGS += -O0 --coverage -ggdb
 debug: linty
 debug: cheat
 
 debug: linty
 debug: cheat
 
-coverage: debug check
-       lcov -t "advent" -o advent.info -c -d .
-       genhtml -o coverage/ advent.info
 
 
index 07d39fd448766bd159e5f8bbd6aea6d4875a7b51..d2ccb148f4f2f22ba640e2be1fd5b63f6ebc592a 100644 (file)
@@ -13,6 +13,10 @@ check: regress
        @-advent -x 2>/dev/null # Get usage message into coverage tests
        @-advent -l /dev/null <pitfall.log >/dev/null
 
        @-advent -x 2>/dev/null # Get usage message into coverage tests
        @-advent -l /dev/null <pitfall.log >/dev/null
 
+coverage: check
+       lcov -t "advent" -o ../advent.info -c -d ..
+       genhtml -o ../coverage/ ../advent.info
+
 .SUFFIXES: .chk
 
 clean:
 .SUFFIXES: .chk
 
 clean: