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("IC_001_Test") { 204514f5e3Sopenharmony_ci module_out_path = module_output_path 214514f5e3Sopenharmony_ci 224514f5e3Sopenharmony_ci sources = [ 234514f5e3Sopenharmony_ci # test file 244514f5e3Sopenharmony_ci "ic_binaryop_test.cpp", 254514f5e3Sopenharmony_ci "ic_compareop_test.cpp", 264514f5e3Sopenharmony_ci "ic_handler_test.cpp", 274514f5e3Sopenharmony_ci "ic_invoke_test.cpp", 284514f5e3Sopenharmony_ci "ic_runtime_stub_test.cpp", 294514f5e3Sopenharmony_ci ] 304514f5e3Sopenharmony_ci 314514f5e3Sopenharmony_ci configs = [ "../../../:ecma_test_config" ] 324514f5e3Sopenharmony_ci 334514f5e3Sopenharmony_ci deps = [ 344514f5e3Sopenharmony_ci "$ark_third_party_root/icu/icu4c:shared_icui18n", 354514f5e3Sopenharmony_ci "$ark_third_party_root/icu/icu4c:shared_icuuc", 364514f5e3Sopenharmony_ci "../../../:libark_jsruntime_test", 374514f5e3Sopenharmony_ci sdk_libc_secshared_dep, 384514f5e3Sopenharmony_ci ] 394514f5e3Sopenharmony_ci 404514f5e3Sopenharmony_ci # hiviewdfx libraries 414514f5e3Sopenharmony_ci external_deps = hiviewdfx_ext_deps 424514f5e3Sopenharmony_ci external_deps += [ "zlib:libz" ] 434514f5e3Sopenharmony_ci deps += hiviewdfx_deps 444514f5e3Sopenharmony_ci} 454514f5e3Sopenharmony_ci 464514f5e3Sopenharmony_cihost_unittest_action("IC_002_Test") { 474514f5e3Sopenharmony_ci module_out_path = module_output_path 484514f5e3Sopenharmony_ci 494514f5e3Sopenharmony_ci sources = [ 504514f5e3Sopenharmony_ci # test file 514514f5e3Sopenharmony_ci "ic_runtime_test.cpp", 524514f5e3Sopenharmony_ci "profile_type_info_test.cpp", 534514f5e3Sopenharmony_ci "properties_cache_test.cpp", 544514f5e3Sopenharmony_ci "property_box_test.cpp", 554514f5e3Sopenharmony_ci "proto_change_details_test.cpp", 564514f5e3Sopenharmony_ci ] 574514f5e3Sopenharmony_ci 584514f5e3Sopenharmony_ci configs = [ "//arkcompiler/ets_runtime:ecma_test_config" ] 594514f5e3Sopenharmony_ci 604514f5e3Sopenharmony_ci deps = [ 614514f5e3Sopenharmony_ci "$ark_third_party_root/icu/icu4c:shared_icui18n", 624514f5e3Sopenharmony_ci "$ark_third_party_root/icu/icu4c:shared_icuuc", 634514f5e3Sopenharmony_ci "//arkcompiler/ets_runtime:libark_jsruntime_test", 644514f5e3Sopenharmony_ci sdk_libc_secshared_dep, 654514f5e3Sopenharmony_ci ] 664514f5e3Sopenharmony_ci 674514f5e3Sopenharmony_ci # hiviewdfx libraries 684514f5e3Sopenharmony_ci external_deps = hiviewdfx_ext_deps 694514f5e3Sopenharmony_ci external_deps += [ "zlib:libz" ] 704514f5e3Sopenharmony_ci deps += hiviewdfx_deps 714514f5e3Sopenharmony_ci} 724514f5e3Sopenharmony_ci 734514f5e3Sopenharmony_cigroup("unittest") { 744514f5e3Sopenharmony_ci testonly = true 754514f5e3Sopenharmony_ci 764514f5e3Sopenharmony_ci # deps file 774514f5e3Sopenharmony_ci deps = [ 784514f5e3Sopenharmony_ci ":IC_001_Test", 794514f5e3Sopenharmony_ci ":IC_002_Test", 804514f5e3Sopenharmony_ci ] 814514f5e3Sopenharmony_ci} 824514f5e3Sopenharmony_ci 834514f5e3Sopenharmony_cigroup("host_unittest") { 844514f5e3Sopenharmony_ci testonly = true 854514f5e3Sopenharmony_ci 864514f5e3Sopenharmony_ci # deps file 874514f5e3Sopenharmony_ci deps = [ 884514f5e3Sopenharmony_ci ":IC_001_TestAction", 894514f5e3Sopenharmony_ci ":IC_002_TestAction", 904514f5e3Sopenharmony_ci ] 914514f5e3Sopenharmony_ci 924514f5e3Sopenharmony_ci if (is_mac) { 934514f5e3Sopenharmony_ci deps -= [ 944514f5e3Sopenharmony_ci ":IC_001_TestAction", 954514f5e3Sopenharmony_ci ":IC_002_TestAction", 964514f5e3Sopenharmony_ci ] 974514f5e3Sopenharmony_ci } 984514f5e3Sopenharmony_ci} 99