Nicolas Borla
/
BBR_1Ebene
BBR 1 Ebene
mbed-os/features/nanostack/coap-service/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 | # Copyright (c) 2015-2017, Arm Limited and affiliates. |
borlanic | 0:fbdae7e6d805 | 2 | # SPDX-License-Identifier: Apache-2.0 |
borlanic | 0:fbdae7e6d805 | 3 | # |
borlanic | 0:fbdae7e6d805 | 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
borlanic | 0:fbdae7e6d805 | 5 | # you may not use this file except in compliance with the License. |
borlanic | 0:fbdae7e6d805 | 6 | # You may obtain a copy of the License at |
borlanic | 0:fbdae7e6d805 | 7 | # |
borlanic | 0:fbdae7e6d805 | 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
borlanic | 0:fbdae7e6d805 | 9 | # |
borlanic | 0:fbdae7e6d805 | 10 | # Unless required by applicable law or agreed to in writing, software |
borlanic | 0:fbdae7e6d805 | 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
borlanic | 0:fbdae7e6d805 | 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
borlanic | 0:fbdae7e6d805 | 13 | # See the License for the specific language governing permissions and |
borlanic | 0:fbdae7e6d805 | 14 | # limitations under the License. |
borlanic | 0:fbdae7e6d805 | 15 | # |
borlanic | 0:fbdae7e6d805 | 16 | # Makefile.test for COAP service unit tests |
borlanic | 0:fbdae7e6d805 | 17 | # |
borlanic | 0:fbdae7e6d805 | 18 | |
borlanic | 0:fbdae7e6d805 | 19 | # List of subdirectories to build |
borlanic | 0:fbdae7e6d805 | 20 | TEST_FOLDER := ./test/ |
borlanic | 0:fbdae7e6d805 | 21 | # List of unit test directories for libraries |
borlanic | 0:fbdae7e6d805 | 22 | UNITTESTS := $(sort $(dir $(wildcard $(TEST_FOLDER)*/unittest/*))) |
borlanic | 0:fbdae7e6d805 | 23 | TESTDIRS := $(UNITTESTS:%=build-%) |
borlanic | 0:fbdae7e6d805 | 24 | CLEANTESTDIRS := $(UNITTESTS:%=clean-%) |
borlanic | 0:fbdae7e6d805 | 25 | COVERAGEFILE := ./lcov/coverage.info |
borlanic | 0:fbdae7e6d805 | 26 | |
borlanic | 0:fbdae7e6d805 | 27 | .PHONY: test |
borlanic | 0:fbdae7e6d805 | 28 | test: $(TESTDIRS) |
borlanic | 0:fbdae7e6d805 | 29 | @rm -rf ./lcov |
borlanic | 0:fbdae7e6d805 | 30 | @rm -rf ./coverage |
borlanic | 0:fbdae7e6d805 | 31 | @mkdir -p lcov |
borlanic | 0:fbdae7e6d805 | 32 | @mkdir -p lcov/results |
borlanic | 0:fbdae7e6d805 | 33 | @mkdir coverage |
borlanic | 0:fbdae7e6d805 | 34 | @find ./test -name '*.xml' | xargs cp -t ./lcov/results/ |
borlanic | 0:fbdae7e6d805 | 35 | @rm -f lcov/index.xml |
borlanic | 0:fbdae7e6d805 | 36 | @./xsl_script.sh |
borlanic | 0:fbdae7e6d805 | 37 | @cp junit_xsl.xslt lcov/. |
borlanic | 0:fbdae7e6d805 | 38 | @xsltproc -o lcov/testresults.html lcov/junit_xsl.xslt lcov/index.xml |
borlanic | 0:fbdae7e6d805 | 39 | @rm -f lcov/junit_xsl.xslt |
borlanic | 0:fbdae7e6d805 | 40 | @rm -f lcov/index.xml |
borlanic | 0:fbdae7e6d805 | 41 | @find ./ -name '*.gcno' | xargs cp --backup=numbered -t ./coverage/ |
borlanic | 0:fbdae7e6d805 | 42 | @find ./ -name '*.gcda' | xargs cp --backup=numbered -t ./coverage/ |
borlanic | 0:fbdae7e6d805 | 43 | @gcovr --object-directory ./coverage --exclude-unreachable-branches -e '.*/builds/.*' -e '.*/test/.*' -e '.*/yotta_modules/.*' -e '.*/stub/.*' -x -o ./lcov/gcovr.xml |
borlanic | 0:fbdae7e6d805 | 44 | @lcov -d test/. -c -o $(COVERAGEFILE) |
borlanic | 0:fbdae7e6d805 | 45 | @lcov -q -r $(COVERAGEFILE) "/usr*" -o $(COVERAGEFILE) |
borlanic | 0:fbdae7e6d805 | 46 | @lcov -q -r $(COVERAGEFILE) "/test*" -o $(COVERAGEFILE) |
borlanic | 0:fbdae7e6d805 | 47 | @lcov -q -r $(COVERAGEFILE) "/mbed-client-libservice*" -o $(COVERAGEFILE) |
borlanic | 0:fbdae7e6d805 | 48 | @lcov -q -r $(COVERAGEFILE) "/libService*" -o $(COVERAGEFILE) |
borlanic | 0:fbdae7e6d805 | 49 | @genhtml -q $(COVERAGEFILE) --show-details --output-directory lcov/html |
borlanic | 0:fbdae7e6d805 | 50 | @echo coap-service unit tests built |
borlanic | 0:fbdae7e6d805 | 51 | |
borlanic | 0:fbdae7e6d805 | 52 | $(TESTDIRS): |
borlanic | 0:fbdae7e6d805 | 53 | @make -C $(@:build-%=%) |
borlanic | 0:fbdae7e6d805 | 54 | |
borlanic | 0:fbdae7e6d805 | 55 | $(CLEANDIRS): |
borlanic | 0:fbdae7e6d805 | 56 | @make -C $(@:clean-%=%) clean |
borlanic | 0:fbdae7e6d805 | 57 | |
borlanic | 0:fbdae7e6d805 | 58 | $(CLEANTESTDIRS): |
borlanic | 0:fbdae7e6d805 | 59 | @make -C $(@:clean-%=%) clean |
borlanic | 0:fbdae7e6d805 | 60 | |
borlanic | 0:fbdae7e6d805 | 61 | # Extend default clean rule |
borlanic | 0:fbdae7e6d805 | 62 | clean: clean-extra |
borlanic | 0:fbdae7e6d805 | 63 | |
borlanic | 0:fbdae7e6d805 | 64 | clean-extra: $(CLEANDIRS) \ |
borlanic | 0:fbdae7e6d805 | 65 | $(CLEANTESTDIRS) |