-Tupfile updated, builds testBuild and releaseBuild

main
Harry van Haaren 2013-09-15 16:24:38 +01:00
parent 20b4fa72ed
commit 308d566b44
2 changed files with 25 additions and 6 deletions

20
Tupfile
View File

@ -16,8 +16,19 @@ endif
# POST
ifeq (@(LUPPP_BUILD_TESTS),y)
# run the tests: the program quits itself after tests are finished
: | luppp |> ./luppp && touch lupppDone.running |> lupppDone.running
# run the tests:
# Luppp quits after tests are finished
# gcov scrapes .gcna / .gcdo files, produces .gcov files
# cp source files into dir: needed for analysis by lcov
# lcov scrapes .gcov files into lcov.info
# genhtml produces index.html from lcov.info
: | luppp |> ./luppp &&\
gcov -r -b * &&\
cp -r *.cxx ../../src/* ./ &&\
#lcov --directory . -zerocounters && \
lcov --directory . --capture --output-file lcov.info && \
genhtml lcov.info |>
# Analyse coverage using gcov
#: foreach src/*.gcda | lupppDone.running |> echo %b |> %B.gcno
@ -25,9 +36,10 @@ ifeq (@(LUPPP_BUILD_TESTS),y)
#: foreach src/*.c | lupppDone.running |> gcov -r -b %f |> %B.c.gcov
#: foreach src/*.gcda | lupppDone.running |> gcov -r -b %f |> %B.cxx.gcov | %B.hxx.gcov
# cp -r *.cxx ../../src/* ./
# Create lcov info file
#: src/*.gcno |> lcov --directory . -zerocounters &&\
# lcov --directory . --capture --output-file lcov.info |>
#: src/*.gcno |> lcov --directory . -zerocounters && lcov --directory . --capture --output-file lcov.info |>
# Generate HTML report
#: |> genhtml lcov.info |>

View File

@ -15,5 +15,12 @@ endif
# COMPILE
: foreach *.cxx observer/*.cxx state/*.cxx cjson/*.c dsp/*.cxx controller/*.cxx \
avtk/*.cxx |> ^c^ g++ $(CFLAGS) -c %f $(INCLUDES) -o %o |> $(OUTPUT)
#: foreach *.cxx observer/*.cxx state/*.cxx cjson/*.c dsp/*.cxx controller/*.cxx avtk/*.cxx |> ^c^ g++ $(CFLAGS) -c %f $(INCLUDES) -o %o |> $(OUTPUT)
: foreach avtk/*.cxx |> ^c^ g++ $(CFLAGS) -c %f $(INCLUDES) -o %o |> $(OUTPUT)
: foreach controller/*.cxx |> ^c^ g++ $(CFLAGS) -c %f $(INCLUDES) -o %o |> $(OUTPUT)
: foreach dsp/*.cxx |> ^c^ g++ $(CFLAGS) -c %f $(INCLUDES) -o %o |> $(OUTPUT)
: foreach cjson/*.c |> ^c^ g++ $(CFLAGS) -c %f $(INCLUDES) -o %o |> $(OUTPUT)
: foreach state/*.cxx |> ^c^ g++ $(CFLAGS) -c %f $(INCLUDES) -o %o |> $(OUTPUT)
: foreach observer/*.cxx |> ^c^ g++ $(CFLAGS) -c %f $(INCLUDES) -o %o |> $(OUTPUT)
: foreach *.cxx |> ^c^ g++ $(CFLAGS) -c %f $(INCLUDES) -o %o |> $(OUTPUT)