• 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
20ohos_unittest("utils_test") {
21  testonly = true
22  module_out_path = MODULE_OUTPUT_PATH
23  sources = [
24    "json/utils_json_test.cpp",
25    "json/utils_json_visitor_test.cpp",
26    "utils_unittest.cpp",
27  ]
28  sources += [
29    "//base/update/updater/utils/json/json_node.cpp",
30    "//base/update/updater/utils/utils.cpp",
31  ]
32  include_dirs = [
33    "include",
34    "//base/update/updater/interfaces/kits/include/",
35    "//base/update/updater/services/include/",
36    "//base/update/updater/utils/include",
37    "//base/update/updater/utils/json",
38    "//base/update/updater/services/ui",
39    "//base/update/updater/test/unittest",
40    "//third_party/bounds_checking_function/include",
41    "//base/update/updater/services/include/updater",
42    "//third_party/cJSON",
43  ]
44  external_deps = [
45    "hiviewdfx_hilog_native:libhilog",
46    "init:libbegetutil",
47  ]
48  deps = [
49    "//base/update/updater/interfaces/kits/misc_info:libmiscinfo",
50    "//base/update/updater/services/fs_manager:libfsmanager",
51    "//base/update/updater/services/log:libupdaterlog",
52    "//third_party/bounds_checking_function:libsec_static",
53    "//third_party/cJSON:cjson",
54    "//third_party/googletest:gmock_main",
55    "//third_party/googletest:gtest_main",
56  ]
57  defines = [ "UPDATER_UT" ]
58  configs = [ "$UPDATER_TEST_ROOT:utest_config" ]
59  install_enable = true
60  part_name = "updater"
61}
62