From ccdfb9294fe37ff412cace1563dacad4a4e334b4 Mon Sep 17 00:00:00 2001 From: QxBytes Date: Fri, 15 Nov 2024 16:48:16 -0800 Subject: [PATCH 1/3] add set ex to ci --- .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..3bd372b633 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: + # Test changes under review; 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 ./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..a0ad610911 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 ./npm/... ./cni/... ./platform/... retryCountOnTaskFailure: 3 name: "TestWindows" displayName: "Run Windows Tests" From c694bf0036c5797c6ef0cdf0a72620b48b102c8b Mon Sep 17 00:00:00 2001 From: QxBytes Date: Tue, 19 Nov 2024 10:07:12 -0800 Subject: [PATCH 2/3] add race and timeout args --- .pipelines/templates/run-unit-tests.yaml | 5 +++-- .pipelines/templates/unit-tests.stages.yaml | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.pipelines/templates/run-unit-tests.yaml b/.pipelines/templates/run-unit-tests.yaml index 3bd372b633..2e48ce7f31 100644 --- a/.pipelines/templates/run-unit-tests.yaml +++ b/.pipelines/templates/run-unit-tests.yaml @@ -37,10 +37,11 @@ stages: pool: name: "$(BUILD_POOL_NAME_DEFAULT_WINDOWS_ALT)" steps: - # Test changes under review; only run one go test per script + # Only run one go test per script - script: | + set CGO_ENABLED=1 cd azure-container-networking/ - go test ./npm/... ./cni/... ./platform/... + go test -race -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 a0ad610911..e488827951 100644 --- a/.pipelines/templates/unit-tests.stages.yaml +++ b/.pipelines/templates/unit-tests.stages.yaml @@ -52,8 +52,9 @@ stages: - checkout: ACNReviewChanges clean: true - script: | + set CGO_ENABLED=1 cd azure-container-networking/ - go test ./npm/... ./cni/... ./platform/... + go test -race -timeout 30m ./npm/... ./cni/... ./platform/... retryCountOnTaskFailure: 3 name: "TestWindows" displayName: "Run Windows Tests" From 35d4e37cd06798ee9bd36a70c63c95b2440b83d0 Mon Sep 17 00:00:00 2001 From: QxBytes Date: Tue, 19 Nov 2024 14:21:36 -0800 Subject: [PATCH 3/3] remove race check --- .pipelines/templates/run-unit-tests.yaml | 3 +-- .pipelines/templates/unit-tests.stages.yaml | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.pipelines/templates/run-unit-tests.yaml b/.pipelines/templates/run-unit-tests.yaml index 2e48ce7f31..3d8f18e7a3 100644 --- a/.pipelines/templates/run-unit-tests.yaml +++ b/.pipelines/templates/run-unit-tests.yaml @@ -39,9 +39,8 @@ stages: steps: # Only run one go test per script - script: | - set CGO_ENABLED=1 cd azure-container-networking/ - go test -race -timeout 30m ./npm/... ./cni/... ./platform/... + 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 e488827951..8ca81d06c9 100644 --- a/.pipelines/templates/unit-tests.stages.yaml +++ b/.pipelines/templates/unit-tests.stages.yaml @@ -52,9 +52,8 @@ stages: - checkout: ACNReviewChanges clean: true - script: | - set CGO_ENABLED=1 cd azure-container-networking/ - go test -race -timeout 30m ./npm/... ./cni/... ./platform/... + go test -timeout 30m ./npm/... ./cni/... ./platform/... retryCountOnTaskFailure: 3 name: "TestWindows" displayName: "Run Windows Tests"