independent compile for huks test

Signed-off-by: y30053096 <yangjinhuan@huawei.com>

Change-Id: I84cd57eed22f89bdce9d26811b55dc34fc4e5e16
This commit is contained in:
y30053096 2024-04-30 10:20:02 +08:00
parent 95878d3e3a
commit 4069e45db6
8 changed files with 24 additions and 10 deletions

View File

@ -16,8 +16,7 @@ import("//build/ohos.gni")
group("huks_sdk_test") {
testonly = true
if (os_level == "standard") {
if (huks_test_suite_running_environment == "system" &&
huks_security_level != "software") {
if (huks_test_suite_running_environment == "system") {
deps = [
#"//base/security/huks/test:reliability",
"//base/security/huks/test:unittest",

View File

@ -57,7 +57,8 @@
"openssl",
"bounds_checking_function",
"mbedtls",
"cJSON"
"cJSON",
"googletest"
]
},
"build": {

View File

@ -45,10 +45,12 @@ ohos_reliabilitytest("huks_stability_test") {
deps = [
"//base/security/huks/interfaces/inner_api/huks_standard/main:libhukssdk",
"//third_party/googletest:gtest_main",
]
external_deps = [
"c_utils:utils",
"hilog:libhilog",
]
if (os_level == "standard") {
external_deps += [ "googletest:gtest" ]
}
}

View File

@ -77,7 +77,6 @@ ohos_unittest("crypto_engine_unit_test") {
}
configs = [
"//commonlibrary/c_utils/base:utils_config",
"//base/security/huks/frameworks/config/build:l2_standard_common_config",
]
@ -85,13 +84,16 @@ ohos_unittest("crypto_engine_unit_test") {
"//base/security/huks/frameworks/huks_standard/main/os_dependency:libhuks_mem_standard_static",
"//base/security/huks/frameworks/huks_standard/main/os_dependency:libhuks_os_dependency_standard_static",
"//base/security/huks/frameworks/huks_standard/main/os_dependency:libhuks_util_standard_static",
"//third_party/googletest:gtest_main",
]
external_deps = [
"c_utils:utils",
"hilog:libhilog",
]
if (os_level == "standard") {
external_deps += [ "googletest:gtest" ]
}
cflags = [
"-Wall",
"-Werror",

View File

@ -95,7 +95,6 @@ ohos_moduletest("huks_mt_test") {
"//base/security/huks/frameworks/huks_standard/main:huks_standard_frameworks",
"//base/security/huks/interfaces/inner_api/huks_standard/main:libhukssdk",
"//third_party/bounds_checking_function:libsec_static",
"//third_party/googletest:gtest_main",
"//third_party/openssl:libcrypto_shared",
]
external_deps = [
@ -104,5 +103,6 @@ ohos_moduletest("huks_mt_test") {
]
if (os_level == "standard") {
defines += [ "L2_STANDARD" ]
external_deps += [ "googletest:gtest" ]
}
}

View File

@ -82,12 +82,16 @@ ohos_unittest("hukssdk_test") {
"//base/security/huks/interfaces/inner_api/huks_standard/main:libhukssdk",
"//base/security/huks/interfaces/kits/c:huks_ndk",
"//third_party/bounds_checking_function:libsec_static",
"//third_party/googletest:gtest_main",
]
external_deps = [
"c_utils:utils",
"hilog:libhilog",
]
if (os_level == "standard") {
external_deps += [ "googletest:gtest" ]
}
configs = [
"//base/security/huks/frameworks/config/build:l2_standard_common_config",
]

View File

@ -37,7 +37,10 @@ ohos_unittest("huks_file_transfer_config_parser_test") {
"../../../../../../../../../frameworks/huks_standard/main/os_dependency:libhuks_mem_standard_static",
]
external_deps = [ "hilog:libhilog" ]
external_deps = [
"c_utils:utils",
"hilog:libhilog",
]
subsystem_name = "security"
part_name = "huks"

View File

@ -64,10 +64,13 @@ ohos_unittest("huks_multithread_test") {
deps = [
"//base/security/huks/frameworks/huks_standard/main:huks_standard_frameworks",
"//base/security/huks/services/huks_standard/huks_service/main/os_dependency/idl:libhuks_service_idl_standard_static",
"//third_party/googletest:gtest_main",
]
external_deps = [
"c_utils:utils",
"hilog:libhilog",
]
if (os_level == "standard") {
external_deps += [ "googletest:gtest" ]
}
}