Refine test job definition and assert logic (#14960)
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 agent pool to reduce cost and avoid congestion Work item tracking Microsoft ADO (number only): 21199881
This commit is contained in:
parent
7ff5fdfcff
commit
83ee249e9f
@ -170,8 +170,7 @@ stages:
|
||||
section: part-2
|
||||
|
||||
- job: t0_testbedv2
|
||||
pool:
|
||||
vmImage: 'ubuntu-20.04'
|
||||
pool: ubuntu-20.04
|
||||
displayName: "kvmtest-t0 by TestbedV2"
|
||||
timeoutInMinutes: 240
|
||||
condition: and(succeeded(), eq(variables.BUILD_IMG_RUN_TESTBEDV2_TEST, 'YES'))
|
||||
@ -185,8 +184,7 @@ stages:
|
||||
MGMT_BRANCH: 202205
|
||||
|
||||
- job: t0_2vlans_testbedv2
|
||||
pool:
|
||||
vmImage: 'ubuntu-20.04'
|
||||
pool: ubuntu-20.04
|
||||
displayName: "kvmtest-t0-2vlans by TestbedV2"
|
||||
timeoutInMinutes: 240
|
||||
condition: and(succeeded(), eq(variables.BUILD_IMG_RUN_TESTBEDV2_TEST, 'YES'))
|
||||
@ -201,37 +199,6 @@ stages:
|
||||
DEPLOY_MG_EXTRA_PARAMS: "-e vlan_config=two_vlan_a"
|
||||
MGMT_BRANCH: 202205
|
||||
|
||||
- job:
|
||||
pool:
|
||||
vmImage: 'ubuntu-20.04'
|
||||
displayName: "kvmtest-t0"
|
||||
dependsOn:
|
||||
- t0_part1
|
||||
- t0_part2
|
||||
- t0_testbedv2
|
||||
- t0_2vlans_testbedv2
|
||||
condition: always()
|
||||
variables:
|
||||
resultOfPart1: $[ dependencies.t0_part1.result ]
|
||||
resultOfPart2: $[ dependencies.t0_part2.result ]
|
||||
resultOfT0TestbedV2: $[ dependencies.t0_testbedv2.result ]
|
||||
resultOfT02VlansTestbedV2: $[ dependencies.t0_2vlans_testbedv2.result ]
|
||||
|
||||
steps:
|
||||
- script: |
|
||||
if [ $(resultOfT0TestbedV2) == "Succeeded" ] && [ $(resultOfT02VlansTestbedV2) == "Succeeded" ]; then
|
||||
echo "TestbedV2 t0 passed."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ $(resultOfPart1) == "Succeeded" ] && [ $(resultOfPart2) == "Succeeded" ]; then
|
||||
echo "Classic t0 jobs(both part1 and part2) passed."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "Both classic and TestbedV2 t0 jobs failed! Please check the detailed information. (Any of them passed, t0 will be considered as passed)"
|
||||
exit 1
|
||||
|
||||
- job: t1_lag_classic
|
||||
pool: sonictest-t1-lag
|
||||
displayName: "kvmtest-t1-lag classic"
|
||||
@ -247,8 +214,7 @@ stages:
|
||||
tbtype: t1-lag
|
||||
|
||||
- job: t1_lag_testbedv2
|
||||
pool:
|
||||
vmImage: 'ubuntu-20.04'
|
||||
pool: ubuntu-20.04
|
||||
displayName: "kvmtest-t1-lag by TestbedV2"
|
||||
timeoutInMinutes: 240
|
||||
condition: and(succeeded(), eq(variables.BUILD_IMG_RUN_TESTBEDV2_TEST, 'YES'))
|
||||
@ -261,39 +227,12 @@ stages:
|
||||
MAX_WORKER: $(T1_LAG_INSTANCE_NUM)
|
||||
MGMT_BRANCH: 202205
|
||||
|
||||
- job:
|
||||
pool:
|
||||
vmImage: 'ubuntu-20.04'
|
||||
displayName: "kvmtest-t1-lag"
|
||||
dependsOn:
|
||||
- t1_lag_classic
|
||||
- t1_lag_testbedv2
|
||||
condition: always()
|
||||
continueOnError: false
|
||||
variables:
|
||||
resultOfClassic: $[ dependencies.t1_lag_classic.result ]
|
||||
resultOfTestbedV2: $[ dependencies.t1_lag_testbedv2.result ]
|
||||
steps:
|
||||
- script: |
|
||||
if [ $(resultOfTestbedV2) == "Succeeded" ]; then
|
||||
echo "TestbedV2 t1-lag passed."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ $(resultOfClassic) == "Succeeded" ]; then
|
||||
echo "Classic t1-lag passed."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "Both classic and TestbedV2 t1-lag jobs failed! Please check the detailed information. (Any of them passed, t1-lag will be considered as passed)"
|
||||
exit 1
|
||||
|
||||
- job:
|
||||
pool: sonictest-sonic-t0
|
||||
displayName: "kvmtest-t0-sonic"
|
||||
timeoutInMinutes: 360
|
||||
condition: and(succeeded(), eq(variables.BUILD_IMG_RUN_CLASSICAL_TEST, 'YES'))
|
||||
|
||||
continueOnError: false
|
||||
steps:
|
||||
- template: .azure-pipelines/run-test-template.yml
|
||||
parameters:
|
||||
@ -304,9 +243,8 @@ stages:
|
||||
vmtype: vsonic
|
||||
|
||||
- job: sonic_t0_testbedv2
|
||||
pool: ubuntu-20.04
|
||||
displayName: "kvmtest-t0-sonic by TestbedV2"
|
||||
pool:
|
||||
vmImage: 'ubuntu-20.04'
|
||||
timeoutInMinutes: 240
|
||||
condition: and(succeeded(), eq(variables.BUILD_IMG_RUN_TESTBEDV2_TEST, 'YES'))
|
||||
continueOnError: false
|
||||
@ -323,8 +261,7 @@ stages:
|
||||
MGMT_BRANCH: 202205
|
||||
|
||||
- job: dualtor_testbedv2
|
||||
pool:
|
||||
vmImage: 'ubuntu-20.04'
|
||||
pool: ubuntu-20.04
|
||||
displayName: "kvmtest-dualtor-t0 by TestbedV2"
|
||||
timeoutInMinutes: 240
|
||||
condition: and(succeeded(), eq(variables.BUILD_IMG_RUN_TESTBEDV2_TEST, 'YES'))
|
||||
@ -339,9 +276,8 @@ stages:
|
||||
MGMT_BRANCH: 202205
|
||||
|
||||
- job: multi_asic_testbedv2
|
||||
pool: ubuntu-20.04
|
||||
displayName: "kvmtest-multi-asic-t1-lag by TestbedV2"
|
||||
pool:
|
||||
vmImage: 'ubuntu-20.04'
|
||||
timeoutInMinutes: 1080
|
||||
condition: and(succeeded(), eq(variables.BUILD_IMG_RUN_TESTBEDV2_TEST, 'YES'))
|
||||
continueOnError: false
|
||||
|
Loading…
Reference in New Issue
Block a user