Patchwork [bitbake-devel,1/1] toaster: add buildstats to toaster config file

login
register
mail settings
Submitter Alexandru DAMIAN
Date Dec. 18, 2013, 7:26 p.m.
Message ID <1387394811-24196-1-git-send-email-alexandru.damian@intel.com>
Download mbox | patch
Permalink /patch/63557/
State New
Headers show

Comments

Alexandru DAMIAN - Dec. 18, 2013, 7:26 p.m.
From: Alexandru DAMIAN <alexandru.damian@intel.com>

Toaster needs buildstats to be enabled in order to
be able to collect task running stats. This patch
adds buildstats to the running configuration in toaster mode.

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
---
 bin/toaster | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
Richard Purdie - Dec. 19, 2013, 9:21 p.m.
On Wed, 2013-12-18 at 19:26 +0000, Alex DAMIAN wrote:
> From: Alexandru DAMIAN <alexandru.damian@intel.com>
> 
> Toaster needs buildstats to be enabled in order to
> be able to collect task running stats. This patch
> adds buildstats to the running configuration in toaster mode.
> 
> Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
> ---
>  bin/toaster | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/bin/toaster b/bin/toaster
> index 38e71ac..d6c3175 100755
> --- a/bin/toaster
> +++ b/bin/toaster
> @@ -61,10 +61,13 @@ function webserverStartAll()
>  }
>  
>  # Helper functions to add a special configuration file
> +function initConfiguration()
> +{
> +        echo "#Created by toaster start script" > ${BUILDDIR}/conf/$1
> +}
>  
>  function addtoConfiguration()
>  {
> -        echo "#Created by toaster start script" > ${BUILDDIR}/conf/$2
>          echo $1 >> ${BUILDDIR}/conf/$2
>  }
>  
> @@ -167,7 +170,9 @@ fi
>  case $CMD in
>      start )
>          start_success=1
> +        initConfiguration toaster.conf
>          addtoConfiguration "INHERIT+=\"toaster buildhistory\"" toaster.conf
> +        addtoConfiguration "USER_CLASSES+=\"buildstats\"" toaster.conf
>          if ! webserverStartAll; then
>              echo "Failed ${CMD}."
>              return 4

Why not just add this to the INHERIT? I'm trying to figure out if
USER_CLASSES is special in some way and when we should use one and when
we should use the other...

Cheers,

Richard
Alexandru DAMIAN - Jan. 3, 2014, 12:56 p.m.
Just now saw this email - sorry for the delay,

I used USER_CLASSES just because this is how it's enabled in the default
local.conf ...

Alex


On Thu, Dec 19, 2013 at 9:21 PM, Richard Purdie <
richard.purdie@linuxfoundation.org> wrote:

> On Wed, 2013-12-18 at 19:26 +0000, Alex DAMIAN wrote:
> > From: Alexandru DAMIAN <alexandru.damian@intel.com>
> >
> > Toaster needs buildstats to be enabled in order to
> > be able to collect task running stats. This patch
> > adds buildstats to the running configuration in toaster mode.
> >
> > Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
> > ---
> >  bin/toaster | 7 ++++++-
> >  1 file changed, 6 insertions(+), 1 deletion(-)
> >
> > diff --git a/bin/toaster b/bin/toaster
> > index 38e71ac..d6c3175 100755
> > --- a/bin/toaster
> > +++ b/bin/toaster
> > @@ -61,10 +61,13 @@ function webserverStartAll()
> >  }
> >
> >  # Helper functions to add a special configuration file
> > +function initConfiguration()
> > +{
> > +        echo "#Created by toaster start script" > ${BUILDDIR}/conf/$1
> > +}
> >
> >  function addtoConfiguration()
> >  {
> > -        echo "#Created by toaster start script" > ${BUILDDIR}/conf/$2
> >          echo $1 >> ${BUILDDIR}/conf/$2
> >  }
> >
> > @@ -167,7 +170,9 @@ fi
> >  case $CMD in
> >      start )
> >          start_success=1
> > +        initConfiguration toaster.conf
> >          addtoConfiguration "INHERIT+=\"toaster buildhistory\""
> toaster.conf
> > +        addtoConfiguration "USER_CLASSES+=\"buildstats\"" toaster.conf
> >          if ! webserverStartAll; then
> >              echo "Failed ${CMD}."
> >              return 4
>
> Why not just add this to the INHERIT? I'm trying to figure out if
> USER_CLASSES is special in some way and when we should use one and when
> we should use the other...
>
> Cheers,
>
> Richard
>
>
>

Patch

diff --git a/bin/toaster b/bin/toaster
index 38e71ac..d6c3175 100755
--- a/bin/toaster
+++ b/bin/toaster
@@ -61,10 +61,13 @@  function webserverStartAll()
 }
 
 # Helper functions to add a special configuration file
+function initConfiguration()
+{
+        echo "#Created by toaster start script" > ${BUILDDIR}/conf/$1
+}
 
 function addtoConfiguration()
 {
-        echo "#Created by toaster start script" > ${BUILDDIR}/conf/$2
         echo $1 >> ${BUILDDIR}/conf/$2
 }
 
@@ -167,7 +170,9 @@  fi
 case $CMD in
     start )
         start_success=1
+        initConfiguration toaster.conf
         addtoConfiguration "INHERIT+=\"toaster buildhistory\"" toaster.conf
+        addtoConfiguration "USER_CLASSES+=\"buildstats\"" toaster.conf
         if ! webserverStartAll; then
             echo "Failed ${CMD}."
             return 4