1# Copyright (c) 2021 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/js_runtime_config.gni") 15import("//arkcompiler/ets_runtime/test/test_helper.gni") 16 17module_output_path = "arkcompiler/ets_runtime" 18 19host_unittest_action("BuiltinsInternational_001_Test") { 20 module_out_path = module_output_path 21 22 sources = [ 23 # test file 24 "builtins_bigint_test.cpp", 25 "builtins_collator_test.cpp", 26 "builtins_date_time_format_test.cpp", 27 "builtins_displaynames_test.cpp", 28 "builtins_lazy_test.cpp", 29 ] 30 31 configs = [ 32 "//arkcompiler/ets_runtime:ecma_test_config", 33 "//arkcompiler/ets_runtime:icu_path_test_config", 34 ] 35 36 deps = [ 37 "$ark_third_party_root/icu/icu4c:shared_icui18n", 38 "$ark_third_party_root/icu/icu4c:shared_icuuc", 39 "//arkcompiler/ets_runtime:libark_jsruntime_test", 40 sdk_libc_secshared_dep, 41 ] 42 43 # hiviewdfx libraries 44 external_deps = hiviewdfx_ext_deps 45 deps += hiviewdfx_deps 46} 47 48host_unittest_action("BuiltinsInternational_002_Test") { 49 module_out_path = module_output_path 50 51 sources = [ 52 # test file 53 "builtins_intl_test.cpp", 54 "builtins_list_format_test.cpp", 55 "builtins_locale_test.cpp", 56 "builtins_number_format_test.cpp", 57 "builtins_plural_rules_test.cpp", 58 "builtins_relative_time_format_test.cpp", 59 "builtins_string_test.cpp", 60 ] 61 62 configs = [ 63 "//arkcompiler/ets_runtime:ecma_test_config", 64 "//arkcompiler/ets_runtime:icu_path_test_config", 65 ] 66 67 deps = [ 68 "$ark_third_party_root/icu/icu4c:shared_icui18n", 69 "$ark_third_party_root/icu/icu4c:shared_icuuc", 70 "//arkcompiler/ets_runtime:libark_jsruntime_test", 71 sdk_libc_secshared_dep, 72 ] 73 74 # hiviewdfx libraries 75 external_deps = hiviewdfx_ext_deps 76 deps += hiviewdfx_deps 77} 78 79host_unittest_action("BuiltinsNaturalTest") { 80 module_out_path = module_output_path 81 82 sources = [ 83 # test file 84 "builtins_array_test.cpp", 85 "builtins_arraybuffer_test.cpp", 86 "builtins_atomics_test.cpp", 87 "builtins_boolean_test.cpp", 88 "builtins_dataview_test.cpp", 89 "builtins_date_test.cpp", 90 "builtins_errors_test.cpp", 91 "builtins_finalization_registry_test.cpp", 92 "builtins_function_test.cpp", 93 "builtins_global_test.cpp", 94 "builtins_iterator_test.cpp", 95 "builtins_json_test.cpp", 96 "builtins_map_test.cpp", 97 "builtins_math_test.cpp", 98 "builtins_number_test.cpp", 99 "builtins_object_test.cpp", 100 "builtins_promise_test.cpp", 101 "builtins_proxy_test.cpp", 102 "builtins_reflect_test.cpp", 103 "builtins_regexp_test.cpp", 104 "builtins_set_test.cpp", 105 "builtins_sharedarraybuffer_test.cpp", 106 "builtins_string_iterator_test.cpp", 107 "builtins_symbol_test.cpp", 108 "builtins_typedarray_test.cpp", 109 "builtins_weak_map_test.cpp", 110 "builtins_weak_ref_test.cpp", 111 "builtins_weak_set_test.cpp", 112 ] 113 114 configs = [ "//arkcompiler/ets_runtime:ecma_test_config" ] 115 116 deps = [ 117 "$ark_third_party_root/icu/icu4c:shared_icui18n", 118 "$ark_third_party_root/icu/icu4c:shared_icuuc", 119 "//arkcompiler/ets_runtime:libark_jsruntime_test", 120 sdk_libc_secshared_dep, 121 ] 122 123 # hiviewdfx libraries 124 external_deps = hiviewdfx_ext_deps 125 deps += hiviewdfx_deps 126} 127 128group("unittest") { 129 testonly = true 130 131 # deps file 132 deps = [ 133 ":BuiltinsInternational_001_Test", 134 ":BuiltinsInternational_002_Test", 135 ":BuiltinsNaturalTest", 136 ] 137} 138 139group("host_unittest") { 140 testonly = true 141 142 # deps file 143 deps = [ 144 ":BuiltinsInternational_001_TestAction", 145 ":BuiltinsInternational_002_TestAction", 146 ":BuiltinsNaturalTestAction", 147 ] 148} 149