summaryrefslogtreecommitdiffstats
path: root/.azure-pipelines/posix-steps.yml
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@microsoft.com>2019-01-22 18:49:52 (GMT)
committerGitHub <noreply@github.com>2019-01-22 18:49:52 (GMT)
commit28f6cb34f602b9796987904a607dceaf2e4a9e78 (patch)
tree82f000e6147a550cd4b803c19ffada03c5978a86 /.azure-pipelines/posix-steps.yml
parentbf4ac2d2fd520c61306b2676db488adab9b5d8c5 (diff)
downloadcpython-28f6cb34f602b9796987904a607dceaf2e4a9e78.zip
cpython-28f6cb34f602b9796987904a607dceaf2e4a9e78.tar.gz
cpython-28f6cb34f602b9796987904a607dceaf2e4a9e78.tar.bz2
bpo-35683: Improve Azure Pipelines steps (GH-11493)
Diffstat (limited to '.azure-pipelines/posix-steps.yml')
-rw-r--r--.azure-pipelines/posix-steps.yml30
1 files changed, 22 insertions, 8 deletions
diff --git a/.azure-pipelines/posix-steps.yml b/.azure-pipelines/posix-steps.yml
index 6e2606f..2affb50 100644
--- a/.azure-pipelines/posix-steps.yml
+++ b/.azure-pipelines/posix-steps.yml
@@ -1,12 +1,16 @@
parameters:
coverage: false
+ sudo_dependencies: sudo
+ dependencies: apt
+ patchcheck: true
+ xvfb: true
steps:
- checkout: self
clean: true
fetchDepth: 5
-- script: ./.azure-pipelines/posix-deps.sh $(openssl_version)
+- script: ${{ parameters.sudo_dependencies }} ./.azure-pipelines/posix-deps-${{ parameters.dependencies }}.sh $(openssl_version)
displayName: 'Install dependencies'
- script: ./configure --with-pydebug
@@ -23,7 +27,7 @@ steps:
displayName: 'Display build info'
- script: |
- xvfb-run ./venv/bin/python -m coverage run --pylib -m test \
+ $COMMAND -m coverage run --pylib -m test \
--fail-env-changed \
-uall,-cpu \
--junit-xml=$(build.binariesDirectory)/test-results.xml \
@@ -32,6 +36,11 @@ steps:
-x test_multiprocessing_spawn \
-x test_concurrent_futures
displayName: 'Tests with coverage'
+ env:
+ ${{ if eq(parameters.xvfb, 'true') }}:
+ COMMAND: xvfb-run ./venv/bin/python
+ ${{ if ne(parameters.xvfb, 'true') }}:
+ COMMAND: ./venv/bin/python
- script: ./venv/bin/python -m coverage xml
displayName: 'Generate coverage.xml'
@@ -44,13 +53,18 @@ steps:
- script: make pythoninfo
displayName: 'Display build info'
- - script: xvfb-run make buildbottest TESTOPTS="-j4 -uall,-cpu --junit-xml=$(build.binariesDirectory)/test-results.xml"
+ - script: $COMMAND buildbottest TESTOPTS="-j4 -uall,-cpu --junit-xml=$(build.binariesDirectory)/test-results.xml"
displayName: 'Tests'
-
-
-- script: ./python Tools/scripts/patchcheck.py --travis true
- displayName: 'Run patchcheck.py'
- condition: and(succeeded(), eq(variables['Build.Reason'], 'PullRequest'))
+ env:
+ ${{ if eq(parameters.xvfb, 'true') }}:
+ COMMAND: xvfb-run make
+ ${{ if ne(parameters.xvfb, 'true') }}:
+ COMMAND: make
+
+- ${{ if eq(parameters.patchcheck, 'true') }}:
+ - script: ./python Tools/scripts/patchcheck.py --travis true
+ displayName: 'Run patchcheck.py'
+ condition: and(succeeded(), eq(variables['Build.Reason'], 'PullRequest'))
- task: PublishTestResults@2