diff --git a/ets2panda/linter-4.2/README.md b/ets2panda/linter-4.2/README.md index 3983b1f55123e84c069cdba99b25d334aaae64ed..b73e779ba71460a4a3faed3cc6738d9822e3519c 100644 --- a/ets2panda/linter-4.2/README.md +++ b/ets2panda/linter-4.2/README.md @@ -33,7 +33,7 @@ node dist/tslinter.js [options] [input files] Note: Before linting a project, it is highly recommended to install all project dependencies (with `npm install` or any other methods -- depends on the concrete project). -You can also use command files `tslinter.sh` or `tslinter.cmd` with same arguments as for direct launch. +You can also use command files `tslinter.sh` or `tslinter.bat` with same arguments as for direct launch. Possible command options: diff --git a/ets2panda/linter-4.2/test_linter.sh b/ets2panda/linter-4.2/test_linter.sh index 414a1d798fd849dd6fcaee2a4a2265d2e3df8fb8..a0a846dcb1ec9bcbafbc1dda3853e532e1129539 100644 --- a/ets2panda/linter-4.2/test_linter.sh +++ b/ets2panda/linter-4.2/test_linter.sh @@ -14,6 +14,9 @@ # See the License for the specific language governing permissions and # limitations under the License. # + +set -e + echo echo "=======================" echo "test linter in IDE mode" diff --git a/ets2panda/linter-4.2/tslinter.cmd b/ets2panda/linter-4.2/tslinter.bat similarity index 100% rename from ets2panda/linter-4.2/tslinter.cmd rename to ets2panda/linter-4.2/tslinter.bat diff --git a/ets2panda/linter-4.2/tslinter.sh b/ets2panda/linter-4.2/tslinter.sh index f0e37129620ad5329e502e3c58cd3528c81961eb..d045f942cf9f773a06a653a52b3a3e3ccac52f12 100644 --- a/ets2panda/linter-4.2/tslinter.sh +++ b/ets2panda/linter-4.2/tslinter.sh @@ -16,7 +16,7 @@ # # get absolute path to linter folder for possible use in future -TSLINTER_HOME_PATH=`cd $(dirname $0) && pwd` +TSLINTER_HOME_PATH=$(cd $(dirname $0) && pwd) # use relative path due to node.js error under cygwin environment node $(dirname $0)/./dist/tslinter.js $@ diff --git a/ets2panda/linter/README.md b/ets2panda/linter/README.md index 3983b1f55123e84c069cdba99b25d334aaae64ed..b73e779ba71460a4a3faed3cc6738d9822e3519c 100644 --- a/ets2panda/linter/README.md +++ b/ets2panda/linter/README.md @@ -33,7 +33,7 @@ node dist/tslinter.js [options] [input files] Note: Before linting a project, it is highly recommended to install all project dependencies (with `npm install` or any other methods -- depends on the concrete project). -You can also use command files `tslinter.sh` or `tslinter.cmd` with same arguments as for direct launch. +You can also use command files `tslinter.sh` or `tslinter.bat` with same arguments as for direct launch. Possible command options: diff --git a/ets2panda/linter/test_linter.sh b/ets2panda/linter/test_linter.sh index 414a1d798fd849dd6fcaee2a4a2265d2e3df8fb8..a0a846dcb1ec9bcbafbc1dda3853e532e1129539 100644 --- a/ets2panda/linter/test_linter.sh +++ b/ets2panda/linter/test_linter.sh @@ -14,6 +14,9 @@ # See the License for the specific language governing permissions and # limitations under the License. # + +set -e + echo echo "=======================" echo "test linter in IDE mode" diff --git a/ets2panda/linter/tslinter.cmd b/ets2panda/linter/tslinter.bat similarity index 100% rename from ets2panda/linter/tslinter.cmd rename to ets2panda/linter/tslinter.bat diff --git a/ets2panda/linter/tslinter.sh b/ets2panda/linter/tslinter.sh index f0e37129620ad5329e502e3c58cd3528c81961eb..d045f942cf9f773a06a653a52b3a3e3ccac52f12 100644 --- a/ets2panda/linter/tslinter.sh +++ b/ets2panda/linter/tslinter.sh @@ -16,7 +16,7 @@ # # get absolute path to linter folder for possible use in future -TSLINTER_HOME_PATH=`cd $(dirname $0) && pwd` +TSLINTER_HOME_PATH=$(cd $(dirname $0) && pwd) # use relative path due to node.js error under cygwin environment node $(dirname $0)/./dist/tslinter.js $@ diff --git a/ets2panda/scripts/es2panda_coverage.sh b/ets2panda/scripts/es2panda_coverage.sh index a299f1c515c1eb1cf3d7fd836cb52714f029d4bd..f6a2ed89d12a9e0e6071ee8730cf18ac902d0025 100644 --- a/ets2panda/scripts/es2panda_coverage.sh +++ b/ets2panda/scripts/es2panda_coverage.sh @@ -14,6 +14,8 @@ # Huawei Technologies Co.,Ltd. +set -e + for ARGUMENT in "$@" do case "$ARGUMENT" in diff --git a/ets2panda/scripts/test_runner.py b/ets2panda/scripts/test_runner.py index e759dddc0241f33ce5e599c5bbcbb2b393da7253..72509098857e1401b093b6bc5a64501a187cb5de 100644 --- a/ets2panda/scripts/test_runner.py +++ b/ets2panda/scripts/test_runner.py @@ -1,4 +1,5 @@ -#/usr/bin/env python +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- # Copyright (c) 2023 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/ets2panda/test/tsconfig/test.sh b/ets2panda/test/tsconfig/test.sh index 6404a6cdebced4c6971f9e8ef9095c06e7dfe6a0..81531e485aae1cca87cc6b13cdc4708ac7e46c0b 100755 --- a/ets2panda/test/tsconfig/test.sh +++ b/ets2panda/test/tsconfig/test.sh @@ -17,7 +17,7 @@ set -e SCRIPT_DIR="$(realpath "$(dirname "${BASH_SOURCE[0]}")")" usage() { - echo "Usage: $0 /path/to/panda/build/bin/es2panda /path/to/tsproject [PANDA_RUN_PREFIX]" + echo "Usage: $0 path/to/panda/build/bin/es2panda path/to/tsproject [PANDA_RUN_PREFIX]" } ensure_exists() { @@ -40,7 +40,7 @@ ensure_exists "$TSCONFIG" ensure_exists "$ES2PANDA" ensure_exists "$EXPECTED" -rm -rf "$BUILD" +rm -r -f "$BUILD" ACTUAL=$(mktemp /tmp/actual.XXXXXX) STDLIB="$PANDA_ROOT/plugins/ets/stdlib" diff --git a/test262/config.py b/test262/config.py index 44501352a09130e61cb824e741f10638b6bbade9..066c633679936af9daeea00b7bdb126b0c8085bb 100755 --- a/test262/config.py +++ b/test262/config.py @@ -48,10 +48,10 @@ RK3568_PRODUCT_NAME = "rk3568" DEFAULT_PRODUCT_NAME = HISPARK_TAURUS_PRODUCT_NAME ARGS_PREFIX = f"{CODE_ROOT}/out/" -ARK_DIR_SUFFIX = "/clang_x64/arkcompiler/ets_frontend" -ICUI_DIR_SUFFIX = "/clang_x64/thirdparty/icu" -ARK_JS_RUNTIME_DIR_SUFFIX = "/clang_x64/arkcompiler/ets_runtime" -ZLIB_DIR_SUFFIX = "/clang_x64/thirdparty/zlib" +ARK_DIR_SUFFIX = "clang_x64/arkcompiler/ets_frontend" +ICUI_DIR_SUFFIX = "clang_x64/thirdparty/icu" +ARK_JS_RUNTIME_DIR_SUFFIX = "clang_x64/arkcompiler/ets_runtime" +ZLIB_DIR_SUFFIX = "clang_x64/thirdparty/zlib" DEFAULT_ARK_DIR = f"{CODE_ROOT}/out/hispark_taurus/clang_x64/arkcompiler/ets_frontend" DEFAULT_ICUI_DIR = f"{CODE_ROOT}/out/hispark_taurus/clang_x64/thirdparty/icu" diff --git a/test262/run_test262.py b/test262/run_test262.py index 97dd0dbf5773c81c6da298ce9392427a100639b9..6eae1f22d6d1f32556ce20f8039ef995e19fe325 100755 --- a/test262/run_test262.py +++ b/test262/run_test262.py @@ -571,10 +571,10 @@ def get_host_args(args, host_type): if args.product_name: product_name = args.product_name - ark_dir = f"{ARGS_PREFIX}{product_name}{ARK_DIR_SUFFIX}" - icui_dir = f"{ARGS_PREFIX}{product_name}{ICUI_DIR_SUFFIX}" - ark_js_runtime_dir = f"{ARGS_PREFIX}{product_name}{ARK_JS_RUNTIME_DIR_SUFFIX}" - zlib_dir = f"{ARGS_PREFIX}{product_name}{ZLIB_DIR_SUFFIX}" + ark_dir = f"{ARGS_PREFIX}{product_name}/{ARK_DIR_SUFFIX}" + icui_dir = f"{ARGS_PREFIX}{product_name}/{ICUI_DIR_SUFFIX}" + ark_js_runtime_dir = f"{ARGS_PREFIX}{product_name}/{ARK_JS_RUNTIME_DIR_SUFFIX}" + zlib_dir = f"{ARGS_PREFIX}{product_name}/{ZLIB_DIR_SUFFIX}" ark_tool = os.path.join(ark_js_runtime_dir, "ark_js_vm") libs_dir = f"{icui_dir}:{LLVM_DIR}:{ark_js_runtime_dir}:{zlib_dir}"