11parameters :
22 coverage : false
3+ sudo_dependencies : sudo
4+ dependencies : apt
5+ patchcheck : true
6+ xvfb : true
37
48steps :
59- checkout : self
610 clean : true
711 fetchDepth : 5
812
9- - script : ./.azure-pipelines/posix-deps.sh $(openssl_version)
13+ # Work around a known issue affecting Ubuntu VMs on Pipelines
14+ - script : sudo setfacl -Rb /home/vsts
15+ displayName : ' Workaround ACL issue'
16+
17+ - script : ${{ parameters.sudo_dependencies }} ./.azure-pipelines/posix-deps-${{ parameters.dependencies }}.sh $(openssl_version)
1018 displayName : ' Install dependencies'
1119
1220- script : ./configure --with-pydebug
2331 displayName : ' Display build info'
2432
2533 - script : |
26- xvfb-run ./venv/bin/python -m coverage run --pylib -m test \
34+ $COMMAND -m coverage run --pylib -m test \
2735 --fail-env-changed \
2836 -uall,-cpu \
2937 --junit-xml=$(build.binariesDirectory)/test-results.xml \
@@ -32,6 +40,11 @@ steps:
3240 -x test_multiprocessing_spawn \
3341 -x test_concurrent_futures
3442 displayName: 'Tests with coverage'
43+ env:
44+ ${{ if eq(parameters.xvfb, 'true') }}:
45+ COMMAND: xvfb-run ./venv/bin/python
46+ ${{ if ne(parameters.xvfb, 'true') }}:
47+ COMMAND: ./venv/bin/python
3548
3649 - script : ./venv/bin/python -m coverage xml
3750 displayName : ' Generate coverage.xml'
@@ -44,13 +57,18 @@ steps:
4457 - script : make pythoninfo
4558 displayName : ' Display build info'
4659
47- - script : xvfb-run make buildbottest TESTOPTS="-j4 -uall,-cpu --junit-xml=$(build.binariesDirectory)/test-results.xml"
60+ - script : $COMMAND buildbottest TESTOPTS="-j4 -uall,-cpu --junit-xml=$(build.binariesDirectory)/test-results.xml"
4861 displayName : ' Tests'
49-
50-
51- - script : ./python Tools/scripts/patchcheck.py --travis true
52- displayName : ' Run patchcheck.py'
53- condition : and(succeeded(), eq(variables['Build.Reason'], 'PullRequest'))
62+ env :
63+ ${{ if eq(parameters.xvfb, 'true') }} :
64+ COMMAND : xvfb-run make
65+ ${{ if ne(parameters.xvfb, 'true') }} :
66+ COMMAND : make
67+
68+ - ${{ if eq(parameters.patchcheck, 'true') }} :
69+ - script : ./python Tools/scripts/patchcheck.py --travis true
70+ displayName : ' Run patchcheck.py'
71+ condition : and(succeeded(), eq(variables['Build.Reason'], 'PullRequest'))
5472
5573
5674- task : PublishTestResults@2
0 commit comments