14514f5e3Sopenharmony_ci# Copyright (c) 2021 Huawei Device Co., Ltd. 24514f5e3Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 34514f5e3Sopenharmony_ci# you may not use this file except in compliance with the License. 44514f5e3Sopenharmony_ci# You may obtain a copy of the License at 54514f5e3Sopenharmony_ci# 64514f5e3Sopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 74514f5e3Sopenharmony_ci# 84514f5e3Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software 94514f5e3Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 104514f5e3Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 114514f5e3Sopenharmony_ci# See the License for the specific language governing permissions and 124514f5e3Sopenharmony_ci# limitations under the License. 134514f5e3Sopenharmony_ci 144514f5e3Sopenharmony_ciimport("//arkcompiler/ets_runtime/js_runtime_config.gni") 154514f5e3Sopenharmony_ciimport("//arkcompiler/ets_runtime/test/test_helper.gni") 164514f5e3Sopenharmony_ci 174514f5e3Sopenharmony_cimodule_output_path = "arkcompiler/ets_runtime" 184514f5e3Sopenharmony_ci 194514f5e3Sopenharmony_cihost_unittest_action("Base_001_Test") { 204514f5e3Sopenharmony_ci module_out_path = module_output_path 214514f5e3Sopenharmony_ci 224514f5e3Sopenharmony_ci sources = [ 234514f5e3Sopenharmony_ci # test file 244514f5e3Sopenharmony_ci "array_helper_test.cpp", 254514f5e3Sopenharmony_ci "atomic_helper_test.cpp", 264514f5e3Sopenharmony_ci "bit_helper_test.cpp", 274514f5e3Sopenharmony_ci "builtins_base_test.cpp", 284514f5e3Sopenharmony_ci "error_helper_test.cpp", 294514f5e3Sopenharmony_ci ] 304514f5e3Sopenharmony_ci 314514f5e3Sopenharmony_ci configs = [ 324514f5e3Sopenharmony_ci "../../../:ecma_test_config", 334514f5e3Sopenharmony_ci "../../../:icu_path_test_config", 344514f5e3Sopenharmony_ci ] 354514f5e3Sopenharmony_ci 364514f5e3Sopenharmony_ci deps = [ 374514f5e3Sopenharmony_ci "$ark_third_party_root/icu/icu4c:shared_icui18n", 384514f5e3Sopenharmony_ci "$ark_third_party_root/icu/icu4c:shared_icuuc", 394514f5e3Sopenharmony_ci "../../../:libark_jsruntime_test", 404514f5e3Sopenharmony_ci sdk_libc_secshared_dep, 414514f5e3Sopenharmony_ci ] 424514f5e3Sopenharmony_ci 434514f5e3Sopenharmony_ci # hiviewdfx libraries 444514f5e3Sopenharmony_ci external_deps = hiviewdfx_ext_deps 454514f5e3Sopenharmony_ci deps += hiviewdfx_deps 464514f5e3Sopenharmony_ci} 474514f5e3Sopenharmony_ci 484514f5e3Sopenharmony_cihost_unittest_action("Base_002_Test") { 494514f5e3Sopenharmony_ci module_out_path = module_output_path 504514f5e3Sopenharmony_ci 514514f5e3Sopenharmony_ci sources = [ 524514f5e3Sopenharmony_ci # test file 534514f5e3Sopenharmony_ci "ason_test.cpp", 544514f5e3Sopenharmony_ci "file_path_helper_test.cpp", 554514f5e3Sopenharmony_ci "gc_ring_buffer_test.cpp", 564514f5e3Sopenharmony_ci "json_parser_test.cpp", 574514f5e3Sopenharmony_ci "json_stringifier_test.cpp", 584514f5e3Sopenharmony_ci "math_helper_test.cpp", 594514f5e3Sopenharmony_ci ] 604514f5e3Sopenharmony_ci 614514f5e3Sopenharmony_ci configs = [ 624514f5e3Sopenharmony_ci "../../../:ecma_test_config", 634514f5e3Sopenharmony_ci "../../../:icu_path_test_config", 644514f5e3Sopenharmony_ci ] 654514f5e3Sopenharmony_ci 664514f5e3Sopenharmony_ci deps = [ 674514f5e3Sopenharmony_ci "$ark_third_party_root/icu/icu4c:shared_icui18n", 684514f5e3Sopenharmony_ci "$ark_third_party_root/icu/icu4c:shared_icuuc", 694514f5e3Sopenharmony_ci "../../../:libark_jsruntime_test", 704514f5e3Sopenharmony_ci sdk_libc_secshared_dep, 714514f5e3Sopenharmony_ci ] 724514f5e3Sopenharmony_ci 734514f5e3Sopenharmony_ci # hiviewdfx libraries 744514f5e3Sopenharmony_ci external_deps = hiviewdfx_ext_deps 754514f5e3Sopenharmony_ci deps += hiviewdfx_deps 764514f5e3Sopenharmony_ci} 774514f5e3Sopenharmony_ci 784514f5e3Sopenharmony_cihost_unittest_action("Base_003_Test") { 794514f5e3Sopenharmony_ci module_out_path = module_output_path 804514f5e3Sopenharmony_ci 814514f5e3Sopenharmony_ci sources = [ 824514f5e3Sopenharmony_ci # test file 834514f5e3Sopenharmony_ci "dtoa_helper_test.cpp", 844514f5e3Sopenharmony_ci "number_helper_test.cpp", 854514f5e3Sopenharmony_ci "string_helper_test.cpp", 864514f5e3Sopenharmony_ci "typed_array_helper_test.cpp", 874514f5e3Sopenharmony_ci "utf_helper_test.cpp", 884514f5e3Sopenharmony_ci ] 894514f5e3Sopenharmony_ci 904514f5e3Sopenharmony_ci configs = [ 914514f5e3Sopenharmony_ci "../../../:ecma_test_config", 924514f5e3Sopenharmony_ci "../../../:icu_path_test_config", 934514f5e3Sopenharmony_ci ] 944514f5e3Sopenharmony_ci 954514f5e3Sopenharmony_ci deps = [ 964514f5e3Sopenharmony_ci "$ark_third_party_root/icu/icu4c:shared_icui18n", 974514f5e3Sopenharmony_ci "$ark_third_party_root/icu/icu4c:shared_icuuc", 984514f5e3Sopenharmony_ci "../../../:libark_jsruntime_test", 994514f5e3Sopenharmony_ci sdk_libc_secshared_dep, 1004514f5e3Sopenharmony_ci ] 1014514f5e3Sopenharmony_ci 1024514f5e3Sopenharmony_ci # hiviewdfx libraries 1034514f5e3Sopenharmony_ci external_deps = hiviewdfx_ext_deps 1044514f5e3Sopenharmony_ci deps += hiviewdfx_deps 1054514f5e3Sopenharmony_ci} 1064514f5e3Sopenharmony_ci 1074514f5e3Sopenharmony_cigroup("unittest") { 1084514f5e3Sopenharmony_ci testonly = true 1094514f5e3Sopenharmony_ci 1104514f5e3Sopenharmony_ci # deps file 1114514f5e3Sopenharmony_ci deps = [ 1124514f5e3Sopenharmony_ci ":Base_001_Test", 1134514f5e3Sopenharmony_ci ":Base_002_Test", 1144514f5e3Sopenharmony_ci ":Base_003_Test", 1154514f5e3Sopenharmony_ci ] 1164514f5e3Sopenharmony_ci} 1174514f5e3Sopenharmony_ci 1184514f5e3Sopenharmony_cigroup("host_unittest") { 1194514f5e3Sopenharmony_ci testonly = true 1204514f5e3Sopenharmony_ci 1214514f5e3Sopenharmony_ci # deps file 1224514f5e3Sopenharmony_ci deps = [ 1234514f5e3Sopenharmony_ci ":Base_001_TestAction", 1244514f5e3Sopenharmony_ci ":Base_002_TestAction", 1254514f5e3Sopenharmony_ci ":Base_003_TestAction", 1264514f5e3Sopenharmony_ci ] 1274514f5e3Sopenharmony_ci if (is_mac) { 1284514f5e3Sopenharmony_ci deps -= [ 1294514f5e3Sopenharmony_ci ":Base_001_TestAction", 1304514f5e3Sopenharmony_ci ":Base_002_TestAction", 1314514f5e3Sopenharmony_ci ":Base_003_TestAction", 1324514f5e3Sopenharmony_ci ] 1334514f5e3Sopenharmony_ci } 1344514f5e3Sopenharmony_ci} 135