2021-04-25 12:37:35 +08:00
|
|
|
# Copyright (C) 2019. Huawei Technologies Co., Ltd. All rights reserved.
|
|
|
|
import("//build/lite/config/test.gni")
|
2021-04-29 18:56:24 +08:00
|
|
|
import("../../config.gni")
|
2021-04-25 12:37:35 +08:00
|
|
|
|
2021-05-11 11:06:14 +08:00
|
|
|
common_include_dirs = [
|
|
|
|
"//third_party/googletest/googletest/include",
|
|
|
|
"../../common/include",
|
|
|
|
"./",
|
|
|
|
]
|
|
|
|
|
|
|
|
sources_entry = [
|
|
|
|
"../../common/osTest.cpp",
|
|
|
|
"security_capability_test.cpp",
|
|
|
|
]
|
|
|
|
|
|
|
|
source_set("sources_smoke") {
|
|
|
|
sources = [
|
|
|
|
"smoke/cap_test_001.cpp",
|
2021-04-25 12:37:35 +08:00
|
|
|
]
|
2021-05-15 16:29:50 +08:00
|
|
|
configs += [ "../..:local_public_config" ]
|
2021-05-11 11:06:14 +08:00
|
|
|
include_dirs = common_include_dirs
|
|
|
|
deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
source_set("sources_other") {
|
2021-04-25 12:37:35 +08:00
|
|
|
sources = [
|
|
|
|
]
|
2021-05-15 16:29:50 +08:00
|
|
|
configs += [ "../..:local_public_config" ]
|
2021-05-11 11:06:14 +08:00
|
|
|
include_dirs = common_include_dirs
|
2021-04-25 12:37:35 +08:00
|
|
|
deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
|
|
|
|
}
|
2021-05-11 11:06:14 +08:00
|
|
|
|
|
|
|
if (LOSCFG_USER_TEST_FOR_ALL == true) {
|
|
|
|
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
|
|
|
|
configs = [ "../..:public_config_full" ]
|
|
|
|
deps = []
|
|
|
|
deps += [ ":sources_smoke" ]
|
|
|
|
deps += [ ":sources_other" ]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (LOSCFG_USER_TEST_FOR_DOOR == true) {
|
|
|
|
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
|
|
|
|
configs = [ "../..:public_config_smk" ]
|
|
|
|
deps = []
|
|
|
|
deps += [ ":sources_smoke" ]
|
|
|
|
}
|
|
|
|
}
|