-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refine PR test template format (#15637)
Why I did it Refine PR test template format. How I did it Refine PR test template format. How to verify it PR test executed normally. Signed-off-by: Chun'ang Li <[email protected]>
- Loading branch information
Showing
1 changed file
with
100 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,11 @@ parameters: | |
|
||
- name: MAX_WORKER | ||
type: string | ||
default: 2 | ||
default: 1 | ||
|
||
- name: NUM_ASIC | ||
type: number | ||
default: 1 | ||
|
||
- name: TEST_SET | ||
type: string | ||
|
@@ -26,14 +30,82 @@ parameters: | |
type: string | ||
default: "" | ||
|
||
- name: COMMON_EXTRA_PARAMS | ||
type: string | ||
default: "" | ||
|
||
- name: VM_TYPE | ||
type: string | ||
default: "ceos" | ||
|
||
- name: TESTBED_NAME | ||
type: string | ||
default: "" | ||
|
||
- name: IMAGE_URL | ||
type: string | ||
default: "" | ||
|
||
- name: HWSKU | ||
type: string | ||
default: "" | ||
|
||
- name: TEST_PLAN_TYPE | ||
type: string | ||
default: "" | ||
|
||
- name: PLATFORM | ||
type: string | ||
default: "" | ||
|
||
- name: SCRIPTS | ||
type: string | ||
default: "" | ||
|
||
- name: FEATURES | ||
type: string | ||
default: "" | ||
|
||
- name: SCRIPTS_EXCLUDE | ||
type: string | ||
default: "" | ||
|
||
- name: FEATURES_EXCLUDE | ||
type: string | ||
default: "" | ||
|
||
- name: REPO_NAME | ||
type: string | ||
default: "" | ||
|
||
- name: MGMT_BRANCH | ||
type: string | ||
default: master | ||
default: "" | ||
|
||
- name: COMMON_EXTRA_PARAMS | ||
- name: STOP_ON_FAILURE | ||
type: string | ||
default: "" | ||
|
||
- name: RETRY_TIMES | ||
type: string | ||
default: "" | ||
|
||
- name: DUMP_KVM_IF_FAIL | ||
type: string | ||
default: "True" | ||
values: | ||
- "True" | ||
- "False" | ||
|
||
- name: REQUESTER | ||
type: string | ||
default: "" | ||
|
||
- name: MAX_RUN_TEST_MINUTES | ||
type: number | ||
default: 480 | ||
|
||
|
||
steps: | ||
- script: | | ||
set -e | ||
|
@@ -46,9 +118,18 @@ steps: | |
set -e | ||
pip install PyYAML | ||
rm -f new_test_plan_id.txt | ||
python ./.azure-pipelines/test_plan.py create -t ${{ parameters.TOPOLOGY }} -o new_test_plan_id.txt --min-worker ${{ parameters.MIN_WORKER }} --max-worker ${{ parameters.MAX_WORKER }} \ | ||
--test-set ${{ parameters.TEST_SET }} --kvm-build-id $(KVM_BUILD_ID) --deploy-mg-extra-params "${{ parameters.DEPLOY_MG_EXTRA_PARAMS }}" --mgmt-branch ${{ parameters.MGMT_BRANCH }} \ | ||
python ./.azure-pipelines/test_plan.py create \ | ||
-t ${{ parameters.TOPOLOGY }} \ | ||
-o new_test_plan_id.txt \ | ||
--min-worker ${{ parameters.MIN_WORKER }} \ | ||
--max-worker ${{ parameters.MAX_WORKER }} \ | ||
--test-set ${{ parameters.TEST_SET }} \ | ||
--kvm-build-id $(KVM_BUILD_ID) \ | ||
--deploy-mg-extra-params "${{ parameters.DEPLOY_MG_EXTRA_PARAMS }}" \ | ||
--mgmt-branch ${{ parameters.MGMT_BRANCH }} \ | ||
--common-extra-params "${{ parameters.COMMON_EXTRA_PARAMS }}" | ||
TEST_PLAN_ID=`cat new_test_plan_id.txt` | ||
echo "Created test plan $TEST_PLAN_ID" | ||
|
@@ -94,18 +175,20 @@ steps: | |
env: | ||
TESTBED_TOOLS_URL: $(TESTBED_TOOLS_URL) | ||
displayName: Run test | ||
- script: | | ||
set -e | ||
echo "KVM dump" | ||
echo "SONiC PR system-level test is powered by SONiC Elastictest, for any issue, please send email to [email protected]" | ||
echo "Runtime detailed progress at $(FRONTEND_URL)/scheduler/testplan/$TEST_PLAN_ID " | ||
# When "KVMDUMP" finish, it changes into "FAILED", "CANCELLED" or "FINISHED" | ||
python ./.azure-pipelines/test_plan.py poll -i "$(TEST_PLAN_ID)" --expected-state KVMDUMP | ||
condition: succeededOrFailed() | ||
env: | ||
TESTBED_TOOLS_URL: $(TESTBED_TOOLS_URL) | ||
displayName: KVM dump | ||
timeoutInMinutes: ${{ parameters.MAX_RUN_TEST_MINUTES }} | ||
- ${{ if eq(parameters.DUMP_KVM_IF_FAIL, 'True') }}: | ||
- script: | | ||
set -e | ||
echo "KVM dump" | ||
echo "SONiC PR system-level test is powered by SONiC Elastictest, for any issue, please send email to [email protected]" | ||
echo "Runtime detailed progress at $(FRONTEND_URL)/scheduler/testplan/$TEST_PLAN_ID " | ||
# When "KVMDUMP" finish, it changes into "FAILED", "CANCELLED" or "FINISHED" | ||
python ./.azure-pipelines/test_plan.py poll -i "$(TEST_PLAN_ID)" --expected-state KVMDUMP | ||
condition: succeededOrFailed() | ||
env: | ||
TESTBED_TOOLS_URL: $(TESTBED_TOOLS_URL) | ||
displayName: KVM dump | ||
- script: | | ||
set -e | ||
|