1#!/usr/bin/env python3 2# -*- coding: utf-8 -*- 3 4""" 5Copyright (c) 2022 Huawei Device Co., Ltd. 6Licensed under the Apache License, Version 2.0 (the "License"); 7you may not use this file except in compliance with the License. 8You may obtain a copy of the License at 9 10 http://www.apache.org/licenses/LICENSE-2.0 11 12Unless required by applicable law or agreed to in writing, software 13distributed under the License is distributed on an "AS IS" BASIS, 14WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15See the License for the specific language governing permissions and 16limitations under the License. 17 18Description: Use ark to execute test 262 test suite 19""" 20 21import os 22import json 23TS_GIT_PATH = 'https://gitee.com/zhangrengao1/TypeScript.git' 24TS_TAG = "v4.3.5" 25 26EXPECT_DIR = os.path.join("testTs", "expect") 27OUT_DIR = os.path.join("out") 28OUT_TEST_DIR = os.path.join("out", "testTs") 29OUT_RESULT_FILE = os.path.join("out", "testTs", "result.txt") 30TEST_DIR = os.path.join("testTs") 31TS_CASES_DIR = os.path.join(".", "testTs", "test") 32SKIP_FILE_PATH = os.path.join("testTs", "skip_tests.json") 33CUR_FILE_DIR = os.path.dirname(__file__) 34IMPORT_FILE_PATH = os.path.join(CUR_FILE_DIR, "import_tests.json") 35CODE_ROOT = os.path.abspath(os.path.join(CUR_FILE_DIR, "../../..")) 36ARK_DIR = f"{CODE_ROOT}/out/hispark_taurus/clang_x64/arkcompiler/ets_frontend" 37WORK_PATH = f'{CODE_ROOT}/arkcompiler/ets_frontend' 38 39DEFAULT_ARK_FRONTEND_TOOL = os.path.join(ARK_DIR, "build", "src", "index.js") 40 41TEST_PATH = os.sep.join([".", "testTs", "test"]) 42OUT_PATH = os.sep.join([".", "out", "testTs"]) 43EXPECT_PATH = os.sep.join([".", "testTs", "expect"]) 44TS_EXT = ".ts" 45TXT_EXT = ".txt" 46ABC_EXT = ".abc" 47IMPORT_TEST = "" 48with open(IMPORT_FILE_PATH, 'r') as f: 49 content = f.read() 50 IMPORT_TEST = json.loads(content) 51