fix of stop-testcase script 73/4273/2
authorJan Gelety <jgelety@cisco.com>
Wed, 14 Dec 2016 09:36:17 +0000 (10:36 +0100)
committerPeter Mikus <pmikus@cisco.com>
Wed, 14 Dec 2016 10:36:39 +0000 (10:36 +0000)
- 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 <jgelety@cisco.com>
resources/tools/virl/bin/stop-testcase

index 1175fcf..572d5d6 100755 (executable)
@@ -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

©2016 FD.io a Linux Foundation Collaborative Project. All Rights Reserved.
Linux Foundation is a registered trademark of The Linux Foundation. Linux is a registered trademark of Linus Torvalds.
Please see our privacy policy and terms of use.