diff options
author | Avra Sengupta <asengupt@redhat.com> | 2014-05-29 06:53:32 +0000 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2014-05-29 10:50:13 -0700 |
commit | a181282d1465c98c9b07bc7ea37e7096a7799a11 (patch) | |
tree | e3e5f59f0023784be67a94e26dff72a322c1c55d | |
parent | a726e3e538f65d028d5da4cdbdd7892b9577dba1 (diff) |
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 <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/7924
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
-rwxr-xr-x | tests/cluster.rc | 17 |
1 files changed, 13 insertions, 4 deletions
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 } |