1# Copyright (c) 2021-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/ts2panda/ts2abc_config.gni") 15 16action("ts2abc_ts_type_system_test") { 17 script = "${ts2abc_root}/../testTs/run_testTs.py" 18 deps = [ "${ts2abc_root}:copy_ts2abc_tests" ] 19 outputs = [ "$target_out_dir/ts2abc_ts_type_system_test/" ] 20} 21 22action("ts2abc_ts_instruction_type_test") { 23 script = "${ts2abc_root}/../testTs/run_testTs.py" 24 deps = [ "${ts2abc_root}:copy_ts2abc_tests" ] 25 args = [ "--testinstype" ] 26 outputs = [ "$target_out_dir/ts2abc_ts_instruction_type_test/" ] 27} 28 29action("ts2abc_ts_ut_test") { 30 script = "${ts2abc_root}/scripts/run_tests.py" 31 deps = [ "${ts2abc_root}:copy_ts2abc_tests" ] 32 33 args = [ 34 "--src-dir", 35 rebase_path("${ts2abc_root}"), 36 "--dist-dir", 37 rebase_path(target_out_dir + "/.."), 38 "--node-modules", 39 rebase_path("${node_modules}"), 40 ] 41 42 if (host_toolchain == toolchain_linux) { 43 args += [ 44 "--platform", 45 "linux", 46 ] 47 } else if (host_toolchain == toolchain_mac) { 48 args += [ 49 "--platform", 50 "mac", 51 ] 52 } else { 53 args += [ 54 "--platform", 55 "win", 56 ] 57 } 58 outputs = [ "$target_out_dir/ts2abc_ts_ut_test/" ] 59} 60