1# Copyright (c) 2022 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_frontend/es2panda/es2abc_config.gni") 15import("//arkcompiler/ets_runtime/js_runtime_config.gni") 16 17action("es2abc_parser_tests") { 18 script = "${es2abc_root}/test/runner.py" 19 20 deps = es2abc_build_deps 21 22 args = [ 23 "--no-progress", 24 "--regression", 25 rebase_path("${es2abc_build_path}"), 26 ] 27 28 outputs = [ "${es2abc_build_path}/keep_es2abc_parser_tests_run" ] 29} 30 31action("es2abc_parser_tsc_tests") { 32 script = "${es2abc_root}/test/runner.py" 33 34 deps = es2abc_build_deps 35 36 tsc_path = rebase_path("//third_party/typescript/") 37 38 args = [ 39 "--no-progress", 40 "--tsc", 41 "--tsc-path", 42 tsc_path, 43 rebase_path("${es2abc_build_path}"), 44 ] 45 46 outputs = [ "${es2abc_build_path}/keep_es2abc_parser_tsc_tests_run" ] 47} 48 49action("es2abc_compiler_tests") { 50 script = "${es2abc_root}/test/runner.py" 51 52 deps = es2abc_build_deps 53 deps += [ "${js_root}:ark_js_host_linux_tools_packages" ] 54 55 host_jsvm_target = "${js_root}/ecmascript/js_vm:ark_js_vm(${host_toolchain})" 56 root_out_dir = get_label_info(host_jsvm_target, "root_out_dir") 57 ark_js_runtime_dir = rebase_path("${root_out_dir}/arkcompiler/ets_runtime") 58 59 if (is_standard_system) { 60 icu_path = "thirdparty/icu" 61 } else { 62 icu_path = "global/i18n" 63 } 64 icu_dir = rebase_path("${root_out_dir}/${icu_path}") 65 66 llvm_lib_dir = rebase_path("//prebuilts/clang/ohos/linux-x86_64/llvm/lib/") 67 68 zlib_dir = rebase_path("${root_out_dir}/thirdparty/zlib") 69 70 ld_library_path = 71 "${ark_js_runtime_dir}:${icu_dir}:${llvm_lib_dir}:${zlib_dir}" 72 73 args = [ 74 "--no-progress", 75 "--js-runtime", 76 ark_js_runtime_dir, 77 "--LD_LIBRARY_PATH", 78 ld_library_path, 79 "--compiler", 80 rebase_path("${es2abc_build_path}"), 81 ] 82 83 outputs = [ "${es2abc_build_path}/keep_es2abc_compiler_tests_run" ] 84} 85 86action("es2abc_patch_tests") { 87 script = "${es2abc_root}/test/runner.py" 88 89 deps = es2abc_build_deps 90 91 args = [ 92 "--no-progress", 93 "--hotfix", 94 "--coldfix", 95 "--hotreload", 96 rebase_path("${es2abc_build_path}"), 97 ] 98 99 outputs = [ "${es2abc_build_path}/keep_es2abc_patch_tests_run" ] 100} 101 102action("es2abc_base64_tests") { 103 script = "${es2abc_root}/test/runner.py" 104 105 deps = es2abc_build_deps 106 107 args = [ 108 "--no-progress", 109 "--base64", 110 rebase_path("${es2abc_build_path}"), 111 ] 112 113 outputs = [ "${es2abc_build_path}/keep_es2abc_base64_tests_run" ] 114} 115 116action("es2abc_bytecode_tests") { 117 script = "${es2abc_root}/test/runner.py" 118 119 deps = es2abc_build_deps 120 121 args = [ 122 "--no-progress", 123 "--bytecode", 124 rebase_path("${es2abc_build_path}"), 125 ] 126 127 outputs = [ "${es2abc_build_path}/keep_es2abc_bytecode_tests_run" ] 128} 129