2023-10-19 22:18:08 +00:00
|
|
|
import logging
|
2024-10-09 15:39:50 +00:00
|
|
|
import os
|
2023-10-19 22:18:08 +00:00
|
|
|
|
2023-11-30 11:00:53 +00:00
|
|
|
from os import path
|
2023-10-19 22:18:08 +00:00
|
|
|
from scripts.utils.system_path import SystemPath
|
|
|
|
from . import testpath, timeouts, testrail, squish, system
|
2024-06-18 06:53:37 +00:00
|
|
|
from .system import get_platform
|
2023-10-19 22:18:08 +00:00
|
|
|
|
2023-12-01 13:58:22 +00:00
|
|
|
LOG = logging.getLogger(__name__)
|
2023-10-19 22:18:08 +00:00
|
|
|
|
|
|
|
try:
|
|
|
|
from ._local import *
|
|
|
|
except ImportError:
|
|
|
|
exit(
|
|
|
|
'Config file: "_local.py" not found in "./configs".\n'
|
|
|
|
'Please use template "_.local.default.py" to create file or execute command: \n'
|
|
|
|
rf'cp {testpath.ROOT}/configs/_local.default.py {testpath.ROOT}/configs/_local.py'
|
|
|
|
)
|
|
|
|
|
2023-11-30 11:05:59 +00:00
|
|
|
if AUT_PATH is None:
|
|
|
|
exit('Please add "AUT_PATH" in ./configs/_local.py')
|
2024-06-18 06:53:37 +00:00
|
|
|
if get_platform() == "Windows" and 'bin' not in AUT_PATH:
|
2023-11-30 11:05:59 +00:00
|
|
|
exit('Please use launcher from "bin" folder in "AUT_PATH"')
|
|
|
|
AUT_PATH = SystemPath(AUT_PATH)
|
2024-09-05 11:40:46 +00:00
|
|
|
WALLET_SEED = os.getenv('WALLET_TEST_USER_SEED')
|
2023-11-30 11:00:53 +00:00
|
|
|
|
|
|
|
# Save application logs
|
|
|
|
AUT_DIR = path.dirname(AUT_PATH)
|
2023-11-30 13:07:26 +00:00
|
|
|
PYTEST_LOG = path.join(AUT_DIR, 'pytest.log')
|
2023-12-01 08:11:52 +00:00
|
|
|
AUT_LOG_FILE = path.join(AUT_DIR, 'aut.log')
|
|
|
|
SQUISH_LOG_FILE = path.join(AUT_DIR, 'squish.log')
|