diff --git a/Jenkinsfile b/Jenkinsfile index ded3b730cb4..1d6d8e8b7db 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -38,6 +38,7 @@ pipeline { JOB_GCS_CREDENTIALS = 'beats-ci-gcs-plugin' XPACK_MODULE_PATTERN = '^x-pack\\/[a-z0-9]+beat\\/module\\/([^\\/]+)\\/.*' OSS_MODULE_PATTERN = '^[a-z0-9]+beat\\/module\\/([^\\/]+)\\/.*' + PYTEST_ADDOPTS = "${params.PYTEST_ADDOPTS}" } options { timeout(time: 2, unit: 'HOURS') @@ -61,6 +62,7 @@ pipeline { string(name: 'awsRegion', defaultValue: 'eu-central-1', description: 'Default AWS region to use for testing.') booleanParam(name: 'debug', defaultValue: false, description: 'Allow debug logging for Jenkins steps') booleanParam(name: 'dry_run', defaultValue: false, description: 'Skip build steps, it is for testing pipeline flow') + string(name: 'PYTEST_ADDOPTS', defaultValue: '', description: 'Additional options to pass to pytest. Use PYTEST_ADDOPTS="-k pattern" to only run tests matching the specified pattern. For retries you can use `--reruns 3 --reruns-delay 15`') } stages { /** diff --git a/libbeat/tests/system/requirements.txt b/libbeat/tests/system/requirements.txt index 00eff11c5d9..3157a97925b 100644 --- a/libbeat/tests/system/requirements.txt +++ b/libbeat/tests/system/requirements.txt @@ -32,6 +32,7 @@ pyparsing==2.4.7 pyrsistent==0.16.0 pytest==6.0.1 pytest-timeout==1.3.4 +pytest-rerunfailures==9.0 PyYAML==5.3.1 redis==2.10.6 requests==2.20.0