aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Gelety <jgelety@cisco.com>2016-12-14 10:36:17 +0100
committerPeter Mikus <pmikus@cisco.com>2016-12-14 10:36:39 +0000
commitbf396b294274cdd0ac1e8779ae674c9f05c78ccc (patch)
tree9f29fc10134b4707161d86cead129fb762e2dd6d
parentf66bdbdcf7f238034d447c37facb2623f71df06a (diff)
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 <jgelety@cisco.com>
-rwxr-xr-xresources/tools/virl/bin/stop-testcase7
1 files 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