• 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/test.gni")
15
16process_group_module_output_path =
17    "resource_schedule_service/process_group_test"
18
19config("process_group_module_private_config") {
20  visibility = [ ":*" ]
21
22  include_dirs = [ "../../framework/process_group/include" ]
23}
24
25ohos_unittest("ProcessGroupSubTest") {
26  module_out_path = process_group_module_output_path
27
28  include_dirs = [ "../../framework/process_group/include" ]
29
30  sources = [ "process_group_sub_test.cpp" ]
31
32  cflags = []
33
34  if (target_cpu == "arm") {
35    cflags += [ "-DBINDER_IPC_32BIT" ]
36  }
37
38  configs = [ ":process_group_module_private_config" ]
39
40  deps = [
41    "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog",
42    "//foundation/resourceschedule/resource_schedule_service/cgroup_sched/framework/process_group:libprocess_group",
43    "//third_party/googletest:gtest_main",
44  ]
45  external_deps = [ "c_utils:utils" ]
46}
47
48ohos_executable("process_proup_test") {
49  module_install_dir = "bin/process_group"
50  include_dirs = []
51
52  sources = [ "./cgroup_setting_test.cpp" ]
53
54  cflags = []
55  if (target_cpu == "arm") {
56    cflags += [ "-DBINDER_IPC_32BIT" ]
57  }
58
59  deps = [ "//foundation/resourceschedule/resource_schedule_service/cgroup_sched/framework/process_group:libprocess_group" ]
60
61  install_enable = true
62  part_name = "resource_schedule_service"
63  subsystem_name = "resourceschedule"
64}
65
66group("unittest") {
67  testonly = true
68  deps = [ ":ProcessGroupSubTest" ]
69}
70