Skip to contentSkip to conversation

toaster: add buildstats to toaster config file

PATCH In review Alex DAMIAN 2 participants 3 messages Dec 18, 2013 – Jan 3, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 toaster: add buildstats to toaster config file

From: Alexandru DAMIAN <[email protected]>

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.

---
 bin/toaster | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
bin/toaster +6 -1
index 38e71ac..d6c3175 100755
@@ -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
Signature · 1 line
1.8.3.2
#1 lore raw
Quoted 31 lines · Alex DAMIAN

From: Alexandru DAMIAN <[email protected]>

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.

---
 bin/toaster | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
bin/toaster +4 -1
index 38e71ac..d6c3175 100755
@@ -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
 }
 

bin/toaster fi · line 178

Quoted 9 lines
bin/toaster +2 -0
@@ -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

#2 lore raw

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

Quoted 53 lines · Richard Purdie
Quoted 31 lines · Alex DAMIAN

From: Alexandru DAMIAN <[email protected]>

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.

---
 bin/toaster | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
bin/toaster +4 -1
index 38e71ac..d6c3175 100755
@@ -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
 }
 

bin/toaster fi · line 174

Quoted 5 lines
bin/toaster +1 -0
@@ -167,7 +170,9 @@ fi
 case $CMD in
     start )
         start_success=1
+        initConfiguration toaster.conf
         addtoConfiguration "INHERIT+=\"toaster buildhistory\""

toaster.conf

bin/toaster fi · line 178

Quoted 4 lines
bin/toaster +1 -0
+        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

Signature · 3 lines
Alex Damian
Yocto Project
SSG / OTC