[nnfw-build] Revise generate test setting (#7905)
author오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 <hseok82.oh@samsung.com>
Fri, 4 Oct 2019 08:03:17 +0000 (17:03 +0900)
committer이춘석/On-Device Lab(SR)/Staff Engineer/삼성전자 <chunseok.lee@samsung.com>
Fri, 4 Oct 2019 08:03:17 +0000 (17:03 +0900)
- Remove GENERATE_NNAPI_TESTS in makefile
- Use cmake option to disable generate test
  - Default: enable
  - For tizen: disable as default for gbs/obs, enable on tizen cross build script

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
Makefile.template
infra/nnfw/cmake/CfgOptionFlags.cmake
infra/nnfw/cmake/options/options_aarch64-tizen.cmake
infra/nnfw/cmake/options/options_armv7l-tizen.cmake
infra/nnfw/config/docker.configuration
infra/scripts/docker_build_tizen_cross.sh
packaging/nnfw.spec

index d04d15b..a35cde9 100644 (file)
@@ -8,7 +8,6 @@ PARALLEL_BUILD?=1
 COVERAGE_BUILD?=0
 BENCHMARK_ACL_BUILD?=0
 OPTIONS?=
-GENERATE_NNAPI_TESTS?=1
 
 # make TARGET and TYPE to lowercase
 HOST_ARCH_LC=$(shell echo $(HOST_ARCH) | tr A-Z a-z)
@@ -58,10 +57,6 @@ ifneq ($(EXTERNAL_VOLUME),)
        OPTIONS+= -DNNAS_EXTERNALS_DIR=$(EXTERNAL_VOLUME)
 endif
 
-ifeq ($(GENERATE_NNAPI_TESTS),1)
-       OPTIONS+= -DGENERATE_RUNTIME_NNAPI_TESTS=ON
-endif
-
 ifeq ($(PARALLEL_BUILD),1)
        # Get number of processors (linux only for now)
        ifeq ($(HOST_OS),linux)
index e608698..8b7a042 100644 (file)
@@ -30,6 +30,7 @@ option(BUILD_SRCN_KERNEL "Build srcn kernel" OFF)
 option(BUILD_TFLITE_LOADER "Build TensorFlow Lite loader" ON)
 option(BUILD_CIRCLE_LOADER "Build circle loader" ON)
 option(BUILD_TFLITE_LOADER_TEST_TOOL "Build tflite loader testing tool" ON)
+option(GENERATE_RUNTIME_NNAPI_TESTS "Generate NNAPI operation gtest" ON)
 #
 # Default build configuration for contrib
 #
index eff8100..f2ff630 100644 (file)
@@ -12,3 +12,4 @@ option(BUILD_LOGGING "Build logging runtime" OFF)
 option(BUILD_TFLITE_RUN "Build tflite-run" OFF)
 option(BUILD_TFLITE_LOADER_TEST_TOOL "Build tflite loader testing tool" OFF)
 option(BUILD_SRCN_KERNEL "Build srcn kernel" ON)
+option(GENERATE_RUNTIME_NNAPI_TESTS "Generate NNAPI operation gtest" OFF)
index 9fe8f1f..d0da093 100644 (file)
@@ -12,3 +12,4 @@ option(BUILD_LOGGING "Build logging runtime" OFF)
 option(BUILD_TFLITE_RUN "Build tflite-run" OFF)
 option(BUILD_TFLITE_LOADER_TEST_TOOL "Build tflite loader testing tool" OFF)
 option(BUILD_SRCN_KERNEL "Build srcn kernel" ON)
+option(GENERATE_RUNTIME_NNAPI_TESTS "Generate NNAPI operation gtest" OFF)
index b7e9ad3..1b3e6ff 100644 (file)
@@ -23,7 +23,6 @@ DOCKER_ENV_VARS+=" -e http_proxy"
 DOCKER_ENV_VARS+=" -e no_proxy"
 DOCKER_ENV_VARS+=" -e GIT_SSL_NO_VERIFY"
 DOCKER_ENV_VARS+=" -e EXTERNAL_DOWNLOAD_SERVER"
-DOCKER_ENV_VARS+=" -e GENERATE_NNAPI_TESTS"
 
 DOCKER_RUN_OPTS="${DOCKER_OPTS}"
 DOCKER_RUN_OPTS+=" --rm"
index f6ed81d..18809ad 100755 (executable)
@@ -42,7 +42,8 @@ pushd $ROOT_PATH > /dev/null
 
 export DOCKER_ENV_VARS
 export DOCKER_VOLUMES
-CMD="cp -nv Makefile.template Makefile && \
+CMD="export OPTIONS+=' -DGENERATE_RUNTIME_NNAPI_TESTS=ON' && \
+     cp -nv Makefile.template Makefile && \
      make all install build_test_suite"
 ./nnfw docker-run bash -c "$CMD"
 
index 930d0fb..995896c 100644 (file)
@@ -57,9 +57,9 @@ NNFW test rpm. It does not depends on nnfw rpm since it contains nnfw runtime.
 
 %{!?coverage_build: %define coverage_build 0}
 %if %{coverage_build} == 1
-%define build_options COVERAGE_BUILD=1 BUILD_TYPE=Debug TARGET_ARCH=%{target_arch} TARGET_OS=tizen GENERATE_NNAPI_TESTS=0
+%define build_options COVERAGE_BUILD=1 BUILD_TYPE=Debug TARGET_ARCH=%{target_arch} TARGET_OS=tizen
 %else
-%define build_options BUILD_TYPE=%{build_type} INSTALL_PATH=%{buildroot}%{_prefix} TARGET_ARCH=%{target_arch} TARGET_OS=tizen GENERATE_NNAPI_TESTS=0
+%define build_options BUILD_TYPE=%{build_type} INSTALL_PATH=%{buildroot}%{_prefix} TARGET_ARCH=%{target_arch} TARGET_OS=tizen
 %endif
 
 %prep