fix(all): rename APP_DIR to AUT_PATH to reflect purpose
The name APP_DIR suggests the path is a directory, but it's not. Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
bbc81717ce
commit
5d8d7aaa39
|
@ -91,13 +91,13 @@ pipeline {
|
|||
stage('Download') {
|
||||
when { expression { params.BUILD_SOURCE.startsWith('http') } }
|
||||
steps { timeout(5) { script {
|
||||
sh 'mkdir -p ./tmp/pkg/'
|
||||
sh 'mkdir -p ./pkg/'
|
||||
setBuildDescFromFile(params.BUILD_SOURCE)
|
||||
fileOperations([
|
||||
fileDownloadOperation(
|
||||
url: params.BUILD_SOURCE,
|
||||
targetFileName: 'StatusIm-Desktop.tar.gz',
|
||||
targetLocation: './tmp/pkg/',
|
||||
targetLocation: './pkg/',
|
||||
userName: '',
|
||||
password: '',
|
||||
)
|
||||
|
@ -112,16 +112,17 @@ pipeline {
|
|||
projectName: params.BUILD_SOURCE,
|
||||
filter: 'pkg/*-x86_64.tar.gz',
|
||||
selector: lastWithArtifacts(),
|
||||
target: './tmp'
|
||||
target: './'
|
||||
)
|
||||
setBuildDescFromFile(utils.findFile('tmp/pkg/*tar.gz'))
|
||||
setBuildDescFromFile(utils.findFile('pkg/*tar.gz'))
|
||||
} } }
|
||||
}
|
||||
|
||||
stage('Unpack') {
|
||||
steps { timeout(5) { script {
|
||||
sh "tar -zxvf '${utils.findFile('tmp/pkg/*tar.gz')}' -C './tmp'"
|
||||
env.APP_DIR = utils.findFile('tmp/*.AppImage')
|
||||
sh 'mkdir aut'
|
||||
sh "tar -zxvf '${utils.findFile('pkg/*tar.gz')}' -C './aut'"
|
||||
env.AUT_PATH = utils.findFile('aut/*.AppImage')
|
||||
} } }
|
||||
}
|
||||
|
||||
|
|
|
@ -14,8 +14,8 @@ except ImportError:
|
|||
rf'cp {testpath.ROOT}/configs/_local.default.py {testpath.ROOT}/configs/_local.py'
|
||||
)
|
||||
|
||||
if APP_DIR is None:
|
||||
exit('Please add "APP_DIR" in ./configs/_local.py')
|
||||
if system.IS_WIN and 'bin' not in APP_DIR:
|
||||
exit('Please use launcher from "bin" folder in "APP_DIR"')
|
||||
APP_DIR = SystemPath(APP_DIR)
|
||||
if AUT_PATH is None:
|
||||
exit('Please add "AUT_PATH" in ./configs/_local.py')
|
||||
if system.IS_WIN and 'bin' not in AUT_PATH:
|
||||
exit('Please use launcher from "bin" folder in "AUT_PATH"')
|
||||
AUT_PATH = SystemPath(AUT_PATH)
|
||||
|
|
|
@ -4,4 +4,4 @@ import os
|
|||
LOG_LEVEL = logging.INFO
|
||||
UPDATE_VP_ON_FAIL = False
|
||||
DEV_BUILD = False
|
||||
APP_DIR = os.getenv('APP_DIR')
|
||||
AUT_PATH = os.getenv('AUT_PATH')
|
||||
|
|
|
@ -3,4 +3,4 @@ import logging
|
|||
LOG_LEVEL = logging.DEBUG
|
||||
UPDATE_VP_ON_FAIL = False
|
||||
DEV_BUILD = False
|
||||
APP_DIR = None
|
||||
AUT_PATH = None
|
||||
|
|
|
@ -22,7 +22,7 @@ _logger = logging.getLogger(__name__)
|
|||
class AUT:
|
||||
def __init__(
|
||||
self,
|
||||
app_path: system_path.SystemPath = configs.APP_DIR,
|
||||
app_path: system_path.SystemPath = configs.AUT_PATH,
|
||||
user_data: SystemPath = None
|
||||
):
|
||||
super(AUT, self).__init__()
|
||||
|
|
|
@ -38,8 +38,8 @@ def user_data(request) -> system_path.SystemPath:
|
|||
|
||||
@pytest.fixture
|
||||
def aut(user_data) -> AUT:
|
||||
if not configs.APP_DIR.exists():
|
||||
pytest.exit(f"Application not found: {configs.APP_DIR}")
|
||||
if not configs.AUT_PATH.exists():
|
||||
pytest.exit(f"Application not found: {configs.AUT_PATH}")
|
||||
_aut = AUT(user_data=user_data)
|
||||
yield _aut
|
||||
|
||||
|
@ -47,8 +47,8 @@ def aut(user_data) -> AUT:
|
|||
@pytest.fixture()
|
||||
def multiple_instance():
|
||||
def _aut(user_data: SystemPath = None) -> AUT:
|
||||
if not configs.APP_DIR.exists():
|
||||
pytest.exit(f"Application not found: {configs.APP_DIR}")
|
||||
if not configs.AUT_PATH.exists():
|
||||
pytest.exit(f"Application not found: {configs.AUT_PATH}")
|
||||
return AUT(user_data=user_data)
|
||||
|
||||
yield _aut
|
||||
|
|
Loading…
Reference in New Issue