• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2020-2022 Huawei Device Co., Ltd.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6#     http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14import("//build/lite/config/component/lite_component.gni")
15import("//build/lite/config/test.gni")
16
17config("app_verify_test_config") {
18  cflags_cc = [ "-std=c++17" ]
19}
20
21unittest("app_verify_test") {
22  output_extension = "bin"
23  output_dir = "$root_out_dir/test/unittest/security"
24  sources = [
25    "packets/business_packet.cpp",
26    "packets/modified_packet.cpp",
27    "packets/success_test.cpp",
28    "packets/udid_wrong_test.cpp",
29    "packets/unsigned_packet.cpp",
30    "packets/wrong_license.cpp",
31    "src/hap_verify_test.cpp",
32    "src/write_file.cpp",
33  ]
34
35  configs = [ ":app_verify_test_config" ]
36
37  include_dirs = [
38    "src",
39    "//base/security/appverify/interfaces/innerkits/appverify_lite/include",
40    "//base/startup/init/interfaces/innerkits/include/syspara",
41    "//base/security/permission_lite/interfaces/innerkits",
42    "//third_party/bounds_checking_function/include",
43    "//third_party/cJSON",
44  ]
45
46  deps = [
47    "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared",
48    "//base/security/appverify/interfaces/innerkits/appverify_lite:verify",
49    "//base/security/permission_lite/services/pms_client:pms_client",
50    "//base/startup/init/interfaces/innerkits:libbegetutil",
51    "//build/lite/config/component/cJSON:cjson_shared",
52    "//third_party/bounds_checking_function:libsec_shared",
53    "//third_party/mbedtls:mbedtls_shared",
54  ]
55  ldflags = [
56    "-lstdc++",
57    "-lm",
58    "-lpthread",
59  ]
60}
61
62group("unittest") {
63  deps = [ ":app_verify_test" ]
64}
65