blob: 6e2606fff7bcbd2bd898afc5a90b57a091f2c6af [file] [log] [blame]
Steve Dower57675092018-09-24 07:44:50 -04001parameters:
2 coverage: false
3
4steps:
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 Glaser202d1bd2019-01-08 03:02:26 +010029 --junit-xml=$(build.binariesDirectory)/test-results.xml \
Steve Dower57675092018-09-24 07:44:50 -040030 -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 Dower1b77f922018-09-24 09:03:02 -040051- script: ./python Tools/scripts/patchcheck.py --travis true
Steve Dower57675092018-09-24 07:44:50 -040052 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()