# Copyright (c) 2021-2022 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("//foundation/graphic/graphic_2d/graphic_config.gni") module_out_path = "graphic_2d/render_service_client" group("unittest") { testonly = true deps = [ ":RSDisplayModeTest", ":RSDropframeTest", ":RSEventTest", ":RSInterfacesTest", ":RSJankDetectorTest", ":RSRegionTest", ":RSScreenSkipFrameTest", ":RSTransactionsTest", ":RSTunnelHandleTest", ":RSVirtualScreenRefreshRateTest", "animation:RSAnimationTest", "animation:RSAnimationTest1", "animation:RSAnimationTest2", "animation:RSAnimationTest3", ] } ## Build RSVirtualScreenRefreshRateTest ohos_unittest("RSVirtualScreenRefreshRateTest") { module_out_path = module_out_path sources = [ "rs_virtual_screen_refresh_rate_test.cpp" ] deps = [ ":rs_client_test_common" ] external_deps = [ "c_utils:utils", "hilog:libhilog", ] } ## Build RSScreenSkipFrameTest ohos_unittest("RSScreenSkipFrameTest") { module_out_path = module_out_path sources = [ "rs_screen_skipframe_test.cpp" ] deps = [ ":rs_client_test_common" ] external_deps = [ "c_utils:utils", "hilog:libhilog", ] } ## Build RSJankDetectorTest ohos_unittest("RSJankDetectorTest") { module_out_path = module_out_path sources = [ "//foundation/graphic/graphic_2d/rosen/modules/render_service_client/core/jank_detector/rs_jank_detector.cpp", "rs_jank_detector_test.cpp", ] deps = [ ":rs_client_test_common" ] external_deps = [ "hisysevent:libhisysevent" ] } ## Build RSInterfacesTest ohos_unittest("RSInterfacesTest") { module_out_path = module_out_path sources = [ "rs_interfaces_test.cpp" ] if (defined(input_ext_feature_magiccursor) && input_ext_feature_magiccursor) { defines = [ "OHOS_BUILD_ENABLE_MAGICCURSOR" ] } deps = [ ":rs_client_test_common" ] external_deps = [ "graphic_surface:surface" ] } ## Build RSTransactionsTest ohos_unittest("RSTransactionsTest") { module_out_path = module_out_path sources = [ "rs_transaction_controller_test.cpp" ] deps = [ ":rs_client_test_common", "../../../render_service_base:render_service_base_src", ] } ## Build RSDropframeTest ohos_unittest("RSDropframeTest") { module_out_path = module_out_path sources = [ "rs_dropframe_test.cpp" ] deps = [ ":rs_client_test_common" ] } ## Build RSDisplayModeTest ohos_unittest("RSDisplayModeTest") { module_out_path = module_out_path sources = [ "rs_display_mode_test.cpp" ] deps = [ ":rs_client_test_common" ] } ## Build TunnelHandleTest ohos_unittest("RSTunnelHandleTest") { module_out_path = module_out_path sources = [ "rs_tunnel_handle_test.cpp" ] deps = [ ":rs_client_test_common" ] } ## Build RSEventTest ohos_unittest("RSEventTest") { module_out_path = module_out_path sources = [ "rs_event_test.cpp" ] deps = [ ":rs_client_test_common" ] } ## Build RSRegionTest ohos_unittest("RSRegionTest") { module_out_path = module_out_path sources = [ "rs_region_test.cpp" ] deps = [ ":rs_client_test_common", "../../../render_service_base:render_service_base_src", ] } ## Build rs_client_test_common.a {{{ config("rs_client_test_common_public_config") { include_dirs = [ "$graphic_2d_root/rosen/modules/render_service_client/core" ] cflags = [ "-Wall", "-Werror", "-g3", "-Dprivate=public", "-Dprotected=public", ] } ohos_static_library("rs_client_test_common") { visibility = [ ":*" ] testonly = true public_configs = [ ":rs_client_test_common_public_config" ] public_deps = [ "//commonlibrary/c_utils/base:utils", "//foundation/graphic/graphic_2d/rosen/modules/render_service_base:librender_service_base", "//foundation/graphic/graphic_2d/rosen/modules/render_service_client:librender_service_client", "//foundation/systemabilitymgr/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", "//third_party/googletest:gtest_main", ] public_external_deps = [ "c_utils:utils", "hilog:libhilog", ] subsystem_name = "graphic" part_name = "graphic_2d" } ## Build rs_client_test_common.a }}}