1# Copyright (c) 2023 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 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("//build/test.gni") 15import("//foundation/graphic/graphic_2d/graphic_config.gni") 16 17ohos_unittest("hyper_graphic_manager_test") { 18 module_out_path = "graphic_2d/rosen/modules/hyper_graphic_manager" 19 20 cflags = [ 21 "-Wall", 22 "-Werror", 23 "-g3", 24 "-Dprivate=public", 25 "-Dprotected=public", 26 ] 27 28 if (is_ohos && is_clang && (target_cpu == "arm" || target_cpu == "arm64") && 29 enhanced_opt) { 30 cflags += [ "-fwhole-program-vtables" ] 31 } 32 33 sources = [ 34 "hgm_energy_consumption_policy_test.cpp", 35 "hgm_frame_rate_manager_test.cpp", 36 "hgm_hfbc_config_test.cpp", 37 "hgm_idle_detector_test.cpp", 38 "hgm_lru_cache_test.cpp", 39 "hgm_multi_app_strategy_test.cpp", 40 "hgm_screen_info_test.cpp", 41 "hgm_task_handle_thread_test.cpp", 42 "hgm_touch_manager_test.cpp", 43 "hgm_vsync_generator_controller_test.cpp", 44 "hgm_xml_parser_test.cpp", 45 "hyper_graphic_manager_test.cpp", 46 "rs_frame_rate_vote_test.cpp", 47 "rs_video_frame_rate_vote_test.cpp", 48 ] 49 50 include_dirs = [ 51 "$graphic_2d_root/rosen/modules/hyper_graphic_manager/core/frame_rate_manager", 52 "$graphic_2d_root/rosen/modules/hyper_graphic_manager/frame_rate_vote", 53 "$graphic_2d_root/rosen/modules/render_service_base/include", 54 ] 55 56 deps = [ 57 "$graphic_2d_root/rosen/modules/hyper_graphic_manager:libhyper_graphic_manager", 58 "$graphic_2d_root/rosen/modules/render_service_base:librender_service_base", 59 "$graphic_2d_root/rosen/modules/render_service_base:render_service_base_src", 60 "$graphic_2d_root/utils/test_header:test_header", 61 ] 62 63 external_deps = [ 64 "c_utils:utils", 65 "eventhandler:libeventhandler", 66 "ffrt:libffrt", 67 "graphic_surface:surface", 68 "hilog:libhilog", 69 "hitrace:hitrace_meter", 70 "init:libbeget_proxy", 71 "init:libbegetutil", 72 ] 73 74 part_name = "graphic_2d" 75 subsystem_name = "graphic" 76} 77 78group("unittest") { 79 testonly = true 80 81 deps = [ ":hyper_graphic_manager_test" ] 82} 83