From: Ian Campbell Subject: Re: [OSSTEST] standalone: print the path to the apache logs if we can't read them Date: Thu, 1 May 2014 17:10:55 +0100 Message-ID: <1398960655.29636.1.camel@kazak.uk.xensource.com> References: <1398676935-30784-1-git-send-email-ian.campbell@citrix.com> <21345.5799.851660.420159@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <21345.5799.851660.420159@mariner.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Jackson Cc: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Wed, 2014-04-30 at 16:28 +0100, Ian Jackson wrote: > Ian Campbell writes ("[OSSTEST] standalone: print the path to the apache logs if we can't read them"): > > For cut-and-paste convenience. > > Acked-by: Ian Jackson > > > diff --git a/standalone b/standalone > > index 6b08995..800b4ec 100755 > > --- a/standalone > > +++ b/standalone > > @@ -79,7 +79,7 @@ while true ; do > > done > > > > if [ ! -r /var/log/apache2/access.log ] ; then > > - echo "WARNING: Cannot read apache logs. Some tests may fail" >&2 > > + echo "WARNING: Cannot read apache logs at /var/log/apache2/access.log. Some tests may fail" >&2 > > fi > > I guess at some point it would be nice if this honoured the log > location config option (WebspaceLog). Done. 8<------------------- >From 0359398f95935b227b6b536175a92b29c9743980 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Sun, 27 Apr 2014 10:11:43 +0100 Subject: [PATCH] standalone: Use WebspaceLog for apache log check Also print the result in the error message for cut-and-paste convenience. While there I noticed that run-test was setting OSSTEST_CONFIG twice. Signed-off-by: Ian Campbell --- v2: Use cri-getconfig:getconfig --- standalone | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/standalone b/standalone index 6b08995..f00a81e 100755 --- a/standalone +++ b/standalone @@ -78,8 +78,12 @@ while true ; do esac done -if [ ! -r /var/log/apache2/access.log ] ; then - echo "WARNING: Cannot read apache logs. Some tests may fail" >&2 +. cri-getconfig + +WebspaceLog=`OSSTEST_CONFIG=$config getconfig WebspaceLog` +echo $WebspaceLog +if [ ! -r "$WebspaceLog" ] ; then + echo "WARNING: Cannot read apache logs at $WebspaceLog. Some tests may fail" >&2 fi if ! ssh-add -l >/dev/null ] ; then @@ -222,7 +226,6 @@ case $op in OSSTEST_CONFIG=$config \ OSSTEST_FLIGHT=$flight \ - OSSTEST_CONFIG=$config \ OSSTEST_HOST_REUSE=$reuse \ OSSTEST_JOB=$job \ with_logging logs/$flight/$job.$ts.log ./$ts host=$host $@ -- 1.9.0