Message ID | 1398960655.29636.1.camel@kazak.uk.xensource.com |
---|---|
State | New |
Headers | show |
On Thu, 2014-05-01 at 17:10 +0100, Ian Campbell wrote: > 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 <ian.jackson@eu.citrix.com> > > > > > 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 <ian.campbell@citrix.com> > 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 <ian.campbell@citrix.com> > --- > 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 This stray debug echo should be removed on commit... > +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 $@
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 $@