• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 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/test.gni")
15
16UPDATER_TEST_ROOT = "//base/update/updater/test/unittest"
17
18MODULE_OUTPUT_PATH = "updater/updater_test"
19
20SUBSYSTEM_DIR = "//base/update/updater"
21
22ohos_unittest("updater_service_unittest") {
23  defines = [ "UPDATER_UT" ]
24  testonly = true
25  resource_config_file =
26      "//base/update/updater/test/unittest/test_data/ohos_test.xml"
27  module_out_path = MODULE_OUTPUT_PATH
28  sources = [
29    "//base/update/updater/services/updater_preprocess.cpp",
30    "//base/update/updater/services/updater_utils.cpp",
31    "updater_service_unittest.cpp",
32  ]
33  include_dirs = [
34    "include",
35    "${SUBSYSTEM_DIR}/utils/include",
36    "${SUBSYSTEM_DIR}/interfaces/kits/include/",
37    "//base/update/updater/services/include/package",
38    "//base/update/updater/services/package/pkg_manager",
39    "//base/update/updater/services/package/pkg_verify",
40    "//base/update/updater/services/include/log",
41    "//base/update/updater/utils/json",
42    "//foundation/graphic/ui/frameworks",
43    "//foundation/graphic/ui/interfaces/kits",
44    "//foundation/graphic/ui/interfaces/innerkits",
45    "//foundation/graphic/utils/interfaces/kits",
46    "//foundation/graphic/utils/interfaces/innerkits",
47    "//third_party/bounds_checking_function/include",
48    "//base/update/updater/services",
49    "//base/update/updater/services/ui",
50    "//base/update/updater/services/include",
51    "//base/startup/syspara_lite/interfaces/innerkits/native/syspara/include",
52    "//base/update/updater/services/ui/view",
53  ]
54
55  deps = [
56    "//base/update/updater/interfaces/kits/misc_info:libmiscinfo",
57    "//base/update/updater/interfaces/kits/packages:libpackageExt",
58    "//base/update/updater/services/applypatch:libapplypatch",
59    "//base/update/updater/services/diffpatch/patch:libpatch",
60    "//base/update/updater/services/fs_manager:libfsmanager",
61    "//base/update/updater/services/log:libupdaterlog",
62    "//base/update/updater/services/package:libupdaterpackage",
63    "//third_party/bounds_checking_function:libsec_shared",
64    "//third_party/bounds_checking_function:libsec_static",
65    "//third_party/bzip2:libbz2",
66    "//third_party/cJSON:cjson",
67    "//third_party/libdrm:libdrm",
68    "//third_party/openssl:libcrypto_static",
69    "//third_party/openssl:ssl_source",
70    "//third_party/zlib:libz",
71  ]
72
73  external_deps = [
74    "hiviewdfx_hilog_native:libhilog",
75    "init:libbegetutil",
76  ]
77  configs = [ "$UPDATER_TEST_ROOT:utest_config" ]
78  install_enable = true
79  part_name = "updater"
80}
81