• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/usr/bin/env python3
2# -*- coding: utf-8 -*-
3
4"""
5Copyright (c) 2023 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: run regress test case  config
19"""
20import os
21
22
23class RegressTestConfig:
24    DEFAULT_TIMEOUT = 100
25    CURRENT_PATH = os.getcwd()
26    TEST_TOOL_FILE_DIR = os.path.dirname(__file__)
27    CODE_ROOT = os.path.abspath(os.path.join(TEST_TOOL_FILE_DIR, "../../../.."))
28    PROJECT_ROOT = os.path.abspath(os.path.join(TEST_TOOL_FILE_DIR, "../.."))
29    REGRESS_GIT_REPO = "ark-regress"
30    TEST_TOOL_FILE_JS_NAME = 'mjsunit.js'
31    TEST_TOOL_FILE_NAME = 'mjsunit.abc'
32    REGRESS_GIT_URL = "https://gitee.com/chenjx-huawei/ark-regress.git"
33    REGRESS_GIT_HASH = "5c3c866d46f3334c1f974f35be2ea078ca1b99d5"
34    PROJECT_BASE_OUT_DIR = os.path.join(PROJECT_ROOT, "out")
35    REGRESS_BASE_TEST_DIR = os.path.join(PROJECT_ROOT, "test", "regresstest")
36    REGRESS_TEST_CASE_DIR = os.path.join(REGRESS_BASE_TEST_DIR, REGRESS_GIT_REPO)
37    REGRESS_TEST_TOOL_DIR = os.path.join(REGRESS_TEST_CASE_DIR, TEST_TOOL_FILE_JS_NAME)
38    SKIP_LIST_FILE = os.path.join(REGRESS_BASE_TEST_DIR, "regresstest_skip_tests.json")
39    FORCE_GC_FILE_LIST = os.path.join(REGRESS_BASE_TEST_DIR, "regress_skip_force_gc.json")
40    DEFAULT_LOG_FORMAT = '%(asctime)s - %(levelname)s - %(message)s'
41    ICU_PATH = f"{CODE_ROOT}/third_party/icu/ohos_icu4j/data"
42    LLVM_DIR = f"{CODE_ROOT}/prebuilts/clang/ohos/linux-x86_64/llvm/lib/"
43    DEFAULT_LIBS_DIR = f"{ICU_PATH}:{LLVM_DIR}"
44