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("//ark/ts2abc/ts2panda/ts2abc_config.gni") 15import("//build/config/clang/clang.gni") 16import("//build/ohos.gni") 17 18action("ts2abc_tests") { 19 script = "${ts2abc_root}/scripts/run_tests.py" 20 deps = [ "${ts2abc_root}:copy_ts2abc_tests" ] 21 22 args = [ 23 "--src-dir", 24 rebase_path("${ts2abc_root}"), 25 "--dist-dir", 26 rebase_path(target_out_dir + "/.."), 27 "--node-modules", 28 rebase_path("${node_modules}"), 29 ] 30 31 if (host_toolchain == buildtool_linux) { 32 args += [ 33 "--platform", 34 "linux", 35 ] 36 } else if (host_toolchain == buildtool_mac) { 37 args += [ 38 "--platform", 39 "mac", 40 ] 41 } else { 42 args += [ 43 "--platform", 44 "win", 45 ] 46 } 47 outputs = [ "$target_out_dir/ts2abc_tests/" ] 48} 49