1#Copyright (c) 2021 Huawei Device Co., Ltd. 2#Licensed under the Apache License, Version 2.0 (the "License"); 3#you may not use this file except in compliance with the License. 4#You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8#Unless required by applicable law or agreed to in writing, software 9#distributed under the License is distributed on an "AS IS" BASIS, 10#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11#See the License for the specific language governing permissions and 12#limitations under the License. 13 14if (ohos_kernel_type != "liteos_m") { 15 import("//build/lite/config/test.gni") 16 import("//foundation/arkui/ace_engine_lite/test/ace_test_config.gni") 17 18 cache_manager_unittest_root = 19 "$ACE_LITE_COMMON_PATH/memory/cache/test/unittest" 20 components_unittest_root = 21 "$ace_lite_root/frameworks/src/core/components/test/unittest" 22 context_unittest_root = 23 "$ace_lite_root/frameworks/src/core/context/test/unittest" 24 async_unittest_root = "$NATIVE_ENGINE_PATH/async/test/unittest" 25 jsi_unittest_root = "$NATIVE_ENGINE_PATH/jsi/test/unittest" 26 module_manager_unittest_root = "$MODULE_MANAGER_PATH/test/unittest" 27 modules_unittest_root = 28 "$ace_lite_root/frameworks/src/core/modules/test/unittest" 29 stylemgr_unittest_root = 30 "$ace_lite_root/frameworks/src/core/stylemgr/test/unittest" 31 router_unittest_root = 32 "$ace_lite_root/frameworks/src/core/router/test/unittest" 33 base_unittest_root = "$ace_lite_root/frameworks/src/core/base/test/unittest" 34 35 # common config for all test, append extra in self gn 36 config("test_common_config") { 37 include_dirs = ace_test_includes 38 configs = ace_test_configs 39 defines = ace_test_defines 40 } 41 42 # this is the config for compiling all ace source code with test code together 43 config("test_whole_archive_config") { 44 include_dirs = all_external_includes 45 configs = ace_test_configs 46 defines = all_defines 47 } 48 49 group("unittest") { 50 deps = [ 51 "$ace_lite_root/test/moduletest/common:door_unittest", 52 "$async_unittest_root:async_unittest", 53 "$base_unittest_root:base_utils_unittest", 54 "$cache_manager_unittest_root:cache_manager_unittest", 55 "$components_unittest_root:components_unittest", 56 "$context_unittest_root:js_frameworks_unittest", 57 "$jsi_unittest_root:jsi_unittest", 58 "$module_manager_unittest_root:module_manager_unittest", 59 "$modules_unittest_root:modules_unittest", 60 "$router_unittest_root:router_module_unittest", 61 "$stylemgr_unittest_root:stylemgr_unittest", 62 ] 63 } 64} else { 65 group("unittest") { 66 } 67} 68