[ci]: exit kvmtest on the first error (#6489)

Signed-off-by: Guohan Lu <lguohan@gmail.com>
This commit is contained in:
lguohan 2021-01-18 21:26:41 -08:00 committed by GitHub
parent 755c73797c
commit 52afc801b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -118,7 +118,7 @@ stages:
pwd
username=$(id -un)
docker exec sonic-mgmt bash -c "/data/sonic-mgmt/tests/kvmtest.sh -n $(tbname) $(dut)"
docker exec sonic-mgmt bash -c "/data/sonic-mgmt/tests/kvmtest.sh -en $(tbname) $(dut)"
# save dut state if test fails
if [ $? != 0 ]; then
@ -137,7 +137,7 @@ stages:
rm -rf ptfdump
mkdir -p ptfdump
docker commit $ptf_name docker-ptf:$(Build.BuildNumber)
docker commit $(ptf_name) docker-ptf:$(Build.BuildNumber)
docker save docker-ptf:$(Build.BuildNumber) | gzip -c > ptfdump/docker-ptf-dump.gz
docker rmi docker-ptf:$(Build.BuildNumber)