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("Copy_Barrier_Test") { 19 module_out_path = module_output_path 20 21 sources = [ 22 # test file 23 "copy_barrier_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 "icu:shared_icui18n", 36 "icu:shared_icuuc", 37 "zlib:libz", 38 ] 39} 40 41host_unittest_action("Enum_Barrier_Test") { 42 module_out_path = module_output_path 43 44 sources = [ 45 # test file 46 "enum_barrier_test.cpp", 47 ] 48 49 configs = [ 50 "//arkcompiler/ets_runtime/common_components:common_components_test_config", 51 ] 52 53 deps = [ "//arkcompiler/ets_runtime/common_components:libark_common_components_test" ] 54 55 # hiviewdfx libraries 56 external_deps = [ 57 "icu:shared_icui18n", 58 "icu:shared_icuuc", 59 "zlib:libz", 60 ] 61} 62 63host_unittest_action("Idle_Barrier_Test") { 64 module_out_path = module_output_path 65 66 sources = [ 67 # test file 68 "idle_barrier_test.cpp", 69 ] 70 71 configs = [ 72 "//arkcompiler/ets_runtime/common_components:common_components_test_config", 73 "//arkcompiler/ets_runtime:icu_path_test_config", 74 ] 75 76 deps = [ "//arkcompiler/ets_runtime/common_components:libark_common_components_test" ] 77 78 # hiviewdfx libraries 79 external_deps = [ 80 "icu:shared_icui18n", 81 "icu:shared_icuuc", 82 "zlib:libz", 83 ] 84} 85 86host_unittest_action("Post_Marking_Barrier_Test") { 87 module_out_path = module_output_path 88 89 sources = [ 90 # test file 91 "post_marking_barrier_test.cpp", 92 ] 93 94 configs = [ 95 "//arkcompiler/ets_runtime/common_components:common_components_test_config", 96 "//arkcompiler/ets_runtime:icu_path_test_config", 97 ] 98 99 deps = [ "//arkcompiler/ets_runtime/common_components:libark_common_components_test" ] 100 101 # hiviewdfx libraries 102 external_deps = [ 103 "icu:shared_icui18n", 104 "icu:shared_icuuc", 105 "zlib:libz", 106 ] 107} 108 109host_unittest_action("Preforward_Barrier_Test") { 110 module_out_path = module_output_path 111 112 sources = [ 113 # test file 114 "preforward_barrier_test.cpp", 115 ] 116 117 configs = [ 118 "//arkcompiler/ets_runtime/common_components:common_components_test_config", 119 "//arkcompiler/ets_runtime:icu_path_test_config", 120 ] 121 122 deps = [ "//arkcompiler/ets_runtime/common_components:libark_common_components_test" ] 123 124 # hiviewdfx libraries 125 external_deps = [ 126 "icu:shared_icui18n", 127 "icu:shared_icuuc", 128 "zlib:libz", 129 ] 130} 131 132host_unittest_action("Remark_Barrier_Test") { 133 module_out_path = module_output_path 134 135 sources = [ 136 # test file 137 "remark_barrier_test.cpp", 138 ] 139 140 configs = [ 141 "//arkcompiler/ets_runtime/common_components:common_components_test_config", 142 "//arkcompiler/ets_runtime:icu_path_test_config", 143 ] 144 145 deps = [ "//arkcompiler/ets_runtime/common_components:libark_common_components_test" ] 146 147 # hiviewdfx libraries 148 external_deps = [ 149 "icu:shared_icui18n", 150 "icu:shared_icuuc", 151 "zlib:libz", 152 ] 153} 154 155host_unittest_action("Marking_Barrier_Test") { 156 module_out_path = module_output_path 157 158 sources = [ 159 # test file 160 "marking_barrier_test.cpp", 161 ] 162 163 configs = [ 164 "//arkcompiler/ets_runtime/common_components:common_components_test_config", 165 "//arkcompiler/ets_runtime:icu_path_test_config", 166 ] 167 168 deps = [ "//arkcompiler/ets_runtime/common_components:libark_common_components_test" ] 169 170 # hiviewdfx libraries 171 external_deps = [ 172 "icu:shared_icui18n", 173 "icu:shared_icuuc", 174 "zlib:libz", 175 ] 176} 177 178host_unittest_action("Ark_Collector_Test") { 179 module_out_path = module_output_path 180 181 sources = [ 182 # test file 183 "ark_collector_test.cpp", 184 ] 185 186 configs = [ 187 "//arkcompiler/ets_runtime/common_components:common_components_test_config", 188 "//arkcompiler/ets_runtime:icu_path_test_config", 189 ] 190 191 deps = [ "//arkcompiler/ets_runtime/common_components:libark_common_components_test" ] 192 193 # hiviewdfx libraries 194 external_deps = [ 195 "bounds_checking_function:libsec_shared", 196 "icu:shared_icui18n", 197 "icu:shared_icuuc", 198 "zlib:libz", 199 ] 200} 201 202group("unittest") { 203 testonly = true 204 205 # deps file 206 deps = [ 207 ":Ark_Collector_Test", 208 ":Copy_Barrier_Test", 209 ":Enum_Barrier_Test", 210 ":Idle_Barrier_Test", 211 ":Post_Marking_Barrier_Test", 212 ":Preforward_Barrier_Test", 213 ":Remark_Barrier_Test", 214 ":Marking_Barrier_Test", 215 ] 216} 217 218group("host_unittest") { 219 testonly = true 220 221 # deps file 222 deps = [ 223 ":Ark_Collector_TestAction", 224 ":Copy_Barrier_TestAction", 225 ":Enum_Barrier_TestAction", 226 ":Idle_Barrier_TestAction", 227 ":Post_Marking_Barrier_TestAction", 228 ":Preforward_Barrier_TestAction", 229 ":Remark_Barrier_TestAction", 230 ":Marking_Barrier_TestAction", 231 ] 232}