• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2025 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("//arkcompiler/ets_runtime/common_components/tests/test_helper.gni")
15
16module_output_path = "common_component"
17
18host_unittest_action("Collector_Test") {
19  module_out_path = module_output_path
20
21  sources = [
22    # test file
23    "collector_resources_test.cpp",
24  ]
25
26  configs = [
27    "//arkcompiler/ets_runtime/common_components:common_components_test_config",
28    "//arkcompiler/ets_runtime:icu_path_test_config",
29  ]
30
31  deps = [ "//arkcompiler/ets_runtime/common_components:libark_common_components_test" ]
32
33  # hiviewdfx libraries
34  external_deps = [
35    "bounds_checking_function:libsec_shared",
36    "icu:shared_icui18n",
37    "icu:shared_icuuc",
38    "zlib:libz",
39  ]
40}
41
42host_unittest_action("Finalizer_Processor_Test") {
43  module_out_path = module_output_path
44
45  sources = [
46    # test file
47    "finalizer_processor_test.cpp",
48  ]
49
50  configs = [
51    "//arkcompiler/ets_runtime/common_components:common_components_test_config",
52    "//arkcompiler/ets_runtime:icu_path_test_config",
53  ]
54
55  deps = [ "//arkcompiler/ets_runtime/common_components:libark_common_components_test" ]
56
57  # hiviewdfx libraries
58  external_deps = [
59    "bounds_checking_function:libsec_shared",
60    "icu:shared_icui18n",
61    "icu:shared_icuuc",
62    "zlib:libz",
63  ]
64}
65
66host_unittest_action("Heuristic_Gc_Policy_Test") {
67  module_out_path = module_output_path
68
69  sources = [
70    # test file
71    "heuristic_gc_policy_test.cpp",
72  ]
73
74  configs = [
75    "//arkcompiler/ets_runtime/common_components:common_components_test_config",
76    "//arkcompiler/ets_runtime:icu_path_test_config",
77  ]
78
79  deps = [ "//arkcompiler/ets_runtime/common_components:libark_common_components_test" ]
80
81  # hiviewdfx libraries
82  external_deps = [
83    "icu:shared_icui18n",
84    "icu:shared_icuuc",
85    "runtime_core:libarkassembler_static",
86  ]
87}
88
89host_unittest_action("Collector_Proxy_Test") {
90  module_out_path = module_output_path
91
92  sources = [
93    # test file
94    "collector_proxy_test.cpp",
95  ]
96
97  configs = [
98    "//arkcompiler/ets_runtime/common_components:common_components_test_config",
99    "//arkcompiler/ets_runtime:icu_path_test_config",
100  ]
101
102  deps = [ "//arkcompiler/ets_runtime/common_components:libark_common_components_test" ]
103
104  # hiviewdfx libraries
105  external_deps = [
106    "icu:shared_icui18n",
107    "icu:shared_icuuc",
108    "runtime_core:libarkassembler_static",
109  ]
110}
111
112host_unittest_action("Marking_Collector_Test") {
113  module_out_path = module_output_path
114
115  sources = [
116    # test file
117    "marking_collector_test.cpp",
118  ]
119
120  configs = [
121    "//arkcompiler/ets_runtime/common_components:common_components_test_config",
122    "//arkcompiler/ets_runtime:icu_path_test_config",
123  ]
124
125  deps = [ "//arkcompiler/ets_runtime/common_components:libark_common_components_test" ]
126
127  # hiviewdfx libraries
128  external_deps = [
129    "icu:shared_icui18n",
130    "icu:shared_icuuc",
131    "zlib:libz",
132  ]
133}
134
135host_unittest_action("Task_Queue_Test") {
136  module_out_path = module_output_path
137
138  sources = [
139    # test file
140    "task_queue_test.cpp",
141  ]
142
143  configs = [
144    "//arkcompiler/ets_runtime/common_components:common_components_test_config",
145    "//arkcompiler/ets_runtime:icu_path_test_config",
146  ]
147
148  deps = [ "//arkcompiler/ets_runtime/common_components:libark_common_components_test" ]
149
150  # hiviewdfx libraries
151  external_deps = [
152    "icu:shared_icui18n",
153    "icu:shared_icuuc",
154    "zlib:libz",
155  ]
156}
157
158host_unittest_action("Gc_Request_Test") {
159  module_out_path = module_output_path
160
161  sources = [
162    # test file
163    "gc_request_test.cpp",
164  ]
165
166  configs = [
167    "//arkcompiler/ets_runtime/common_components:common_components_test_config",
168    "//arkcompiler/ets_runtime:icu_path_test_config",
169  ]
170
171  deps = [ "//arkcompiler/ets_runtime/common_components:libark_common_components_test" ]
172
173  # hiviewdfx libraries
174  external_deps = [
175    "icu:shared_icui18n",
176    "icu:shared_icuuc",
177    "zlib:libz",
178  ]
179}
180
181group("unittest") {
182  testonly = true
183
184  # deps file
185  deps = [
186    ":Collector_Test",
187    ":Finalizer_Processor_Test",
188    ":Heuristic_Gc_Policy_Test",
189    ":Collector_Proxy_Test",
190    ":Marking_Collector_Test",
191    ":Task_Queue_Test",
192    ":Gc_Request_Test",
193  ]
194}
195
196group("host_unittest") {
197  testonly = true
198
199  # deps file
200  deps = [
201    ":Collector_TestAction",
202    ":Finalizer_Processor_TestAction",
203    ":Heuristic_Gc_Policy_TestAction",
204    ":Collector_Proxy_TestAction",
205    ":Marking_Collector_TestAction",
206    ":Task_Queue_TestAction",
207    ":Gc_Request_TestAction",
208  ]
209}
210
211