From 6520c0e70c558708a879f21b0642a125a4a54802 Mon Sep 17 00:00:00 2001 From: Pawel Kaminski Date: Thu, 13 Jun 2019 05:17:28 -0400 Subject: [PATCH] test/vhost: Fix. Do not remove results dir if it is needed. Results dir is used by jenkins job. Change-Id: I4821eab2578cae68cb9070347a877a1d2fbd0624 Signed-off-by: Pawel Kaminski Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457928 Tested-by: SPDK CI Jenkins Reviewed-by: Karol Latecki Reviewed-by: Darek Stojaczyk Reviewed-by: Shuhei Matsumoto --- test/vhost/windows/windows_scsi_compliance.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/vhost/windows/windows_scsi_compliance.sh b/test/vhost/windows/windows_scsi_compliance.sh index 4a6b7fde9..7fdbf9c16 100755 --- a/test/vhost/windows/windows_scsi_compliance.sh +++ b/test/vhost/windows/windows_scsi_compliance.sh @@ -13,6 +13,7 @@ WINDOWS_IMG="/home/sys_sgsw/windows_scsi_compliance/windows_vm_image.qcow2" aio_file="$testdir/aio_disk" ssh_pass="" vm_num=1 +keep_results_dir=false rpc_py="$rootdir/scripts/rpc.py -s $(get_vhost_dir)/rpc.sock" function usage() @@ -22,6 +23,7 @@ function usage() echo "Usage: $(basename $1) [OPTIONS]" echo " --vm-ssh-pass=PASSWORD Text password for the VM" echo " --vm-image-path Path of windows image" + echo " --keep_results Do not delete dir with results" exit 0 } @@ -33,6 +35,7 @@ while getopts 'h-:' optchar; do help) usage $0 ;; vm-ssh-pass=*) ssh_pass="${OPTARG#*=}" ;; vm-image-path=*) WINDOWS_IMG="${OPTARG#*=}" ;; + keep_results*) keep_results_dir=true ;; esac ;; h) usage $0 ;; @@ -78,4 +81,6 @@ notice "Remove $aio_file" rm -f $aio_file python3 $testdir/windows_scsi_compliance.py -rm -rf $testdir/results +if ! $keep_results_dir; then + rm -rf $testdir/results +fi