Skip to content

Commit 865de8d

Browse files
authored
ci: combine go tests such that any test failure will report a failure for the entire task (#3156)
* add set ex to ci * add race and timeout args * remove race check
1 parent aa71111 commit 865de8d

File tree

2 files changed

+5
-14
lines changed

2 files changed

+5
-14
lines changed

.pipelines/templates/run-unit-tests.yaml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,10 @@ stages:
3737
pool:
3838
name: "$(BUILD_POOL_NAME_DEFAULT_WINDOWS_ALT)"
3939
steps:
40+
# Only run one go test per script
4041
- script: |
41-
cd npm/
42-
go test ./...
43-
cd ../cni/
44-
go test ./...
45-
cd ../platform/
46-
go test ./...
42+
cd azure-container-networking/
43+
go test -timeout 30m ./npm/... ./cni/... ./platform/...
4744
retryCountOnTaskFailure: 3
4845
name: "TestWindows"
4946
displayName: "Run Windows Tests"

.pipelines/templates/unit-tests.stages.yaml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,18 +48,12 @@ stages:
4848
type: windows
4949
name: "$(BUILD_POOL_NAME_DEFAULT_WINDOWS_ALT)"
5050
steps:
51-
# Test changes under review
51+
# Test changes under review; only run one go test per script
5252
- checkout: ACNReviewChanges
5353
clean: true
54-
5554
- script: |
5655
cd azure-container-networking/
57-
cd npm/
58-
go test ./...
59-
cd ../cni/
60-
go test ./...
61-
cd ../platform/
62-
go test ./...
56+
go test -timeout 30m ./npm/... ./cni/... ./platform/...
6357
retryCountOnTaskFailure: 3
6458
name: "TestWindows"
6559
displayName: "Run Windows Tests"

0 commit comments

Comments
 (0)