• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-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("//base/global/resource_management/resmgr.gni")
15import("//build/test.gni")
16
17ohos_unittest("resmgr_test") {
18  module_out_path = "resource_management/test"
19
20  defines = [ "CONFIG_HILOG" ]
21
22  sources = [
23    "unittest/common/hap_manager_test.cpp",
24    "unittest/common/hap_parser_test.cpp",
25    "unittest/common/hap_resource_test.cpp",
26    "unittest/common/locale_info_test.cpp",
27    "unittest/common/res_config_impl_test.cpp",
28    "unittest/common/res_config_test.cpp",
29    "unittest/common/res_desc_test.cpp",
30    "unittest/common/resource_manager_performance_test.cpp",
31    "unittest/common/resource_manager_test.cpp",
32    "unittest/common/string_utils_test.cpp",
33    "unittest/common/test_common.cpp",
34  ]
35
36  include_dirs = [
37    "unittest/common",
38    "//base/global/resource_management/frameworks/resmgr/include",
39    "//base/global/resource_management/interfaces/inner_api/include",
40  ]
41
42  if (resource_management_support_icu) {
43    include_dirs += [
44      "//third_party/icu/icu4c/source",
45      "//third_party/icu/icu4c/source/common",
46      "//third_party/icu/icu4c/source/i18n",
47      "//third_party/zlib/contrib/minizip",
48    ]
49    defines += [ "SUPPORT_GRAPHICS" ]
50  }
51
52  deps = [
53    "//base/global/resource_management/frameworks/resmgr:global_resmgr",
54    "//third_party/googletest:gtest_main",
55    "//third_party/zlib:libz",
56  ]
57  external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
58
59  resource_config_file =
60      "//base/global/resource_management/test/resource/ohos_test.xml"
61}
62
63group("unittest") {
64  testonly = true
65  deps = [ ":resmgr_test" ]
66}
67