1526fd984Sopenharmony_ci#
2526fd984Sopenharmony_ci# Copyright (c) 2020 Huawei Device Co., Ltd.
3526fd984Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
4526fd984Sopenharmony_ci# you may not use this file except in compliance with the License.
5526fd984Sopenharmony_ci# You may obtain a copy of the License at
6526fd984Sopenharmony_ci#
7526fd984Sopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
8526fd984Sopenharmony_ci#
9526fd984Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software
10526fd984Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
11526fd984Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12526fd984Sopenharmony_ci# See the License for the specific language governing permissions and
13526fd984Sopenharmony_ci# limitations under the License.
14526fd984Sopenharmony_ci#
15526fd984Sopenharmony_ci
16526fd984Sopenharmony_ciimport("//build/ohos.gni")
17526fd984Sopenharmony_ci
18526fd984Sopenharmony_ciconfig("hilog_dir") {
19526fd984Sopenharmony_ci  include_dirs =
20526fd984Sopenharmony_ci      [ "//base/hiviewdfx/hilog_lite/interfaces/native/innerkits/hilog/" ]
21526fd984Sopenharmony_ci}
22526fd984Sopenharmony_ciconfig("hilog_lite_dir") {
23526fd984Sopenharmony_ci  include_dirs =
24526fd984Sopenharmony_ci      [ "//base/hiviewdfx/hilog_lite/interfaces/native/kits/hilog_lite/" ]
25526fd984Sopenharmony_ci}
26526fd984Sopenharmony_ci
27526fd984Sopenharmony_ciconfig("huks_test_common") {
28526fd984Sopenharmony_ci  include_dirs = [
29526fd984Sopenharmony_ci    "//base/security/huks/interfaces/inner_api/huks_standard/main/include",
30526fd984Sopenharmony_ci    "include",
31526fd984Sopenharmony_ci    "//base/security/huks/test/unittest/huks_common_test/include",
32526fd984Sopenharmony_ci  ]
33526fd984Sopenharmony_ci}
34526fd984Sopenharmony_ci
35526fd984Sopenharmony_ciohos_static_library("huks_3.0_test_common") {
36526fd984Sopenharmony_ci  sources = [
37526fd984Sopenharmony_ci    "//base/security/huks/test/unittest/huks_common_test/src/hks_test_adapt_for_de.c",
38526fd984Sopenharmony_ci    "//base/security/huks/test/unittest/huks_common_test/src/hks_test_aes_func.cpp",
39526fd984Sopenharmony_ci    "//base/security/huks/test/unittest/huks_common_test/src/hks_test_cipher_func.cpp",
40526fd984Sopenharmony_ci    "//base/security/huks/test/unittest/huks_common_test/src/hks_test_common_func.cpp",
41526fd984Sopenharmony_ci    "//base/security/huks/test/unittest/huks_common_test/src/hks_test_curve25519_func.cpp",
42526fd984Sopenharmony_ci    "//base/security/huks/test/unittest/huks_common_test/src/hks_test_file_operator_func.c",
43526fd984Sopenharmony_ci    "hks_test_aes.c",
44526fd984Sopenharmony_ci    "hks_test_api_performance.c",
45526fd984Sopenharmony_ci    "hks_test_cipher.c",
46526fd984Sopenharmony_ci    "hks_test_common.c",
47526fd984Sopenharmony_ci    "hks_test_curve25519.c",
48526fd984Sopenharmony_ci    "hks_test_file_operator.c",
49526fd984Sopenharmony_ci    "hks_test_log.c",
50526fd984Sopenharmony_ci    "hks_test_mem.c",
51526fd984Sopenharmony_ci  ]
52526fd984Sopenharmony_ci
53526fd984Sopenharmony_ci  include_dirs =
54526fd984Sopenharmony_ci      [ "//base/security/huks/frameworks/huks_standard/main/common/include" ]
55526fd984Sopenharmony_ci
56526fd984Sopenharmony_ci  deps = []
57526fd984Sopenharmony_ci
58526fd984Sopenharmony_ci  configs = [ ":huks_test_common" ]
59526fd984Sopenharmony_ci
60526fd984Sopenharmony_ci  if (ohos_kernel_type == "liteos_m") {
61526fd984Sopenharmony_ci    cflags = [
62526fd984Sopenharmony_ci      "-D_CUT_LOG_",
63526fd984Sopenharmony_ci      "-Wall",
64526fd984Sopenharmony_ci      "-Werror",
65526fd984Sopenharmony_ci    ]
66526fd984Sopenharmony_ci    configs += [ ":hilog_lite_dir" ]
67526fd984Sopenharmony_ci    deps += [ "//base/hiviewdfx/hilog_lite/frameworks/mini:hilog_lite" ]
68526fd984Sopenharmony_ci  } else {
69526fd984Sopenharmony_ci    cflags = [
70526fd984Sopenharmony_ci      "-Wall",
71526fd984Sopenharmony_ci      "-Werror",
72526fd984Sopenharmony_ci    ]
73526fd984Sopenharmony_ci    configs += [ ":hilog_dir" ]
74526fd984Sopenharmony_ci    external_deps = [ "hilog_lite:hilog_shared" ]
75526fd984Sopenharmony_ci  }
76526fd984Sopenharmony_ci}
77