1# Copyright (C) 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# 6# http://www.apache.org/licenses/LICENSE-2.0 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/ohos.gni") 15import("//build/ohos_var.gni") 16import("//build/test.gni") 17import("../frameaware.gni") 18 19module_output_path = "frameawareschedtest/" 20 21frame_aware_sched_configs = 22 [ "../interfaces/innerkits/frameintf:frame_msg_intf_config" ] 23 24frame_aware_sched_deps = [ "../interfaces/innerkits/frameintf:frame_msg_intf" ] 25 26frame_aware_sched_public_deps = [ "//third_party/googletest:gtest_main" ] 27 28ohos_unittest("frame_ui_intf_test") { 29 module_out_path = module_output_path 30 31 sources = [ "unittest/phone/frame_ui_intf_test.cpp" ] 32 33 configs = frame_aware_sched_configs 34 35 deps = [ "../interfaces/innerkits/frameintf:frame_ui_intf" ] 36 37 if (is_standard_system) { 38 public_deps = frame_aware_sched_public_deps 39 } 40 part_name = "frame_aware_sched" 41 subsystem_name = "resourceschedule" 42} 43 44ohos_unittest("frame_msg_intf_test") { 45 module_out_path = module_output_path 46 47 sources = [ "unittest/phone/frame_msg_intf_test.cpp" ] 48 49 configs = frame_aware_sched_configs 50 51 deps = frame_aware_sched_deps 52 53 external_deps = [ "ffrt:libffrt" ] 54 55 if (is_standard_system) { 56 public_deps = frame_aware_sched_public_deps 57 } 58 59 part_name = "frame_aware_sched" 60 subsystem_name = "resourceschedule" 61} 62 63ohos_unittest("rtg_interface_test") { 64 module_out_path = module_output_path 65 66 sources = [ "unittest/phone/rtg_interface_test.cpp" ] 67 68 include_dirs = [ 69 "../common/include", 70 "../frameworks/core/frame_aware_policy/include", 71 ] 72 73 deps = frame_aware_sched_deps 74 75 if (is_standard_system) { 76 public_deps = frame_aware_sched_public_deps 77 } 78 79 part_name = "frame_aware_sched" 80 subsystem_name = "resourceschedule" 81} 82 83ohos_unittest("intellisense_server_test") { 84 module_out_path = module_output_path 85 86 sources = [ "unittest/phone/intellisense_server_test.cpp" ] 87 88 include_dirs = [ 89 "../common/include", 90 "../frameworks/core/frame_aware_policy/include", 91 ] 92 93 deps = frame_aware_sched_deps 94 95 if (is_standard_system) { 96 public_deps = frame_aware_sched_public_deps 97 } 98 99 part_name = "frame_aware_sched" 100 subsystem_name = "resourceschedule" 101} 102 103group("frame_unittest") { 104 testonly = true 105 deps = [] 106 if (!is_asan) { 107 deps += [ 108 ":frame_msg_intf_test", 109 ":intellisense_server_test", 110 ":rtg_interface_test", 111 ] 112 } 113} 114