• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2025 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.
13import("//base/startup/appspawn/appspawn.gni")
14import("//build/test.gni")
15
16if (!defined(ohos_lite)) {
17  ohos_unittest("hnp_installer_test") {
18    module_out_path = "appspawn/appspawn"
19    cflags = [
20      "-Wno-implicit-fallthrough",
21      "-Wno-unused-function",
22      "-Dprivate=public",
23      "-Dprotected=public",
24    ]
25
26    cflags_cc = [
27      "-Wno-implicit-fallthrough",
28      "-fexceptions",
29    ]
30
31    include_dirs = [
32      "${appspawn_path}/service/hnp/base",
33      "${appspawn_path}/service/hnp/pack/include",
34      "${appspawn_path}/service/hnp/installer/include",
35      "${appspawn_path}/interfaces/innerkits/hnp/include",
36      "${appspawn_path}/util/include",
37      "include",
38    ]
39
40    sources = [
41      "${appspawn_path}/service/hnp/base/hnp_log.c",
42      "${appspawn_path}/service/hnp/installer/src/hnp_installer.c",
43      "src/hnp_installer_test.cpp",
44    ]
45
46    defines = [ "APPSPAWN_TEST" ]
47
48    deps = [ "${appspawn_path}/util:libappspawn_util" ]
49
50    external_deps = [
51      "bounds_checking_function:libsec_shared",
52      "cJSON:cjson",
53      "hilog:libhilog",
54      "init:libbegetutil",
55      "selinux_adapter:librestorecon",
56      "zlib:shared_libz",
57    ]
58
59    if (appspawn_support_code_signature) {
60      external_deps += [ "code_signature:libcode_sign_utils" ]
61    }
62  }
63}
64