Skip to content

Commit 43f65ae

Browse files
committed
Break up AP Windows tests
1 parent 54c161a commit 43f65ae

File tree

2 files changed

+62
-17
lines changed

2 files changed

+62
-17
lines changed

.azure-pipelines/jobs/test-windows.yml

Lines changed: 38 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,30 +9,59 @@ jobs:
99
vmImage: ${{ parameters.vmImage }}
1010
strategy:
1111
matrix:
12-
"2.7-x86":
12+
"2.7-x86 (1)":
1313
python.version: '2.7'
1414
python.architecture: x86
15-
"2.7":
15+
testGroup: 1
16+
"2.7-x86 (2)":
1617
python.version: '2.7'
18+
python.architecture: x86
19+
testGroup: 2
20+
"2.7 (1)":
21+
python.version: '2.7'
22+
python.architecture: x64
23+
testGroup: 1
24+
"2.7 (2)":
25+
python.version: '2.7'
26+
python.architecture: x64
27+
testGroup: 2
28+
"3.5 (1)":
29+
python.version: '3.5'
1730
python.architecture: x64
18-
"3.5":
31+
testGroup: 1
32+
"3.5 (2)":
1933
python.version: '3.5'
2034
python.architecture: x64
21-
"3.6":
35+
testGroup: 2
36+
"3.6 (1)":
2237
python.version: '3.6'
2338
python.architecture: x64
24-
"3.7":
39+
testGroup: 1
40+
"3.6 (2)":
41+
python.version: '3.6'
42+
python.architecture: x64
43+
testGroup: 2
44+
"3.7 (1)":
45+
python.version: '3.7'
46+
python.architecture: x64
47+
testGroup: 1
48+
"3.7 (2)":
2549
python.version: '3.7'
2650
python.architecture: x64
27-
"3.8":
51+
testGroup: 2
52+
"3.8 (1)":
53+
python.version: '3.8'
54+
python.architecture: x64
55+
testGroup: 1
56+
"3.8 (2)":
2857
python.version: '3.8'
2958
python.architecture: x64
30-
maxParallel: 6
59+
testGroup: 2
3160

3261
steps:
3362
- template: ../steps/run-tests-windows.yml
3463
parameters:
35-
runIntegrationTests: true
64+
testGroup: $(testGroup)
3665

3766
- job: Test_Secondary
3867
displayName: Tests / Windows /
@@ -56,9 +85,8 @@ jobs:
5685
3.8-x86:
5786
python.version: '3.8'
5887
python.architecture: x86
59-
maxParallel: 6
6088

6189
steps:
6290
- template: ../steps/run-tests-windows.yml
6391
parameters:
64-
runIntegrationTests: false
92+
testGroup: null

.azure-pipelines/steps/run-tests-windows.yml

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
parameters:
2-
runIntegrationTests:
2+
testGroup:
33

44
steps:
55
- displayName: Use Python $(python.version)
@@ -27,12 +27,14 @@ steps:
2727
- displayName: Install Tox
2828
bash: pip install --upgrade 'virtualenv<20' setuptools tox
2929

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

35-
- ${{ if eq(parameters.runIntegrationTests, 'true') }}:
37+
- ${{ if eq(parameters.testGroup, 1) }}:
3638
- displayName: Run integration tests
3739
powershell: |
3840
# Fix Git SSL errors
@@ -45,7 +47,22 @@ steps:
4547
$env:TEMP = "R:\Temp"
4648
4749
pip install tox
48-
tox -e py -- -m integration -n auto --duration=5 --junit-xml=junit/integration-test.xml
50+
tox -e py -- -k "not test_install" -m integration -n auto --duration=5 --junit-xml=junit/integration-test.xml
51+
52+
- ${{ if eq(parameters.testGroup, 2) }}:
53+
- displayName: Run integration tests
54+
powershell: |
55+
# Fix Git SSL errors
56+
pip install certifi
57+
python -m certifi > cacert.txt
58+
$env:GIT_SSL_CAINFO = $(Get-Content cacert.txt)
59+
60+
# Shorten paths to get under MAX_PATH or else integration tests will fail
61+
# https://bugs.python.org/issue18199
62+
$env:TEMP = "R:\Temp"
63+
64+
pip install tox
65+
tox -e py -- -k "not test_install" -m integration -n auto --duration=5 --junit-xml=junit/integration-test.xml
4966
5067
- displayName: Publish Test Results
5168
task: PublishTestResults@2

0 commit comments

Comments
 (0)