RTC auf true

Committer:
kevman
Date:
Wed Mar 13 11:03:24 2019 +0000
Revision:
2:7aab896b1a3b
Parent:
0:38ceb79fef03
2019-03-13

Who changed what in which revision?

UserRevisionLine numberNew contents of line
kevman 0:38ceb79fef03 1 #
kevman 0:38ceb79fef03 2 # Makefile.test for combined COAP library unit tests
kevman 0:38ceb79fef03 3 #
kevman 0:38ceb79fef03 4
kevman 0:38ceb79fef03 5
kevman 0:38ceb79fef03 6 # List of subdirectories to build
kevman 0:38ceb79fef03 7 TEST_FOLDER := ./test/
kevman 0:38ceb79fef03 8 # List of unit test directories for libraries
kevman 0:38ceb79fef03 9 UNITTESTS := $(sort $(dir $(wildcard $(TEST_FOLDER)*/unittest/*)))
kevman 0:38ceb79fef03 10 TESTDIRS := $(UNITTESTS:%=build-%)
kevman 0:38ceb79fef03 11 CLEANTESTDIRS := $(UNITTESTS:%=clean-%)
kevman 0:38ceb79fef03 12 COVERAGEFILE := ./lcov/coverage.info
kevman 0:38ceb79fef03 13
kevman 0:38ceb79fef03 14 .PHONY: test
kevman 0:38ceb79fef03 15 test: $(TESTDIRS)
kevman 0:38ceb79fef03 16 @rm -rf ./lcov
kevman 0:38ceb79fef03 17 @rm -rf ./coverage
kevman 0:38ceb79fef03 18 @mkdir -p lcov
kevman 0:38ceb79fef03 19 @mkdir -p lcov/results
kevman 0:38ceb79fef03 20 @mkdir coverage
kevman 0:38ceb79fef03 21 @find ./test -name '*.xml' | xargs cp -t ./lcov/results/
kevman 0:38ceb79fef03 22 @rm -f lcov/index.xml
kevman 0:38ceb79fef03 23 @./xsl_script.sh
kevman 0:38ceb79fef03 24 @cp junit_xsl.xslt lcov/.
kevman 0:38ceb79fef03 25 @xsltproc -o lcov/testresults.html lcov/junit_xsl.xslt lcov/index.xml
kevman 0:38ceb79fef03 26 @rm -f lcov/junit_xsl.xslt
kevman 0:38ceb79fef03 27 @rm -f lcov/index.xml
kevman 0:38ceb79fef03 28 @find ./ -name '*.gcno' | xargs cp --backup=numbered -t ./coverage/
kevman 0:38ceb79fef03 29 @find ./ -name '*.gcda' | xargs cp --backup=numbered -t ./coverage/
kevman 0:38ceb79fef03 30 @gcovr --object-directory ./coverage --exclude-unreachable-branches -e '.*/builds/.*' -e '.*/test/.*' -e '.*/yotta_modules/.*' -e '.*/stubs/.*' -e '.*/mbed-coap/.*' -x -o ./lcov/gcovr.xml
kevman 0:38ceb79fef03 31 @lcov -d test/. -c -o $(COVERAGEFILE)
kevman 0:38ceb79fef03 32 @lcov -q -r $(COVERAGEFILE) "/usr*" -o $(COVERAGEFILE)
kevman 0:38ceb79fef03 33 @lcov -q -r $(COVERAGEFILE) "/test*" -o $(COVERAGEFILE)
kevman 0:38ceb79fef03 34 @lcov -q -r $(COVERAGEFILE) "/mbed-client-libservice*" -o $(COVERAGEFILE)
kevman 0:38ceb79fef03 35 @genhtml -q $(COVERAGEFILE) --show-details --output-directory lcov/html
kevman 0:38ceb79fef03 36 @echo mbed-coap module unit tests built
kevman 0:38ceb79fef03 37
kevman 0:38ceb79fef03 38 $(TESTDIRS):
kevman 0:38ceb79fef03 39 @make -C $(@:build-%=%)
kevman 0:38ceb79fef03 40
kevman 0:38ceb79fef03 41 $(CLEANDIRS):
kevman 0:38ceb79fef03 42 @make -C $(@:clean-%=%) clean
kevman 0:38ceb79fef03 43
kevman 0:38ceb79fef03 44 $(CLEANTESTDIRS):
kevman 0:38ceb79fef03 45 @make -C $(@:clean-%=%) clean
kevman 0:38ceb79fef03 46
kevman 0:38ceb79fef03 47 # Extend default clean rule
kevman 0:38ceb79fef03 48 clean: clean-extra
kevman 0:38ceb79fef03 49
kevman 0:38ceb79fef03 50 clean-extra: $(CLEANDIRS) \
kevman 0:38ceb79fef03 51 $(CLEANTESTDIRS)