From: Jan Gelety Date: Wed, 14 Dec 2016 09:36:17 +0000 (+0100) Subject: fix of stop-testcase script X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=commitdiff_plain;h=bf396b294274cdd0ac1e8779ae674c9f05c78ccc fix of stop-testcase script - use if statement to avoid deletion of /nfs/scratch directory in case that session-id is not provided Change-Id: Iffca231755ebef71babdd74447a0712bc21265ed Signed-off-by: Jan Gelety --- diff --git a/resources/tools/virl/bin/stop-testcase b/resources/tools/virl/bin/stop-testcase index 1175fcf2b5..572d5d6e8d 100755 --- a/resources/tools/virl/bin/stop-testcase +++ b/resources/tools/virl/bin/stop-testcase @@ -20,5 +20,8 @@ NFS_SCRATCH_SERVERDIR="/nfs/scratch" # Our own (NFS s TESTCASE=$1 -virl_std_client -u $VIRL_USER -p $VIRL_PASSWORD simengine-stop --session-id $TESTCASE -sudo rm -fr ${NFS_SCRATCH_SERVERDIR}/${TESTCASE} +if [ "x${TESTCASE}" != "x" ] +then + virl_std_client -u $VIRL_USER -p $VIRL_PASSWORD simengine-stop --session-id $TESTCASE + sudo rm -fr ${NFS_SCRATCH_SERVERDIR}/${TESTCASE} +fi