summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAtin Mukherjee <amukherj@redhat.com>2014-11-12 12:15:11 +0530
committerKrishnan Parthasarathi <kparthas@redhat.com>2014-11-14 00:26:40 -0800
commit7c9e95f1876ca0d209509358e6d4e58c910dd71e (patch)
treed00e41400811b9cca9efa6cf7dca93a40ed1b294
parent21282c0a7bf2783c8845335fe4834b043689ef0d (diff)
cli : Maintain separate cli log file per cli instance for cluster regression tests
Change-Id: I7f49f4999d997b99c103fd67d13f972937e3aa92 BUG: 1162987 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/9100 Reviewed-by: Kaushal M <kaushal@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
-rwxr-xr-xtests/cluster.rc13
1 files changed, 11 insertions, 2 deletions
diff --git a/tests/cluster.rc b/tests/cluster.rc
index 5c821776156..b734f9d4501 100755
--- a/tests/cluster.rc
+++ b/tests/cluster.rc
@@ -121,8 +121,17 @@ function define_clis() {
for i in `seq 1 $count`; do
b="B$i";
- eval "CLI_$i='$CLI --glusterd-sock=${!b}/glusterd/gd.sock'";
- eval "CLI$i='$CLI --glusterd-sock=${!b}/glusterd/gd.sock'";
+ #get the logdir
+ logdir=`gluster --print-logdir`
+ #Fetch the testcases name and prefix the cli log with it
+ logfile=`echo ${0##*/}`_cli$i.log
+ lopt="--log-file=$logdir/$logfile"
+ logfile1=`echo ${0##*/}`_cli_$i.log
+ lopt1="--log-file=$logdir/$logfile1"
+
+
+ eval "CLI_$i='$CLI --glusterd-sock=${!b}/glusterd/gd.sock $lopt'";
+ eval "CLI$i='$CLI --glusterd-sock=${!b}/glusterd/gd.sock $lopt1'";
done
}