1ce968135Sopenharmony_ci# Copyright (c) 2020-2022 Huawei Device Co., Ltd. 2ce968135Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 3ce968135Sopenharmony_ci# you may not use this file except in compliance with the License. 4ce968135Sopenharmony_ci# You may obtain a copy of the License at 5ce968135Sopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 6ce968135Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software 7ce968135Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 8ce968135Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 9ce968135Sopenharmony_ci# See the License for the specific language governing permissions and 10ce968135Sopenharmony_ci# limitations under the License. 11ce968135Sopenharmony_ci 12ce968135Sopenharmony_ciimport("//build/test.gni") 13ce968135Sopenharmony_ciimport("../wallpaper.gni") 14ce968135Sopenharmony_ci 15ce968135Sopenharmony_ci## UnitTest wallpaper_test {{{ 16ce968135Sopenharmony_ci 17ce968135Sopenharmony_ciohos_unittest("wallpaper_test") { 18ce968135Sopenharmony_ci testonly = true 19ce968135Sopenharmony_ci resource_config_file = 20ce968135Sopenharmony_ci "${wallpaper_path}/test/unittest/resource/ohos_test.xml" 21ce968135Sopenharmony_ci module_out_path = "wallpaper_mgr/wallpaper_test" 22ce968135Sopenharmony_ci sources = [ "unittest/wallpaper_test.cpp" ] 23ce968135Sopenharmony_ci 24ce968135Sopenharmony_ci include_dirs = [ "${wallpaper_path}/services/include" ] 25ce968135Sopenharmony_ci deps = [ 26ce968135Sopenharmony_ci "${utils_path}:wallpaper_utils", 27ce968135Sopenharmony_ci "${wallpaper_path}/frameworks/native:wallpapermanager_static", 28ce968135Sopenharmony_ci "${wallpaper_path}/services:wallpaper_service", 29ce968135Sopenharmony_ci ] 30ce968135Sopenharmony_ci external_deps = [ 31ce968135Sopenharmony_ci "ability_base:want", 32ce968135Sopenharmony_ci "ability_runtime:ability_manager", 33ce968135Sopenharmony_ci "ability_runtime:abilitykit_native", 34ce968135Sopenharmony_ci "access_token:libaccesstoken_sdk", 35ce968135Sopenharmony_ci "access_token:libnativetoken", 36ce968135Sopenharmony_ci "access_token:libtoken_setproc", 37ce968135Sopenharmony_ci "access_token:libtokenid_sdk", 38ce968135Sopenharmony_ci "c_utils:utils", 39ce968135Sopenharmony_ci "common_event_service:cesfwk_innerkits", 40ce968135Sopenharmony_ci "hilog:libhilog", 41ce968135Sopenharmony_ci "hisysevent:libhisysevent", 42ce968135Sopenharmony_ci "hitrace:hitrace_meter", 43ce968135Sopenharmony_ci "image_framework:image", 44ce968135Sopenharmony_ci "image_framework:image_native", 45ce968135Sopenharmony_ci "ipc:ipc_single", 46ce968135Sopenharmony_ci "os_account:os_account_innerkits", 47ce968135Sopenharmony_ci "player_framework:media_client", 48ce968135Sopenharmony_ci "safwk:system_ability_fwk", 49ce968135Sopenharmony_ci "samgr:samgr_proxy", 50ce968135Sopenharmony_ci "window_manager:libwm", 51ce968135Sopenharmony_ci "window_manager:libwsutils", 52ce968135Sopenharmony_ci ] 53ce968135Sopenharmony_ci} 54ce968135Sopenharmony_ci 55ce968135Sopenharmony_ciohos_unittest("wallpaper_permission_test") { 56ce968135Sopenharmony_ci testonly = true 57ce968135Sopenharmony_ci resource_config_file = 58ce968135Sopenharmony_ci "${wallpaper_path}/test/unittest/resource/ohos_test.xml" 59ce968135Sopenharmony_ci module_out_path = "wallpaper_mgr/wallpaper_permission_test" 60ce968135Sopenharmony_ci sources = [ "unittest/wallpaper_permission_test.cpp" ] 61ce968135Sopenharmony_ci 62ce968135Sopenharmony_ci include_dirs = [] 63ce968135Sopenharmony_ci deps = [ "${wallpaper_path}/frameworks/native:wallpapermanager_static" ] 64ce968135Sopenharmony_ci external_deps = [ 65ce968135Sopenharmony_ci "access_token:libtokenid_sdk", 66ce968135Sopenharmony_ci "c_utils:utils", 67ce968135Sopenharmony_ci "common_event_service:cesfwk_innerkits", 68ce968135Sopenharmony_ci "hilog:libhilog", 69ce968135Sopenharmony_ci "image_framework:image", 70ce968135Sopenharmony_ci "image_framework:image_native", 71ce968135Sopenharmony_ci "ipc:ipc_single", 72ce968135Sopenharmony_ci "player_framework:media_client", 73ce968135Sopenharmony_ci "safwk:system_ability_fwk", 74ce968135Sopenharmony_ci "samgr:samgr_proxy", 75ce968135Sopenharmony_ci "window_manager:libwm", 76ce968135Sopenharmony_ci ] 77ce968135Sopenharmony_ci} 78ce968135Sopenharmony_ci 79ce968135Sopenharmony_ciohos_unittest("wallpaper_dfx_test") { 80ce968135Sopenharmony_ci testonly = true 81ce968135Sopenharmony_ci module_out_path = "wallpaper_mgr/wallpaper_dfx_test" 82ce968135Sopenharmony_ci sources = [ "unittest/wallpaper_dfx_test.cpp" ] 83ce968135Sopenharmony_ci 84ce968135Sopenharmony_ci include_dirs = [] 85ce968135Sopenharmony_ci deps = [ 86ce968135Sopenharmony_ci "${utils_path}:wallpaper_utils", 87ce968135Sopenharmony_ci "${wallpaper_path}/frameworks/native:wallpapermanager_static", 88ce968135Sopenharmony_ci "${wallpaper_path}/services:wallpaper_service", 89ce968135Sopenharmony_ci ] 90ce968135Sopenharmony_ci external_deps = [ 91ce968135Sopenharmony_ci "c_utils:utils", 92ce968135Sopenharmony_ci "hilog:libhilog", 93ce968135Sopenharmony_ci "hisysevent:libhisysevent", 94ce968135Sopenharmony_ci "hitrace:hitrace_meter", 95ce968135Sopenharmony_ci "player_framework:media_client", 96ce968135Sopenharmony_ci ] 97ce968135Sopenharmony_ci} 98ce968135Sopenharmony_ci 99ce968135Sopenharmony_cigroup("unittest") { 100ce968135Sopenharmony_ci testonly = true 101ce968135Sopenharmony_ci 102ce968135Sopenharmony_ci deps = [] 103ce968135Sopenharmony_ci 104ce968135Sopenharmony_ci deps += [ 105ce968135Sopenharmony_ci ":wallpaper_dfx_test", 106ce968135Sopenharmony_ci ":wallpaper_permission_test", 107ce968135Sopenharmony_ci ":wallpaper_test", 108ce968135Sopenharmony_ci ] 109ce968135Sopenharmony_ci} 110