# Copyright (c) 2023 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//build/test.gni") import("../../../windowmanager_aafwk.gni") module_out_path = "window_manager/window_scene" group("unittest") { testonly = true deps = [ ":ws_scene_session_manager_proxy_test", ":ws_scene_session_manager_stub_test", ":ws_scene_session_manager_test", ":ws_scene_session_test", ":ws_screen_cutout_controller_test", ":ws_screen_scene_config_test", ":ws_screen_session_manager_test", ":ws_session_manager_agent_controller_test", ":ws_session_test", ":ws_window_scene_config_test", ":ws_window_session_property_test", ] } ohos_unittest("ws_session_test") { module_out_path = module_out_path sources = [ "session_test.cpp" ] deps = [ ":ws_unittest_common" ] external_deps = [ "ability_base:session_info", "ability_base:want", "c_utils:utils", "hilog:libhilog", ] } ohos_unittest("ws_screen_cutout_controller_test") { module_out_path = module_out_path sources = [ "screen_cutout_controller_test.cpp" ] deps = [ ":ws_unittest_common" ] external_deps = [ "c_utils:utils", "hilog:libhilog", ] } ohos_unittest("ws_screen_scene_config_test") { module_out_path = module_out_path sources = [ "screen_scene_config_test.cpp" ] deps = [ ":ws_unittest_common" ] external_deps = [ "c_utils:utils", "hilog:libhilog", ] } ohos_unittest("ws_screen_session_manager_test") { module_out_path = module_out_path sources = [ "screen_session_manager_test.cpp" ] deps = [ ":ws_unittest_common" ] external_deps = [ "c_utils:utils", "hilog:libhilog", ] } ohos_unittest("ws_window_scene_config_test") { module_out_path = module_out_path sources = [ "window_scene_config_test.cpp" ] deps = [ ":ws_unittest_common" ] external_deps = [ "c_utils:utils", "hilog:libhilog", ] } ohos_unittest("ws_scene_session_manager_test") { module_out_path = module_out_path sources = [ "scene_session_manager_test.cpp" ] deps = [ ":ws_unittest_common" ] external_deps = [ "c_utils:utils", "hilog:libhilog", ] } ohos_unittest("ws_scene_session_manager_proxy_test") { module_out_path = module_out_path sources = [ "scene_session_manager_proxy_test.cpp" ] deps = [ ":ws_unittest_common" ] external_deps = [ "c_utils:utils", "hilog:libhilog", ] } ohos_unittest("ws_session_manager_agent_controller_test") { module_out_path = module_out_path sources = [ "session_manager_agent_controller_test.cpp" ] deps = [ ":ws_unittest_common" ] external_deps = [ "c_utils:utils", "hilog:libhilog", ] } ohos_unittest("ws_session_manager_test") { module_out_path = module_out_path sources = [ "session_manager_test.cpp" ] deps = [ ":ws_unittest_common" ] external_deps = [ "c_utils:utils", "hilog:libhilog", ] } ohos_unittest("ws_scene_session_manager_stub_test") { module_out_path = module_out_path sources = [ "scene_session_manager_stub_test.cpp" ] deps = [ ":ws_unittest_common" ] external_deps = [ "c_utils:utils", "hilog:libhilog", ] } ohos_unittest("ws_scene_session_test") { module_out_path = module_out_path sources = [ "scene_session_test.cpp" ] deps = [ ":ws_unittest_common" ] external_deps = [ "c_utils:utils", "hilog:libhilog", ] } ohos_unittest("ws_window_session_property_test") { module_out_path = module_out_path sources = [ "window_session_property_test.cpp" ] deps = [ ":ws_unittest_common" ] external_deps = [ "c_utils:utils" ] } ## Build ws_unittest_common.a {{{ config("ws_unittest_common_public_config") { include_dirs = [ "${window_base_path}/test/common/mock", # for WMError Code "${window_base_path}/dm/include", "${window_base_path}/dmserver/include", "${window_base_path}/interfaces/innerkits/dm", "${window_base_path}/interfaces/innerkits/wm", "${window_base_path}/window_scene/session_manager/include", "${window_base_path}/window_scene/session_manager_service/include", "${window_base_path}/window_scene/common/include", "${window_base_path}/window_scene", "${window_base_path}/window_scene/test", "//third_party/googletest/googlemock/include", # for window_manager_interface "${window_base_path}/wmserver/include", "${window_base_path}/wmserver/include/zidl", "${graphic_base_path}/graphic_2d/rosen/modules/animation/window_animation/include", "${multimodalinput_path}/input/interfaces/native/innerkits/event/include", "${multimodalinput_path}/input/util/common/include", "${ability_runtime_inner_api_path}/ability_manager/include", "${window_base_path}/wm/include", "${window_base_path}/wm/include/zidl", # for session_manager "${multimodalinput_path}/input/interfaces/native/innerkits/event/include", "${window_base_path}/window_scene/interfaces/include", "${resourceschedule_path}/ffrt/interfaces/kits", "${ability_runtime_inner_api_path}/ability_manager/include", "${ability_runtime_inner_api_path}/session_handler/include", # for screenlock_manager_interface "${screenlock_mgr_path}/services/include", "${screenlock_mgr_path}/utils/include", "${screenlock_mgr_path}/frameworks/native/include", "${window_base_path}/wm/include", "${window_base_path}/wm/include/zidl", # for window_manager_hilog "${window_base_path}/utils/include", ] } ohos_static_library("ws_unittest_common") { visibility = [ ":*" ] testonly = true public_configs = [ ":ws_unittest_common_public_config", "${window_base_path}/resources/config/build:coverage_flags", "${window_base_path}/resources/config/build:testcase_flags", ] deps = [ "${window_base_path}/dm:libdm", "${window_base_path}/utils:libwmutil", "${window_base_path}/window_scene/common:window_scene_common", "${window_base_path}/window_scene/session:scene_session", "${window_base_path}/window_scene/session_manager:scene_session_manager", "${window_base_path}/window_scene/session_manager:screen_session_manager", "${window_base_path}/window_scene/session_manager:session_manager", "${window_base_path}/wm:libwm", "//third_party/googletest:gmock", "//third_party/googletest:gtest_main", "//third_party/libxml2:libxml2", ] public_deps = [ "${graphic_base_path}/graphic_2d/rosen/modules/render_service_client:librender_service_client", "${window_base_path}/utils:libwmutil", ] external_deps = [ "ability_base:configuration", "ability_base:want", "c_utils:utils", "hilog:libhilog", "input:libmmi-client", "ipc:ipc_single", ] part_name = "window_manager" subsystem_name = "window" } ## Build ws_unittest_common.a }}}