From de739fee39107494338f13ea51be4d2c1b717665 Mon Sep 17 00:00:00 2001 From: Alexander <39818795+QxBytes@users.noreply.github.com> Date: Wed, 22 Jan 2025 09:55:18 -0800 Subject: [PATCH] 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 --- .pipelines/templates/run-unit-tests.yaml | 9 +++------ .pipelines/templates/unit-tests.stages.yaml | 10 ++-------- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/.pipelines/templates/run-unit-tests.yaml b/.pipelines/templates/run-unit-tests.yaml index cedcae057d..3d8f18e7a3 100644 --- a/.pipelines/templates/run-unit-tests.yaml +++ b/.pipelines/templates/run-unit-tests.yaml @@ -37,13 +37,10 @@ stages: pool: name: "$(BUILD_POOL_NAME_DEFAULT_WINDOWS_ALT)" steps: + # Only run one go test per script - script: | - cd npm/ - go test ./... - cd ../cni/ - go test ./... - cd ../platform/ - go test ./... + cd azure-container-networking/ + go test -timeout 30m ./npm/... ./cni/... ./platform/... retryCountOnTaskFailure: 3 name: "TestWindows" displayName: "Run Windows Tests" diff --git a/.pipelines/templates/unit-tests.stages.yaml b/.pipelines/templates/unit-tests.stages.yaml index 204cde4c2e..8ca81d06c9 100644 --- a/.pipelines/templates/unit-tests.stages.yaml +++ b/.pipelines/templates/unit-tests.stages.yaml @@ -48,18 +48,12 @@ stages: type: windows name: "$(BUILD_POOL_NAME_DEFAULT_WINDOWS_ALT)" steps: - # Test changes under review + # Test changes under review; only run one go test per script - checkout: ACNReviewChanges clean: true - - script: | cd azure-container-networking/ - cd npm/ - go test ./... - cd ../cni/ - go test ./... - cd ../platform/ - go test ./... + go test -timeout 30m ./npm/... ./cni/... ./platform/... retryCountOnTaskFailure: 3 name: "TestWindows" displayName: "Run Windows Tests"