mbed-os for GR-LYCHEE
Dependents: mbed-os-example-blinky-gr-lychee GR-Boads_Camera_sample GR-Boards_Audio_Recoder GR-Boads_Camera_DisplayApp ... more
features/FEATURE_COMMON_PAL/mbed-coap/Makefile.test@0:f782d9c66c49, 2018-02-02 (annotated)
- Committer:
- dkato
- Date:
- Fri Feb 02 05:42:23 2018 +0000
- Revision:
- 0:f782d9c66c49
mbed-os for GR-LYCHEE
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
dkato | 0:f782d9c66c49 | 1 | # |
dkato | 0:f782d9c66c49 | 2 | # Makefile.test for combined COAP library unit tests |
dkato | 0:f782d9c66c49 | 3 | # |
dkato | 0:f782d9c66c49 | 4 | |
dkato | 0:f782d9c66c49 | 5 | |
dkato | 0:f782d9c66c49 | 6 | # List of subdirectories to build |
dkato | 0:f782d9c66c49 | 7 | TEST_FOLDER := ./test/ |
dkato | 0:f782d9c66c49 | 8 | # List of unit test directories for libraries |
dkato | 0:f782d9c66c49 | 9 | UNITTESTS := $(sort $(dir $(wildcard $(TEST_FOLDER)*/unittest/*))) |
dkato | 0:f782d9c66c49 | 10 | TESTDIRS := $(UNITTESTS:%=build-%) |
dkato | 0:f782d9c66c49 | 11 | CLEANTESTDIRS := $(UNITTESTS:%=clean-%) |
dkato | 0:f782d9c66c49 | 12 | COVERAGEFILE := ./lcov/coverage.info |
dkato | 0:f782d9c66c49 | 13 | |
dkato | 0:f782d9c66c49 | 14 | .PHONY: test |
dkato | 0:f782d9c66c49 | 15 | test: $(TESTDIRS) |
dkato | 0:f782d9c66c49 | 16 | @rm -rf ./lcov |
dkato | 0:f782d9c66c49 | 17 | @rm -rf ./coverage |
dkato | 0:f782d9c66c49 | 18 | @mkdir -p lcov |
dkato | 0:f782d9c66c49 | 19 | @mkdir -p lcov/results |
dkato | 0:f782d9c66c49 | 20 | @mkdir coverage |
dkato | 0:f782d9c66c49 | 21 | @find ./test -name '*.xml' | xargs cp -t ./lcov/results/ |
dkato | 0:f782d9c66c49 | 22 | @rm -f lcov/index.xml |
dkato | 0:f782d9c66c49 | 23 | @./xsl_script.sh |
dkato | 0:f782d9c66c49 | 24 | @cp junit_xsl.xslt lcov/. |
dkato | 0:f782d9c66c49 | 25 | @xsltproc -o lcov/testresults.html lcov/junit_xsl.xslt lcov/index.xml |
dkato | 0:f782d9c66c49 | 26 | @rm -f lcov/junit_xsl.xslt |
dkato | 0:f782d9c66c49 | 27 | @rm -f lcov/index.xml |
dkato | 0:f782d9c66c49 | 28 | @find ./ -name '*.gcno' | xargs cp --backup=numbered -t ./coverage/ |
dkato | 0:f782d9c66c49 | 29 | @find ./ -name '*.gcda' | xargs cp --backup=numbered -t ./coverage/ |
dkato | 0:f782d9c66c49 | 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 |
dkato | 0:f782d9c66c49 | 31 | @lcov -d test/. -c -o $(COVERAGEFILE) |
dkato | 0:f782d9c66c49 | 32 | @lcov -q -r $(COVERAGEFILE) "/usr*" -o $(COVERAGEFILE) |
dkato | 0:f782d9c66c49 | 33 | @lcov -q -r $(COVERAGEFILE) "/test*" -o $(COVERAGEFILE) |
dkato | 0:f782d9c66c49 | 34 | @lcov -q -r $(COVERAGEFILE) "/mbed-client-libservice*" -o $(COVERAGEFILE) |
dkato | 0:f782d9c66c49 | 35 | @genhtml -q $(COVERAGEFILE) --show-details --output-directory lcov/html |
dkato | 0:f782d9c66c49 | 36 | @echo mbed-coap module unit tests built |
dkato | 0:f782d9c66c49 | 37 | |
dkato | 0:f782d9c66c49 | 38 | $(TESTDIRS): |
dkato | 0:f782d9c66c49 | 39 | @make -C $(@:build-%=%) |
dkato | 0:f782d9c66c49 | 40 | |
dkato | 0:f782d9c66c49 | 41 | $(CLEANDIRS): |
dkato | 0:f782d9c66c49 | 42 | @make -C $(@:clean-%=%) clean |
dkato | 0:f782d9c66c49 | 43 | |
dkato | 0:f782d9c66c49 | 44 | $(CLEANTESTDIRS): |
dkato | 0:f782d9c66c49 | 45 | @make -C $(@:clean-%=%) clean |
dkato | 0:f782d9c66c49 | 46 | |
dkato | 0:f782d9c66c49 | 47 | # Extend default clean rule |
dkato | 0:f782d9c66c49 | 48 | clean: clean-extra |
dkato | 0:f782d9c66c49 | 49 | |
dkato | 0:f782d9c66c49 | 50 | clean-extra: $(CLEANDIRS) \ |
dkato | 0:f782d9c66c49 | 51 | $(CLEANTESTDIRS) |