1526fd984Sopenharmony_ci# Copyright (C) 2021-2023 Huawei Device Co., Ltd.
2526fd984Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
3526fd984Sopenharmony_ci# you may not use this file except in compliance with the License.
4526fd984Sopenharmony_ci# You may obtain a copy of the License at
5526fd984Sopenharmony_ci#
6526fd984Sopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
7526fd984Sopenharmony_ci#
8526fd984Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software
9526fd984Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
10526fd984Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11526fd984Sopenharmony_ci# See the License for the specific language governing permissions and
12526fd984Sopenharmony_ci# limitations under the License.
13526fd984Sopenharmony_ci
14526fd984Sopenharmony_ciimport("//base/security/huks/build/config.gni")
15526fd984Sopenharmony_ciimport("//base/security/huks/huks.gni")
16526fd984Sopenharmony_ciimport("//build/ohos.gni")
17526fd984Sopenharmony_ciimport("//build/test.gni")
18526fd984Sopenharmony_ci
19526fd984Sopenharmony_cimodule_output_path = "huks_standard/huks_standard_test"
20526fd984Sopenharmony_ci
21526fd984Sopenharmony_ciohos_reliabilitytest("huks_stability_test") {
22526fd984Sopenharmony_ci  module_out_path = module_output_path
23526fd984Sopenharmony_ci  sources = [
24526fd984Sopenharmony_ci    "src/api_pressure_test.cpp",
25526fd984Sopenharmony_ci    "src/pressure_test.cpp",
26526fd984Sopenharmony_ci    "src/three_stage_multi_thread.cpp",
27526fd984Sopenharmony_ci  ]
28526fd984Sopenharmony_ci
29526fd984Sopenharmony_ci  configs = [
30526fd984Sopenharmony_ci    "//base/security/huks/frameworks/config/build:l2_standard_common_config",
31526fd984Sopenharmony_ci  ]
32526fd984Sopenharmony_ci  defines = []
33526fd984Sopenharmony_ci
34526fd984Sopenharmony_ci  if (use_crypto_lib == "openssl") {
35526fd984Sopenharmony_ci    defines += [ "_USE_OPENSSL_" ]
36526fd984Sopenharmony_ci  }
37526fd984Sopenharmony_ci  if (use_crypto_lib == "mbedtls") {
38526fd984Sopenharmony_ci    defines += [ "_USE_MBEDTLS_" ]
39526fd984Sopenharmony_ci  }
40526fd984Sopenharmony_ci
41526fd984Sopenharmony_ci  include_dirs = [
42526fd984Sopenharmony_ci    "//base/security/huks/interfaces/inner_api/huks_standard/main/include",
43526fd984Sopenharmony_ci    "//base/security/huks/frameworks/huks_standard/main/common/include",
44526fd984Sopenharmony_ci  ]
45526fd984Sopenharmony_ci
46526fd984Sopenharmony_ci  deps = [
47526fd984Sopenharmony_ci    "//base/security/huks/interfaces/inner_api/huks_standard/main:libhukssdk",
48526fd984Sopenharmony_ci  ]
49526fd984Sopenharmony_ci  external_deps = [
50526fd984Sopenharmony_ci    "c_utils:utils",
51526fd984Sopenharmony_ci    "hilog:libhilog",
52526fd984Sopenharmony_ci  ]
53526fd984Sopenharmony_ci  if (os_level == "standard") {
54526fd984Sopenharmony_ci    external_deps += [ "googletest:gtest" ]
55526fd984Sopenharmony_ci  }
56526fd984Sopenharmony_ci}
57