Nicolas Borla
/
BBR_1Ebene
BBR 1 Ebene
mbed-os/features/cellular/Makefile.test@0:fbdae7e6d805, 2018-05-14 (annotated)
- Committer:
- borlanic
- Date:
- Mon May 14 11:29:06 2018 +0000
- Revision:
- 0:fbdae7e6d805
BBR
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
borlanic | 0:fbdae7e6d805 | 1 | # |
borlanic | 0:fbdae7e6d805 | 2 | # Makefile.test for CIot library unit tests |
borlanic | 0:fbdae7e6d805 | 3 | # |
borlanic | 0:fbdae7e6d805 | 4 | |
borlanic | 0:fbdae7e6d805 | 5 | |
borlanic | 0:fbdae7e6d805 | 6 | # List of subdirectories to build |
borlanic | 0:fbdae7e6d805 | 7 | TEST_FOLDER_NAME := UNITTESTS |
borlanic | 0:fbdae7e6d805 | 8 | TEST_FOLDER := ./UNITTESTS/ |
borlanic | 0:fbdae7e6d805 | 9 | # List of unit test directories for libraries |
borlanic | 0:fbdae7e6d805 | 10 | UNITTESTS := $(sort $(dir $(wildcard $(TEST_FOLDER)*))) |
borlanic | 0:fbdae7e6d805 | 11 | TESTDIRS := $(UNITTESTS:%=build-%) |
borlanic | 0:fbdae7e6d805 | 12 | CLEANTESTDIRS := $(UNITTESTS:%=clean-%) |
borlanic | 0:fbdae7e6d805 | 13 | COVERAGEFILE := ./lcov/coverage.info |
borlanic | 0:fbdae7e6d805 | 14 | |
borlanic | 0:fbdae7e6d805 | 15 | .PHONY: test |
borlanic | 0:fbdae7e6d805 | 16 | test: $(TESTDIRS) |
borlanic | 0:fbdae7e6d805 | 17 | @rm -rf ./lcov |
borlanic | 0:fbdae7e6d805 | 18 | @rm -rf ./coverage |
borlanic | 0:fbdae7e6d805 | 19 | @mkdir -p lcov |
borlanic | 0:fbdae7e6d805 | 20 | @mkdir -p lcov/results |
borlanic | 0:fbdae7e6d805 | 21 | @mkdir coverage |
borlanic | 0:fbdae7e6d805 | 22 | @find $(TEST_FOLDER) -name '*.xml' | xargs cp -t ./lcov/results/ |
borlanic | 0:fbdae7e6d805 | 23 | @rm -f lcov/index.xml |
borlanic | 0:fbdae7e6d805 | 24 | @./xsl_script.sh |
borlanic | 0:fbdae7e6d805 | 25 | @cp junit_xsl.xslt lcov/. |
borlanic | 0:fbdae7e6d805 | 26 | @xsltproc -o lcov/testresults.html lcov/junit_xsl.xslt lcov/index.xml |
borlanic | 0:fbdae7e6d805 | 27 | @rm -f lcov/junit_xsl.xslt |
borlanic | 0:fbdae7e6d805 | 28 | @rm -f lcov/index.xml |
borlanic | 0:fbdae7e6d805 | 29 | @find ./ -name '*.gcno' | xargs cp --backup=numbered -t ./coverage/ |
borlanic | 0:fbdae7e6d805 | 30 | @find ./ -name '*.gcda' | xargs cp --backup=numbered -t ./coverage/ |
borlanic | 0:fbdae7e6d805 | 31 | @gcovr --object-directory ./coverage --exclude-unreachable-branches -e '.*/builds/.*' -e '.*/$(TEST_FOLDER_NAME)/.*' -e '.*/yotta_modules/.*' -e '.*/stubs/.*' -e '.*/mbed-coap/.*' -x -o ./lcov/gcovr.xml |
borlanic | 0:fbdae7e6d805 | 32 | @lcov -d $(TEST_FOLDER_NAME)/. -c -o $(COVERAGEFILE) |
borlanic | 0:fbdae7e6d805 | 33 | @lcov -q -r $(COVERAGEFILE) "/usr*" -o $(COVERAGEFILE) |
borlanic | 0:fbdae7e6d805 | 34 | @lcov -q -r $(COVERAGEFILE) "/$(TEST_FOLDER_NAME)*" -o $(COVERAGEFILE) |
borlanic | 0:fbdae7e6d805 | 35 | @lcov -q -r $(COVERAGEFILE) "/mbed-client-libservice*" -o $(COVERAGEFILE) |
borlanic | 0:fbdae7e6d805 | 36 | @lcov -q -r $(COVERAGEFILE) "/mbed-client*" -o $(COVERAGEFILE) |
borlanic | 0:fbdae7e6d805 | 37 | @lcov -q -r $(COVERAGEFILE) "/mbed-os/events*" -o $(COVERAGEFILE) |
borlanic | 0:fbdae7e6d805 | 38 | @lcov -q -r $(COVERAGEFILE) "/mbed-os/features/netsocket*" -o $(COVERAGEFILE) |
borlanic | 0:fbdae7e6d805 | 39 | @lcov -q -r $(COVERAGEFILE) "/mbed-os/platform*" -o $(COVERAGEFILE) |
borlanic | 0:fbdae7e6d805 | 40 | @genhtml -q $(COVERAGEFILE) --output-directory lcov/html |
borlanic | 0:fbdae7e6d805 | 41 | @echo mbed-ciot module unit tests built |
borlanic | 0:fbdae7e6d805 | 42 | |
borlanic | 0:fbdae7e6d805 | 43 | $(TESTDIRS): |
borlanic | 0:fbdae7e6d805 | 44 | @make -C $(@:build-%=%) |
borlanic | 0:fbdae7e6d805 | 45 | |
borlanic | 0:fbdae7e6d805 | 46 | $(CLEANDIRS): |
borlanic | 0:fbdae7e6d805 | 47 | @make -C $(@:clean-%=%) clean |
borlanic | 0:fbdae7e6d805 | 48 | |
borlanic | 0:fbdae7e6d805 | 49 | $(CLEANTESTDIRS): |
borlanic | 0:fbdae7e6d805 | 50 | @make -C $(@:clean-%=%) clean |
borlanic | 0:fbdae7e6d805 | 51 | |
borlanic | 0:fbdae7e6d805 | 52 | # Extend default clean rule |
borlanic | 0:fbdae7e6d805 | 53 | clean: clean-extra |
borlanic | 0:fbdae7e6d805 | 54 | |
borlanic | 0:fbdae7e6d805 | 55 | clean-extra: $(CLEANDIRS) \ |
borlanic | 0:fbdae7e6d805 | 56 | $(CLEANTESTDIRS) |