From a181282d1465c98c9b07bc7ea37e7096a7799a11 Mon Sep 17 00:00:00 2001 From: Avra Sengupta Date: Thu, 29 May 2014 06:53:32 +0000 Subject: tests/cluster.rc: Moving the glusterd logs for cluster testcases Moving the glusterd logs for cluster testcases from /d/backends to logdir. Change-Id: I6f22ca0c2faa87b0774e718c6c26d6547afd7c51 BUG: 1102593 Signed-off-by: Avra Sengupta Reviewed-on: http://review.gluster.org/7924 Tested-by: Gluster Build System Reviewed-by: Krishnan Parthasarathi Reviewed-by: Vijay Bellur --- tests/cluster.rc | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'tests/cluster.rc') diff --git a/tests/cluster.rc b/tests/cluster.rc index efeaa35636d..365f9a2ddfd 100755 --- a/tests/cluster.rc +++ b/tests/cluster.rc @@ -10,7 +10,7 @@ function launch_cluster() { define_backends $count; define_hosts $count; - define_glusterds $count; + define_glusterds $count $2; define_clis $count; start_glusterds; @@ -46,9 +46,18 @@ function define_glusterds() { bopt="management.transport.socket.bind-address=${!h}"; popt="--pid-file=${!b}/glusterd.pid"; sopt="management.glusterd-sockfile=${!b}/glusterd/gd.sock" - lopt="--log-file=${!b}/glusterd.log" - eval "glusterd_$i='glusterd --xlator-option $wopt --xlator-option $bopt --xlator-option $sopt $lopt $popt'"; - eval "glusterd$i='glusterd --xlator-option $wopt --xlator-option $bopt --xlator-option $sopt $lopt $popt'"; + #Get the logdir + logdir=`gluster --print-logdir` + #Fetch the testcases name and prefix the glusterd log with it + logfile=`echo ${0##*/}`_glusterd$i.log + lopt="--log-file=$logdir/$logfile" + if [ "$2" == "-LDEBUG" ]; then + eval "glusterd_$i='glusterd -LDEBUG --xlator-option $wopt --xlator-option $bopt --xlator-option $sopt $lopt $popt'"; + eval "glusterd$i='glusterd -LDEBUG --xlator-option $wopt --xlator-option $bopt --xlator-option $sopt $lopt $popt'"; + else + eval "glusterd_$i='glusterd --xlator-option $wopt --xlator-option $bopt --xlator-option $sopt $lopt $popt'"; + eval "glusterd$i='glusterd --xlator-option $wopt --xlator-option $bopt --xlator-option $sopt $lopt $popt'"; + fi done } -- cgit