Files
openharmony_kernel_liteos_a/testsuites/unittest/security/capability/BUILD.gn
lnlan 9bdf716407 feat(build): 使用xts -notest选项时,内核用例不参与编译构建和用例编译配置方式调整
【背景】
1.编译新增-notest选项为了排除用例参与构建,使用该选项时内核用例仍会参与构建,不符合预期
2.用例编译配置选项太多,需调整优化
【修改方案】
1.原内核用例的源文件是通过框架自带的source_set(一种虚拟静态库)的方式组织的,
不受unittests(自定义的一种方式)控制,修改为文件列表直接加入到unittest中。
2.编译配置通过level控制
【影响】
对现有的产品编译不会有影响。

Change-Id: I2c6a96e7276346de96f222b725d417418ff0e537
2021-05-29 17:58:39 +08:00

49 lines
1.3 KiB
Plaintext

# Copyright (C) 2019. Huawei Technologies Co., Ltd. All rights reserved.
import("//build/lite/config/test.gni")
import("../../config.gni")
common_include_dirs = [
"//third_party/googletest/googletest/include",
"../../common/include",
"./",
]
sources_entry = [
"../../common/osTest.cpp",
"security_capability_test.cpp",
]
sources_smoke = [
"smoke/cap_test_001.cpp",
]
sources_full = [
]
if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_LOW) {
unittest("liteos_a_security_capability_unittest_door") {
output_extension = "bin"
output_dir = "$root_out_dir/test/unittest/kernel"
include_dirs = common_include_dirs
sources = sources_entry
sources += sources_smoke
sources_full = []
sources += sources_full
configs = [ "../..:public_config_for_door" ]
deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
}
}
if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_MIDDLE) {
unittest("liteos_a_security_capability_unittest") {
output_extension = "bin"
output_dir = "$root_out_dir/test/unittest/kernel"
include_dirs = common_include_dirs
sources = sources_entry
sources += sources_smoke
sources += sources_full
configs = [ "../..:public_config_for_all" ]
deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
}
}