1#
2# Copyright (c) 2020 Huawei Device Co., Ltd.
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#     http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14#
15
16import("//build/ohos.gni")
17
18config("hilog_dir") {
19  include_dirs =
20      [ "//base/hiviewdfx/hilog_lite/interfaces/native/innerkits/hilog/" ]
21}
22config("hilog_lite_dir") {
23  include_dirs =
24      [ "//base/hiviewdfx/hilog_lite/interfaces/native/kits/hilog_lite/" ]
25}
26
27config("huks_test_common") {
28  include_dirs = [
29    "//base/security/huks/interfaces/inner_api/huks_standard/main/include",
30    "include",
31    "//base/security/huks/test/unittest/huks_common_test/include",
32  ]
33}
34
35ohos_static_library("huks_3.0_test_common") {
36  sources = [
37    "//base/security/huks/test/unittest/huks_common_test/src/hks_test_adapt_for_de.c",
38    "//base/security/huks/test/unittest/huks_common_test/src/hks_test_aes_func.cpp",
39    "//base/security/huks/test/unittest/huks_common_test/src/hks_test_cipher_func.cpp",
40    "//base/security/huks/test/unittest/huks_common_test/src/hks_test_common_func.cpp",
41    "//base/security/huks/test/unittest/huks_common_test/src/hks_test_curve25519_func.cpp",
42    "//base/security/huks/test/unittest/huks_common_test/src/hks_test_file_operator_func.c",
43    "hks_test_aes.c",
44    "hks_test_api_performance.c",
45    "hks_test_cipher.c",
46    "hks_test_common.c",
47    "hks_test_curve25519.c",
48    "hks_test_file_operator.c",
49    "hks_test_log.c",
50    "hks_test_mem.c",
51  ]
52
53  include_dirs =
54      [ "//base/security/huks/frameworks/huks_standard/main/common/include" ]
55
56  deps = []
57
58  configs = [ ":huks_test_common" ]
59
60  if (ohos_kernel_type == "liteos_m") {
61    cflags = [
62      "-D_CUT_LOG_",
63      "-Wall",
64      "-Werror",
65    ]
66    configs += [ ":hilog_lite_dir" ]
67    deps += [ "//base/hiviewdfx/hilog_lite/frameworks/mini:hilog_lite" ]
68  } else {
69    cflags = [
70      "-Wall",
71      "-Werror",
72    ]
73    configs += [ ":hilog_dir" ]
74    external_deps = [ "hilog_lite:hilog_shared" ]
75  }
76}
77