Skip to content

Commit b45cea9

Browse files
authored
Refine test job definition and assert logic (sonic-net#14958)
Why I did it Remove 'kvmtest-t0' and 'kvmtest-t1-lag' test jobs since all the test jobs are required (continueOnError: false) already, and will only enable one of classical and testbedV2 tests, no need to do an unnecessary 'or' compute test job. Change classic multi-asic and t0-sonic test jobs as required (continueOnError: false) following current testbedV2's logic.
1 parent 73914e7 commit b45cea9

File tree

1 file changed

+2
-57
lines changed

1 file changed

+2
-57
lines changed

azure-pipelines.yml

+2-57
Original file line numberDiff line numberDiff line change
@@ -203,39 +203,6 @@ stages:
203203
MAX_WORKER: $(T0_2VLANS_INSTANCE_NUM)
204204
DEPLOY_MG_EXTRA_PARAMS: "-e vlan_config=two_vlan_a"
205205

206-
- job:
207-
pool:
208-
vmImage: 'ubuntu-20.04'
209-
displayName: "kvmtest-t0"
210-
dependsOn:
211-
- t0_part1
212-
- t0_part2
213-
- t0_testbedv2
214-
- t0_2vlans_testbedv2
215-
condition: always()
216-
continueOnError: false
217-
variables:
218-
resultOfPart1: $[ dependencies.t0_part1.result ]
219-
resultOfPart2: $[ dependencies.t0_part2.result ]
220-
resultOfT0TestbedV2: $[ dependencies.t0_testbedv2.result ]
221-
resultOfT02VlansTestbedV2: $[ dependencies.t0_2vlans_testbedv2.result ]
222-
223-
steps:
224-
- script: |
225-
if [ $(resultOfT0TestbedV2) == "Succeeded" ] && [ $(resultOfT02VlansTestbedV2) == "Succeeded" ]; then
226-
echo "TestbedV2 t0 passed."
227-
exit 0
228-
fi
229-
230-
if [ $(resultOfPart1) == "Succeeded" ] && [ $(resultOfPart2) == "Succeeded" ]; then
231-
echo "Classic t0 jobs(both part1 and part2) passed."
232-
exit 0
233-
fi
234-
235-
echo "Both classic and TestbedV2 t0 jobs failed! Please check the detailed information. (Any of them passed, t0 will be considered as passed)"
236-
exit 1
237-
238-
239206
- job: t1_lag_classic
240207
pool: sonictest-t1-lag
241208
displayName: "kvmtest-t1-lag classic"
@@ -264,34 +231,12 @@ stages:
264231
MIN_WORKER: $(T1_LAG_INSTANCE_NUM)
265232
MAX_WORKER: $(T1_LAG_INSTANCE_NUM)
266233

267-
- job:
268-
pool:
269-
vmImage: 'ubuntu-20.04'
270-
displayName: "kvmtest-t1-lag"
271-
dependsOn:
272-
- t1_lag_classic
273-
- t1_lag_testbedv2
274-
condition: always()
275-
continueOnError: false
276-
variables:
277-
resultOfClassic: $[ dependencies.t1_lag_classic.result ]
278-
resultOfTestbedV2: $[ dependencies.t1_lag_testbedv2.result ]
279-
steps:
280-
- script: |
281-
if [ $(resultOfClassic) == "Succeeded" ] || [ $(resultOfTestbedV2) == "Succeeded" ]; then
282-
echo "One or both of t1_lag_classic and t1_lag_testbedv2 passed."
283-
exit 0
284-
else
285-
echo "Both t1_lag_classic and t1_lag_testbedv2 failed! Please check the detailed information."
286-
exit 1
287-
fi
288-
289234
- job:
290235
pool: sonictest-sonic-t0
291236
displayName: "kvmtest-t0-sonic"
292237
timeoutInMinutes: 360
293238
condition: and(succeeded(), eq(variables.BUILD_IMG_RUN_CLASSICAL_TEST, 'YES'))
294-
continueOnError: true
239+
continueOnError: false
295240
steps:
296241
- template: .azure-pipelines/run-test-template.yml
297242
parameters:
@@ -306,7 +251,7 @@ stages:
306251
displayName: "kvmtest-multi-asic-t1-lag"
307252
timeoutInMinutes: 240
308253
condition: and(succeeded(), eq(variables.BUILD_IMG_RUN_CLASSICAL_TEST, 'YES'))
309-
continueOnError: true
254+
continueOnError: false
310255
steps:
311256
- template: .azure-pipelines/run-test-template.yml
312257
parameters:

0 commit comments

Comments
 (0)