Skip to content

Commit

Permalink
Break up AP Windows tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pradyunsg committed Apr 9, 2020
1 parent 54c161a commit 43f65ae
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 17 deletions.
48 changes: 38 additions & 10 deletions .azure-pipelines/jobs/test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,59 @@ jobs:
vmImage: ${{ parameters.vmImage }}
strategy:
matrix:
"2.7-x86":
"2.7-x86 (1)":
python.version: '2.7'
python.architecture: x86
"2.7":
testGroup: 1
"2.7-x86 (2)":
python.version: '2.7'
python.architecture: x86
testGroup: 2
"2.7 (1)":
python.version: '2.7'
python.architecture: x64
testGroup: 1
"2.7 (2)":
python.version: '2.7'
python.architecture: x64
testGroup: 2
"3.5 (1)":
python.version: '3.5'
python.architecture: x64
"3.5":
testGroup: 1
"3.5 (2)":
python.version: '3.5'
python.architecture: x64
"3.6":
testGroup: 2
"3.6 (1)":
python.version: '3.6'
python.architecture: x64
"3.7":
testGroup: 1
"3.6 (2)":
python.version: '3.6'
python.architecture: x64
testGroup: 2
"3.7 (1)":
python.version: '3.7'
python.architecture: x64
testGroup: 1
"3.7 (2)":
python.version: '3.7'
python.architecture: x64
"3.8":
testGroup: 2
"3.8 (1)":
python.version: '3.8'
python.architecture: x64
testGroup: 1
"3.8 (2)":
python.version: '3.8'
python.architecture: x64
maxParallel: 6
testGroup: 2

steps:
- template: ../steps/run-tests-windows.yml
parameters:
runIntegrationTests: true
testGroup: $(testGroup)

- job: Test_Secondary
displayName: Tests / Windows /
Expand All @@ -56,9 +85,8 @@ jobs:
3.8-x86:
python.version: '3.8'
python.architecture: x86
maxParallel: 6

steps:
- template: ../steps/run-tests-windows.yml
parameters:
runIntegrationTests: false
testGroup: null
31 changes: 24 additions & 7 deletions .azure-pipelines/steps/run-tests-windows.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
parameters:
runIntegrationTests:
testGroup:

steps:
- displayName: Use Python $(python.version)
Expand Down Expand Up @@ -27,12 +27,14 @@ steps:
- displayName: Install Tox
bash: pip install --upgrade 'virtualenv<20' setuptools tox

- displayName: Run unit tests
script: tox -e py -- -m unit -n auto --junit-xml=junit/unit-test.xml
env:
TEMP: "R:\\Temp"
# Lots of fun logic, for... running the correct tests.
- ${{ if in(parameters.testGroup, null, 1) }}:
- displayName: Run unit tests
script: tox -e py -- -m unit -n auto --junit-xml=junit/unit-test.xml
env:
TEMP: "R:\\Temp"

- ${{ if eq(parameters.runIntegrationTests, 'true') }}:
- ${{ if eq(parameters.testGroup, 1) }}:
- displayName: Run integration tests
powershell: |
# Fix Git SSL errors
Expand All @@ -45,7 +47,22 @@ steps:
$env:TEMP = "R:\Temp"
pip install tox
tox -e py -- -m integration -n auto --duration=5 --junit-xml=junit/integration-test.xml
tox -e py -- -k "not test_install" -m integration -n auto --duration=5 --junit-xml=junit/integration-test.xml
- ${{ if eq(parameters.testGroup, 2) }}:
- displayName: Run integration tests
powershell: |
# Fix Git SSL errors
pip install certifi
python -m certifi > cacert.txt
$env:GIT_SSL_CAINFO = $(Get-Content cacert.txt)
# Shorten paths to get under MAX_PATH or else integration tests will fail
# https://bugs.python.org/issue18199
$env:TEMP = "R:\Temp"
pip install tox
tox -e py -- -k "not test_install" -m integration -n auto --duration=5 --junit-xml=junit/integration-test.xml
- displayName: Publish Test Results
task: PublishTestResults@2
Expand Down

0 comments on commit 43f65ae

Please sign in to comment.