• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2021-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("//base/powermgr/thermal_manager/thermalmgr.gni")
15import("//build/test.gni")
16
17module_output_path = "thermal_manager/thermal_native"
18
19deps_ex = [
20  "appspawn:appspawn_socket_client",
21  "ability_base:base",
22  "ability_base:want",
23  "bundle_framework:appexecfwk_base",
24  "common_event_service:cesfwk_innerkits",
25  "c_utils:utils",
26  "drivers_interface_thermal:libthermal_proxy_1.0",
27  "eventhandler:libeventhandler",
28  "hiviewdfx_hilog_native:libhilog",
29  "ipc:ipc_core",
30  "power_manager:powermgr_client",
31  "safwk:system_ability_fwk",
32  "samgr:samgr_proxy",
33]
34
35ohos_systemtest("ThermalMgrInterfaceTest") {
36  module_out_path = "${module_output_path}"
37
38  sources = [ "src/thermal_mgr_interface_test.cpp" ]
39
40  configs = [ "${utils_path}:utils_config" ]
41
42  include_dirs = [
43    "include",
44    "${thermal_manager_path}/services/native/include",
45    "${thermal_manager_path}/services/native/include/thermal_action",
46    "${thermal_manager_path}/services/native/include/thermal_observer",
47    "${thermal_manager_path}/services/native/include/thermal_policy",
48    "${thermal_manager_path}/services/native/include/thermal_observer/state_machine",
49    "${thermal_manager_path}/services/native/include/thermal_action/action",
50    "${thermal_manager_path}/services/zidl/include",
51  ]
52
53  deps = [
54    "${ability_runtime_services_path}/appmgr:libappms",
55    "${thermal_innerkits}:thermalsrv_client",
56    "${thermal_service_zidl}:thermalmgr_proxy",
57    "${thermal_service_zidl}:thermalmgr_stub",
58    "//foundation/arkui/ace_engine/interfaces/inner_api/ui_service_manager:ui_service_mgr",
59    "//third_party/googletest:gmock_main",
60    "//third_party/googletest:gtest_main",
61  ]
62  external_deps = deps_ex
63}
64
65ohos_systemtest("ThermalMgrSystemTest") {
66  module_out_path = "${module_output_path}"
67
68  sources = [ "src/thermal_mgr_system_test.cpp" ]
69
70  configs = [ "${utils_path}:utils_config" ]
71
72  include_dirs = [
73    "include",
74    "${thermal_manager_path}/services/zidl/include",
75    "${thermal_manager_path}/services/native/include",
76    "${thermal_manager_path}/services/native/include/thermal_action",
77    "${thermal_manager_path}/services/native/include/thermal_observer",
78    "${thermal_manager_path}/services/native/include/thermal_policy",
79    "${thermal_manager_path}/services/native/include/thermal_observer/state_machine",
80    "${thermal_manager_path}/services/native/include/thermal_action/action",
81  ]
82
83  deps = [
84    "${ability_runtime_services_path}/appmgr:libappms",
85    "${thermal_manager_path}/services:thermalservice",
86    "//foundation/arkui/ace_engine/interfaces/inner_api/ui_service_manager:ui_service_mgr",
87    "//third_party/googletest:gmock_main",
88    "//third_party/googletest:gtest_main",
89  ]
90  external_deps = deps_ex
91}
92
93ohos_systemtest("ThermalMgrDialogTest") {
94  module_out_path = "${module_output_path}"
95
96  sources = [ "src/thermal_mgr_dialog_test.cpp" ]
97
98  configs = [ "${utils_path}:utils_config" ]
99
100  include_dirs = [
101    "include",
102    "${thermal_manager_path}/services/zidl/include",
103    "${thermal_manager_path}/services/native/include",
104    "${thermal_manager_path}/services/native/include/thermal_action",
105    "${thermal_manager_path}/services/native/include/thermal_observer",
106    "${thermal_manager_path}/services/native/include/thermal_policy",
107    "${thermal_manager_path}/services/native/include/thermal_observer/state_machine",
108    "${thermal_manager_path}/services/native/include/thermal_action/action",
109  ]
110
111  deps = [
112    "${thermal_manager_path}/services:thermalservice",
113    "${thermal_service_zidl}:thermalmgr_proxy",
114    "${thermal_service_zidl}:thermalmgr_stub",
115    "${utils_path}:thermal_utils",
116    "//base/powermgr/thermal_manager/services:thermalservice",
117    "//third_party/googletest:gmock_main",
118    "//third_party/googletest:gtest_main",
119    "//third_party/libxml2:xml2",
120  ]
121  external_deps = deps_ex
122}
123
124group("systemtest") {
125  testonly = true
126
127  deps = [
128    ":ThermalMgrDialogTest",
129    ":ThermalMgrInterfaceTest",
130    ":ThermalMgrSystemTest",
131  ]
132}
133