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