diff options
author | 이춘석/동작제어Lab(SR)/Senior Engineer/삼성전자 <chunseok.lee@samsung.com> | 2018-04-17 17:51:22 +0900 |
---|---|---|
committer | 김정현/동작제어Lab(SR)/Senior Engineer/삼성전자 <jh0822.kim@samsung.com> | 2018-04-17 17:51:22 +0900 |
commit | 516bd7b204177ff5963e7ad20915b676e4bbc2dc (patch) | |
tree | 24401c5186306ab6b1b143d1e8ffc14006754481 /Makefile | |
parent | 409f6871499d187bce40ec6b061f6412b31e6a31 (diff) | |
download | nnfw-516bd7b204177ff5963e7ad20915b676e4bbc2dc.tar.gz nnfw-516bd7b204177ff5963e7ad20915b676e4bbc2dc.tar.bz2 nnfw-516bd7b204177ff5963e7ad20915b676e4bbc2dc.zip |
Add test coverage build (#744)
* Add test coverage build
1. add flags for test coverage build
2. add script to enable on CI
* Add OPTION init
Signed-off-by: Chunseok Lee <chunseok.lee@samsung.com>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 19 |
1 files changed, 18 insertions, 1 deletions
@@ -4,6 +4,8 @@ CROSS_BUILD?=0 HOST_OS?=linux NPROCS:=1 OBS_BUILD?=0 +COVERAGE_BUILD?=0 +OPTIONS?= # make TARGET and TYPE to lowercase TARGET_ARCH_LC=$(shell echo $(TARGET_ARCH) | tr A-Z a-z) @@ -26,6 +28,12 @@ else OPTION_TOOLCHAIN= endif +ifeq ($(COVERAGE_BUILD),1) + OPTIONS+= -DCOVERAGE_BUILD=1 +else + OPTIONS+= -DCOVERAGE_BUILD=0 +endif + # Get number of processors (linux only for now) ifeq ($(HOST_OS),linux) NPROCS:=$(shell grep -c ^processor /proc/cpuinfo) @@ -87,7 +95,8 @@ endif -DCMAKE_INSTALL_PREFIX=$(INSTALL_PATH) \ -DCMAKE_BUILD_TYPE=$(BUILD_TYPE_LC) -DTARGET_ARCH=$(TARGET_ARCH_LC) \ -DHOST_OS=$(HOST_OS) \ - $(OPTION_TOOLCHAIN) + $(OPTION_TOOLCHAIN) \ + $(OPTIONS) touch $(TIMESTAMP_CONFIGURE) build_internal: $(BUILD_ROOT) @@ -136,6 +145,14 @@ build_test_suite: install_internal @tar -zcf test-suite.tar.gz tests/ tools/test_driver $(INSTALL_ALIAS) --dereference @mv test-suite.tar.gz $(INSTALL_ROOT)/. +build_coverage_suite: install_internal + @echo "packaging test-coverage suite" + @rm -rf $(INSTALL_ROOT)/coverage-suite.tar.gz + @find Product -name "*.gcno" > include_lists.txt + @tar -zcf coverage-suite.tar.gz tests/ tools/test_driver $(INSTALL_ALIAS) --dereference -T include_lists.txt + @rm -rf include_lists.txt + @mv coverage-suite.tar.gz $(INSTALL_ROOT)/. + ### ### Timestamps ### |