Merge logic for farm tests

This commit is contained in:
Adrien Ferrand 2020-06-26 21:54:02 +02:00
parent d140408faf
commit 12dce1de22
2 changed files with 27 additions and 32 deletions

View file

@ -1,9 +1,11 @@
jobs:
- job: x_test
variables:
IMAGE_NAME: ubuntu-18.04
${{ if contains(variables['TOXENV'], 'integration') }}:
PYTEST_ADDOPTS: --numprocesses 4
- name: IMAGE_NAME
value: ubuntu-18.04
- group: certbot-common
- ${{ if contains(variables['TOXENV'], 'integration') }}:
PYTEST_ADDOPTS: --numprocesses 4
strategy:
matrix:
linux-py36:
@ -78,36 +80,19 @@ jobs:
TOXENV: le_auto_oraclelinux6
dev:
TOXENV: docker_dev
farmtest-apache2:
PYTHON_VERSION: 3.7
TOXENV: azure-test-farm-apache2
farmtest-leauto-upgrades:
PYTHON_VERSION: 3.7
TOXENV: azure-test-farm-leauto-upgrades
farmtest-certonly-standalone:
PYTHON_VERSION: 3.7
TOXENV: azure-test-farm-certonly-standalone
farmtest-sdists:
PYTHON_VERSION: 3.7
TOXENV: azure-test-farm-sdists
pool:
vmImage: $(IMAGE_NAME)
steps:
- template: ../steps/tox-steps.yml
- job: farm_test
variables:
- group: certbot-common
strategy:
matrix:
apache2:
TOXENV: azure-test-farm-apache2
leauto-upgrades:
TOXENV: azure-test-farm-leauto-upgrades
certonly-standalone:
TOXENV: azure-test-farm-certonly-standalone
sdists:
TOXENV: azure-test-farm-sdists
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: 3.7
addToPath: true
- bash: |
python tools/pip_install.py -I tox virtualenv
displayName: Install runtime dependencies
- task: DownloadSecureFile@1
name: testFarmPem
inputs:
secureFile: azure-test-farm.pem
- bash: |
ln -s $(testFarmPem.secureFilePath) azure-test-farm.pem
exit 0
displayName: Run tox

View file

@ -25,6 +25,14 @@ steps:
- bash: |
python tools/pip_install.py -I tox virtualenv
displayName: Install runtime dependencies
- task: DownloadSecureFile@1
name: testFarmPem
inputs:
secureFile: azure-test-farm.pem
condition: contains(variables['TOXENV'], 'test-farm')
- bash: |
ln -s $(testFarmPem.secureFilePath) azure-test-farm.pem
condition: contains(variables['TOXENV'], 'test-farm')
- bash: |
if [[ "${TOXENV}" == *"test-farm"* ]]; then
# To be removed once farm tests are configured on Azure
@ -33,6 +41,8 @@ steps:
if [[ "${TOXENV}" == *"oldest"* ]]; then
tools/run_oldest_tests.sh
elif command -v unbuffer >/dev/null 2>&1; then
# Call to unbuffer ensures that docker command can be run with
# -it while tox is not executed from an interactive console.
unbuffer -p python -m tox
else
python -m tox