|
1 | 1 | stages: |
2 | | - - stage: test |
3 | | - displayName: Test ACN |
4 | | - dependsOn: |
5 | | - - setup |
6 | | - jobs: |
7 | | - - job: test |
8 | | - displayName: Run Tests |
9 | | - variables: |
10 | | - STORAGE_ID: $[ stagedependencies.setup.env.outputs['EnvironmentalVariables.StorageID'] ] |
11 | | - pool: |
12 | | - name: "$(BUILD_POOL_NAME_DEFAULT)" |
13 | | - os: linux |
14 | | - image: acn-runner-vmss-image-1es-v3.0 |
15 | | - steps: |
16 | | - - task: GoTool@0 |
17 | | - inputs: |
18 | | - version: $(GO_VERSION) |
| 2 | +- stage: test |
| 3 | + displayName: Test ACN |
| 4 | + dependsOn: |
| 5 | + - setup |
| 6 | + jobs: |
| 7 | + - job: test |
| 8 | + displayName: Run Tests |
| 9 | + variables: |
| 10 | + STORAGE_ID: $[ stagedependencies.setup.env.outputs['EnvironmentalVariables.StorageID'] ] |
| 11 | + pool: |
| 12 | + name: "$(BUILD_POOL_NAME_DEFAULT)" |
| 13 | + os: linux |
| 14 | + image: acn-runner-vmss-image-1es-v3.0 |
| 15 | + steps: |
| 16 | + - task: GoTool@0 |
| 17 | + inputs: |
| 18 | + version: $(GO_VERSION) |
19 | 19 |
|
20 | | - - script: | |
21 | | - make tools |
22 | | - # run test, echo exit status code to fd 3, pipe output from test to tee, which splits output to stdout and go-junit-report (which converts test output to report.xml), stdout from tee is redirected to fd 4. Take output written to fd 3 (which is the exit code of test), redirect to stdout, pipe to read from stdout then exit with that status code. Read all output from fd 4 (output from tee) and write to top stdout |
23 | | - { { { { |
24 | | - sudo -E env "PATH=$PATH" make test-all; |
25 | | - echo $? >&3; |
26 | | - } | tee >(build/tools/bin/go-junit-report > report.xml) >&4; |
27 | | - } 3>&1; |
28 | | - } | { read xs; exit $xs; } |
29 | | - } 4>&1 |
30 | | - retryCountOnTaskFailure: 3 |
31 | | - name: "Test" |
32 | | - displayName: "Run Tests" |
| 20 | + - script: | |
| 21 | + make tools |
| 22 | + # run test, echo exit status code to fd 3, pipe output from test to tee, which splits output to stdout and go-junit-report (which converts test output to report.xml), stdout from tee is redirected to fd 4. Take output written to fd 3 (which is the exit code of test), redirect to stdout, pipe to read from stdout then exit with that status code. Read all output from fd 4 (output from tee) and write to top stdout |
| 23 | + { { { { |
| 24 | + sudo -E env "PATH=$PATH" make test-all; |
| 25 | + echo $? >&3; |
| 26 | + } | tee >(build/tools/bin/go-junit-report > report.xml) >&4; |
| 27 | + } 3>&1; |
| 28 | + } | { read xs; exit $xs; } |
| 29 | + } 4>&1 |
| 30 | + retryCountOnTaskFailure: 3 |
| 31 | + name: "Test" |
| 32 | + displayName: "Run Tests" |
33 | 33 |
|
34 | | - - stage: test_windows |
35 | | - displayName: Test ACN Windows |
36 | | - dependsOn: |
37 | | - - setup |
38 | | - jobs: |
39 | | - - job: test |
40 | | - displayName: Run Tests |
41 | | - variables: |
42 | | - STORAGE_ID: $[ stagedependencies.setup.env.outputs['EnvironmentalVariables.StorageID'] ] |
43 | | - pool: |
44 | | - name: "$(BUILD_POOL_NAME_DEFAULT_WINDOWS)" |
45 | | - os: windows |
46 | | - image: acn-runner-vmss-image-windows-1es-v2.0 |
47 | | - steps: |
48 | | - - task: GoTool@0 |
49 | | - inputs: |
50 | | - version: $(GO_VERSION) |
| 34 | +- stage: test_windows |
| 35 | + displayName: Test ACN Windows |
| 36 | + dependsOn: |
| 37 | + - setup |
| 38 | + jobs: |
| 39 | + - job: test |
| 40 | + displayName: Run Tests |
| 41 | + variables: |
| 42 | + STORAGE_ID: $[ stagedependencies.setup.env.outputs['EnvironmentalVariables.StorageID'] ] |
| 43 | + pool: |
| 44 | + name: "$(BUILD_POOL_NAME_DEFAULT_WINDOWS)" |
| 45 | + os: windows |
| 46 | + image: acn-runner-vmss-image-windows-1es-v2.0 |
| 47 | + steps: |
| 48 | + - task: GoTool@0 |
| 49 | + inputs: |
| 50 | + version: $(GO_VERSION) |
51 | 51 |
|
52 | | - - script: | |
53 | | - cd npm/ |
54 | | - go test ./... |
55 | | - cd ../cni/ |
56 | | - go test ./... |
57 | | - cd ../platform/ |
58 | | - go test ./... |
59 | | - retryCountOnTaskFailure: 3 |
60 | | - name: "TestWindows" |
61 | | - displayName: "Run Windows Tests" |
| 52 | + - script: | |
| 53 | + cd npm/ |
| 54 | + go test ./... |
| 55 | + cd ../cni/ |
| 56 | + go test ./... |
| 57 | + cd ../platform/ |
| 58 | + go test ./... |
| 59 | + retryCountOnTaskFailure: 3 |
| 60 | + name: "TestWindows" |
| 61 | + displayName: "Run Windows Tests" |
62 | 62 |
|
0 commit comments