Steve Dower | 5767509 | 2018-09-24 07:44:50 -0400 | [diff] [blame] | 1 | parameters: |
| 2 | coverage: false |
| 3 | |
| 4 | steps: |
| 5 | - checkout: self |
| 6 | clean: true |
| 7 | fetchDepth: 5 |
| 8 | |
| 9 | - script: ./.azure-pipelines/posix-deps.sh $(openssl_version) |
| 10 | displayName: 'Install dependencies' |
| 11 | |
| 12 | - script: ./configure --with-pydebug |
| 13 | displayName: 'Configure CPython (debug)' |
| 14 | |
| 15 | - script: make -s -j4 |
| 16 | displayName: 'Build CPython' |
| 17 | |
| 18 | - ${{ if eq(parameters.coverage, 'true') }}: |
| 19 | - script: ./python -m venv venv && ./venv/bin/python -m pip install -U coverage |
| 20 | displayName: 'Set up virtual environment' |
| 21 | |
| 22 | - script: ./venv/bin/python -m test.pythoninfo |
| 23 | displayName: 'Display build info' |
| 24 | |
| 25 | - script: | |
| 26 | xvfb-run ./venv/bin/python -m coverage run --pylib -m test \ |
| 27 | --fail-env-changed \ |
| 28 | -uall,-cpu \ |
Pierre Glaser | 202d1bd | 2019-01-08 03:02:26 +0100 | [diff] [blame^] | 29 | --junit-xml=$(build.binariesDirectory)/test-results.xml \ |
Steve Dower | 5767509 | 2018-09-24 07:44:50 -0400 | [diff] [blame] | 30 | -x test_multiprocessing_fork \ |
| 31 | -x test_multiprocessing_forkserver \ |
| 32 | -x test_multiprocessing_spawn \ |
| 33 | -x test_concurrent_futures |
| 34 | displayName: 'Tests with coverage' |
| 35 | |
| 36 | - script: ./venv/bin/python -m coverage xml |
| 37 | displayName: 'Generate coverage.xml' |
| 38 | |
| 39 | - script: source ./venv/bin/activate && bash <(curl -s https://codecov.io/bash) |
| 40 | displayName: 'Publish code coverage results' |
| 41 | |
| 42 | |
| 43 | - ${{ if ne(parameters.coverage, 'true') }}: |
| 44 | - script: make pythoninfo |
| 45 | displayName: 'Display build info' |
| 46 | |
| 47 | - script: xvfb-run make buildbottest TESTOPTS="-j4 -uall,-cpu --junit-xml=$(build.binariesDirectory)/test-results.xml" |
| 48 | displayName: 'Tests' |
| 49 | |
| 50 | |
Steve Dower | 1b77f92 | 2018-09-24 09:03:02 -0400 | [diff] [blame] | 51 | - script: ./python Tools/scripts/patchcheck.py --travis true |
Steve Dower | 5767509 | 2018-09-24 07:44:50 -0400 | [diff] [blame] | 52 | displayName: 'Run patchcheck.py' |
| 53 | condition: and(succeeded(), eq(variables['Build.Reason'], 'PullRequest')) |
| 54 | |
| 55 | |
| 56 | - task: PublishTestResults@2 |
| 57 | displayName: 'Publish Test Results' |
| 58 | inputs: |
| 59 | testResultsFiles: '$(build.binariesDirectory)/test-results.xml' |
| 60 | mergeTestResults: true |
| 61 | testRunTitle: $(testRunTitle) |
| 62 | platform: $(testRunPlatform) |
| 63 | condition: succeededOrFailed() |