2018-09-24 11:44:50 +00:00
|
|
|
parameters:
|
|
|
|
coverage: false
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- checkout: self
|
|
|
|
clean: true
|
|
|
|
fetchDepth: 5
|
|
|
|
|
|
|
|
- script: ./.azure-pipelines/posix-deps.sh $(openssl_version)
|
|
|
|
displayName: 'Install dependencies'
|
|
|
|
|
|
|
|
- script: ./configure --with-pydebug
|
|
|
|
displayName: 'Configure CPython (debug)'
|
|
|
|
|
|
|
|
- script: make -s -j4
|
|
|
|
displayName: 'Build CPython'
|
|
|
|
|
|
|
|
- ${{ if eq(parameters.coverage, 'true') }}:
|
|
|
|
- script: ./python -m venv venv && ./venv/bin/python -m pip install -U coverage
|
|
|
|
displayName: 'Set up virtual environment'
|
|
|
|
|
|
|
|
- script: ./venv/bin/python -m test.pythoninfo
|
|
|
|
displayName: 'Display build info'
|
|
|
|
|
|
|
|
- script: |
|
|
|
|
xvfb-run ./venv/bin/python -m coverage run --pylib -m test \
|
|
|
|
--fail-env-changed \
|
|
|
|
-uall,-cpu \
|
2019-01-08 02:02:26 +00:00
|
|
|
--junit-xml=$(build.binariesDirectory)/test-results.xml \
|
2018-09-24 11:44:50 +00:00
|
|
|
-x test_multiprocessing_fork \
|
|
|
|
-x test_multiprocessing_forkserver \
|
|
|
|
-x test_multiprocessing_spawn \
|
|
|
|
-x test_concurrent_futures
|
|
|
|
displayName: 'Tests with coverage'
|
|
|
|
|
|
|
|
- script: ./venv/bin/python -m coverage xml
|
|
|
|
displayName: 'Generate coverage.xml'
|
|
|
|
|
|
|
|
- script: source ./venv/bin/activate && bash <(curl -s https://codecov.io/bash)
|
|
|
|
displayName: 'Publish code coverage results'
|
|
|
|
|
|
|
|
|
|
|
|
- ${{ if ne(parameters.coverage, 'true') }}:
|
|
|
|
- script: make pythoninfo
|
|
|
|
displayName: 'Display build info'
|
|
|
|
|
|
|
|
- script: xvfb-run make buildbottest TESTOPTS="-j4 -uall,-cpu --junit-xml=$(build.binariesDirectory)/test-results.xml"
|
|
|
|
displayName: 'Tests'
|
|
|
|
|
|
|
|
|
2018-09-24 13:03:02 +00:00
|
|
|
- script: ./python Tools/scripts/patchcheck.py --travis true
|
2018-09-24 11:44:50 +00:00
|
|
|
displayName: 'Run patchcheck.py'
|
|
|
|
condition: and(succeeded(), eq(variables['Build.Reason'], 'PullRequest'))
|
|
|
|
|
|
|
|
|
|
|
|
- task: PublishTestResults@2
|
|
|
|
displayName: 'Publish Test Results'
|
|
|
|
inputs:
|
|
|
|
testResultsFiles: '$(build.binariesDirectory)/test-results.xml'
|
|
|
|
mergeTestResults: true
|
|
|
|
testRunTitle: $(testRunTitle)
|
|
|
|
platform: $(testRunPlatform)
|
|
|
|
condition: succeededOrFailed()
|