• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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("//foundation/resourceschedule/frame_aware_sched/frameaware.gni")
18
19module_output_path = "frameawareschedtest/"
20
21frame_aware_sched_configs =
22    [ "${innerkits_path}/frameintf:frame_msg_intf_config" ]
23
24frame_aware_sched_deps = [ "${innerkits_path}/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  configs = frame_aware_sched_configs
31
32  sources = [ "unittest/phone/frame_ui_intf_test.cpp" ]
33
34  if (is_standard_system) {
35    public_deps = frame_aware_sched_public_deps
36  }
37  part_name = "frame_aware_sched"
38  subsystem_name = "resourceschedule"
39}
40
41ohos_unittest("frame_msg_intf_test") {
42  module_out_path = module_output_path
43
44  sources = [ "unittest/phone/frame_msg_intf_test.cpp" ]
45
46  include_dirs = [
47    "//base/hiviewdfx/hiview/adapter/utility/include/extra/",
48    "//base/notification/eventhandler/interfaces/inner_api/",
49  ]
50
51  configs = frame_aware_sched_configs
52
53  if (is_standard_system) {
54    public_deps = frame_aware_sched_public_deps
55  }
56
57  part_name = "frame_aware_sched"
58  subsystem_name = "resourceschedule"
59}
60
61ohos_unittest("rtg_interface_test") {
62  module_out_path = module_output_path
63
64  sources = [ "unittest/phone/rtg_interface_test.cpp" ]
65
66  include_dirs = [ "${frame_aware_path}/common/include" ]
67
68  deps = frame_aware_sched_deps
69
70  if (is_standard_system) {
71    public_deps = frame_aware_sched_public_deps
72  }
73
74  part_name = "frame_aware_sched"
75  subsystem_name = "resourceschedule"
76}
77
78group("frame_unittest") {
79  testonly = true
80  deps = []
81  if (!is_asan) {
82    deps += [
83      ":frame_msg_intf_test",
84      ":rtg_interface_test",
85    ]
86  }
87}
88