mirror of
https://github.com/status-im/desktop-qa-automation.git
synced 2025-02-23 01:28:16 +00:00
feat(ci): add LOG_LEVEL parameter for Jenkins jobs
Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
4276836191
commit
4471113123
8
ci/Jenkinsfile
vendored
8
ci/Jenkinsfile
vendored
@ -40,6 +40,11 @@ pipeline {
|
|||||||
description: 'Test run name in Test Rail.',
|
description: 'Test run name in Test Rail.',
|
||||||
defaultValue: ''
|
defaultValue: ''
|
||||||
)
|
)
|
||||||
|
choice(
|
||||||
|
name: 'LOG_LEVEL',
|
||||||
|
description: 'Log level for pytest.',
|
||||||
|
choices: ['INFO', 'DEBUG', 'TRACE', 'WARNING', 'CRITICAL']
|
||||||
|
)
|
||||||
/* FIXME: This is temporary and should be removed. */
|
/* FIXME: This is temporary and should be removed. */
|
||||||
choice(
|
choice(
|
||||||
name: 'AGENT',
|
name: 'AGENT',
|
||||||
@ -129,8 +134,9 @@ pipeline {
|
|||||||
stage('Test') {
|
stage('Test') {
|
||||||
steps { timeout(90) { script {
|
steps { timeout(90) { script {
|
||||||
def flags = []
|
def flags = []
|
||||||
if (params.TEST_NAME) { flags.add("-k=${params.TEST_NAME}") }
|
if (params.TEST_NAME) { flags.add("-k=${params.TEST_NAME}") }
|
||||||
if (params.TEST_SCOPE) { flags.add("-m=${params.TEST_SCOPE}") }
|
if (params.TEST_SCOPE) { flags.add("-m=${params.TEST_SCOPE}") }
|
||||||
|
if (params.LOG_LEVEL) { flags.addAll(["--log-level=${params.LOG_LEVEL}", "--log-cli-level=${params.LOG_LEVEL}"]) }
|
||||||
dir ('configs') { sh 'ln -s _local.ci.py _local.py' }
|
dir ('configs') { sh 'ln -s _local.ci.py _local.py' }
|
||||||
wrap([
|
wrap([
|
||||||
$class: 'Xvfb',
|
$class: 'Xvfb',
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import logging
|
|
||||||
import os
|
import os
|
||||||
|
import logging
|
||||||
|
|
||||||
LOG_LEVEL = logging.INFO
|
LOG_LEVEL = logging.getLevelName(os.getenv('LOG_LEVEL', 'INFO'))
|
||||||
UPDATE_VP_ON_FAIL = False
|
UPDATE_VP_ON_FAIL = False
|
||||||
DEV_BUILD = False
|
DEV_BUILD = False
|
||||||
AUT_PATH = os.getenv('AUT_PATH')
|
AUT_PATH = os.getenv('AUT_PATH')
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
[pytest]
|
[pytest]
|
||||||
log_level = DEBUG
|
log_level = INFO
|
||||||
log_format = %(asctime)s.%(msecs)03d %(levelname)7s %(name)s %(message).5000s
|
log_format = %(asctime)s.%(msecs)03d %(levelname)7s %(name)s %(message).5000s
|
||||||
log_cli = true
|
log_cli = true
|
||||||
log_cli_level = DEBUG
|
log_cli_level = INFO
|
||||||
log_cli_format = %(asctime)s.%(msecs)03d %(levelname)7s CLI %(name)s %(message).5000s
|
log_cli_format = %(asctime)s.%(msecs)03d %(levelname)7s CLI %(name)s %(message).5000s
|
||||||
|
|
||||||
addopts = --disable-warnings -p no:logging
|
addopts = --disable-warnings -p no:logging
|
||||||
|
Loading…
x
Reference in New Issue
Block a user