From bf396b294274cdd0ac1e8779ae674c9f05c78ccc Mon Sep 17 00:00:00 2001 From: Jan Gelety Date: Wed, 14 Dec 2016 10:36:17 +0100 Subject: [PATCH] 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 --- resources/tools/virl/bin/stop-testcase | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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 -- 2.16.6