• 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#     http://www.apache.org/licenses/LICENSE-2.0
6# Unless required by applicable law or agreed to in writing, software
7# distributed under the License is distributed on an "AS IS" BASIS,
8# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9# See the License for the specific language governing permissions and
10# limitations under the License.
11
12import("//base/theme/wallpaper_mgr/wallpaper.gni")
13import("//build/test.gni")
14
15## UnitTest wallpaper_test {{{
16
17ohos_unittest("wallpaper_test") {
18  resource_config_file =
19      "//base/theme/wallpaper_mgr/test/unittest/resource/ohos_test.xml"
20  module_out_path = "wallpaper_mgr/wallpaper_test"
21  sources = [ "unittest/wallpaper_test.cpp" ]
22
23  include_dirs = [
24    "//third_party/json/include",
25    "//third_party/googletest/googlemock/include",
26    "//base/theme/wallpaper_mgr/frameworks/innerkitsimpl/wallpaper_manager/include",
27    "//base/theme/wallpaper_mgr/utils/include",
28    "//base/theme/wallpaper_mgr/frameworks/innerkitsimpl/wallpaper_manager/include",
29    "//base/theme/wallpaper_mgr/services/dfx/hidumper_adapter",
30    "//base/theme/wallpaper_mgr/services/dfx/hisysevent_adapter",
31    "//base/theme/wallpaper_mgr/services/src/adapter",
32    "//foundation/graphic/graphic_2d/interfaces/innerkits/wm",
33  ]
34  deps = [
35    "${ability_runtime_path}/frameworks/native/ability/native:abilitykit_native",
36    "${utils_path}:wallpaper_utils",
37    "//base/security/access_token/interfaces/innerkits/token_setproc:libtoken_setproc",
38    "//base/theme/wallpaper_mgr/frameworks/innerkitsimpl/wallpaper_manager:wallpapermanager",
39    "//base/theme/wallpaper_mgr/services:wallpaper_service",
40    "//foundation/multimedia/image_framework:image_framework",
41    "//foundation/multimedia/image_framework/interfaces/innerkits:image_native",
42    "//foundation/multimedia/image_framework/interfaces/kits/js/common:image",
43    "//foundation/window/window_manager/utils:libwmutil",
44    "//foundation/window/window_manager/wm:libwm",
45    "//third_party/googletest:gmock",
46  ]
47  external_deps = [
48    "ability_base:want",
49    "ability_runtime:ability_manager",
50    "access_token:libaccesstoken_sdk",
51    "access_token:libnativetoken",
52    "c_utils:utils",
53    "common_event_service:cesfwk_innerkits",
54    "graphic_standard:surface",
55    "hisysevent_native:libhisysevent",
56    "hitrace_native:hitrace_meter",
57    "hiviewdfx_hilog_native:libhilog",
58    "ipc:ipc_core",
59    "os_account:os_account_innerkits",
60    "safwk:system_ability_fwk",
61    "samgr:samgr_proxy",
62  ]
63}
64
65ohos_unittest("wallpaper_permission_test") {
66  resource_config_file =
67      "//base/theme/wallpaper_mgr/test/unittest/resource/ohos_test.xml"
68  module_out_path = "wallpaper_mgr/wallpaper_permission_test"
69  sources = [ "unittest/wallpaper_permission_test.cpp" ]
70
71  include_dirs = [
72    "//third_party/json/include",
73    "//base/theme/wallpaper_mgr/frameworks/innerkitsimpl/wallpaper_manager/include",
74    "//base/theme/wallpaper_mgr/utils/include",
75    "//foundation/graphic/graphic_2d/interfaces/innerkits/wm",
76  ]
77  deps = [
78    "${ability_runtime_path}/frameworks/native/ability/native:abilitykit_native",
79    "//base/security/access_token/interfaces/innerkits/token_setproc:libtoken_setproc",
80    "//base/theme/wallpaper_mgr/frameworks/innerkitsimpl/wallpaper_manager:wallpapermanager",
81    "//base/theme/wallpaper_mgr/services:wallpaper_service",
82    "//foundation/multimedia/image_framework:image_framework",
83    "//foundation/multimedia/image_framework/interfaces/innerkits:image_native",
84    "//foundation/multimedia/image_framework/interfaces/kits/js/common:image",
85    "//foundation/window/window_manager/utils:libwmutil",
86    "//foundation/window/window_manager/wm:libwm",
87  ]
88  external_deps = [
89    "ability_base:want",
90    "ability_runtime:ability_manager",
91    "access_token:libaccesstoken_sdk",
92    "access_token:libnativetoken",
93    "c_utils:utils",
94    "common_event_service:cesfwk_innerkits",
95    "graphic_standard:surface",
96    "hisysevent_native:libhisysevent",
97    "hitrace_native:hitrace_meter",
98    "hiviewdfx_hilog_native:libhilog",
99    "ipc:ipc_core",
100    "os_account:os_account_innerkits",
101    "safwk:system_ability_fwk",
102    "samgr:samgr_proxy",
103  ]
104}
105
106ohos_unittest("wallpaper_dfx_test") {
107  module_out_path = "wallpaper_mgr/wallpaper_dfx_test"
108  sources = [ "unittest/wallpaper_dfx_test.cpp" ]
109
110  include_dirs = [
111    "//third_party/json/include",
112    "//base/theme/wallpaper_mgr/frameworks/innerkitsimpl/wallpaper_manager/include",
113    "//base/theme/wallpaper_mgr/utils/include",
114  ]
115  deps = [
116    "${utils_path}:wallpaper_utils",
117    "//base/theme/wallpaper_mgr/frameworks/innerkitsimpl/wallpaper_manager:wallpapermanager",
118    "//base/theme/wallpaper_mgr/services:wallpaper_service",
119  ]
120  external_deps = [
121    "c_utils:utils",
122    "hisysevent_native:libhisysevent",
123    "hitrace_native:hitrace_meter",
124    "hiviewdfx_hilog_native:libhilog",
125  ]
126}
127
128group("unittest") {
129  testonly = true
130
131  deps = []
132
133  deps += [
134    ":wallpaper_dfx_test",
135    ":wallpaper_permission_test",
136    ":wallpaper_test",
137  ]
138}
139