[oe-commits] Yuri Bushmelev : contrib/testing/testbuilder: Update to 0.6.1

git version control git at git.openembedded.org
Wed Mar 16 22:57:50 UTC 2011


Module: openembedded.git
Branch: master
Commit: b93654c74e9af2c4fb9d764ffe0f1de8658403cc
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=b93654c74e9af2c4fb9d764ffe0f1de8658403cc

Author: Yuri Bushmelev <jay4mail at gmail.com>
Date:   Thu Mar 17 01:54:39 2011 +0300

contrib/testing/testbuilder: Update to 0.6.1

---

 contrib/testing/testbuilder/testbuilder            |   14 +++++++++++---
 .../testing/testbuilder/testbuilder.conf.sample    |   11 ++++++++++-
 2 files changed, 21 insertions(+), 4 deletions(-)

diff --git a/contrib/testing/testbuilder/testbuilder b/contrib/testing/testbuilder/testbuilder
index 5d9e023..348d811 100755
--- a/contrib/testing/testbuilder/testbuilder
+++ b/contrib/testing/testbuilder/testbuilder
@@ -12,7 +12,7 @@
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-VERSION="0.6"
+VERSION="0.6.1"
 PACKAGE="TestBuilder"
 
 TB_DIR=`dirname $0`
@@ -210,7 +210,7 @@ tb_build_images() {
 	touch "${_log}"
 
 	_stime=$(date +%s)
-	${BB_CMD} ${BB_OPTS} ${_images} 2>&1 | tee "${_log}"
+	eval ${BB_CMD} ${BB_OPTS} ${_images} 2>&1 | tee "${_log}"
 	_rc=$?
 	_btime=$( TZ=UTC0 date -d "now - $_stime seconds" '+%T' )
 
@@ -274,7 +274,7 @@ tb_build_machines() {
 ### Main code 
 
 # Parse stages
-unset DO_RUN_BUILDS DO_UPDATE_OE DO_UPDATE_BB
+unset DO_RUN_BUILDS DO_UPDATE_OE DO_UPDATE_BB DO_UPLOAD_LOGS
 for stage in $STAGES; do
 	[ "${stage}" != "${stage#!}" ] && continue
 	case ${stage} in
@@ -284,6 +284,8 @@ for stage in $STAGES; do
 		DO_UPDATE_OE=y;;
 	'update_bb')
 		DO_UPDATE_BB=y;;
+	'upload_logs')
+		DO_UPLOAD_LOGS=y;;
 	*)
 		tb_log "Unknown stage ${stage}.";;
 	esac
@@ -500,6 +502,12 @@ for buildconf in ${BUILDS}; do (
 	done #DISTROS
 ) done #BUILDS
 
+# Upload logs
+if [ -n "$DO_UPLOAD_LOGS" ]; then
+	tb_log "Uploading logs to ${UPLOAD_DESTDIR}"
+	eval ${UPLOAD_CMD} ${UPLOAD_OPTS} "${LOG_DIR}/*" "${UPLOAD_DESTDIR}"
+fi
+
 tb_log "All done."
 
 exit 0
diff --git a/contrib/testing/testbuilder/testbuilder.conf.sample b/contrib/testing/testbuilder/testbuilder.conf.sample
index 17dc08c..b588407 100644
--- a/contrib/testing/testbuilder/testbuilder.conf.sample
+++ b/contrib/testing/testbuilder/testbuilder.conf.sample
@@ -12,7 +12,8 @@
 # update_bb - update bitbake git tree
 # update_oe - update OE git tree
 # run_builds - run builds
-STAGES="update_bb update_oe !run_builds"
+# upload_logs - upload logs to some other place
+STAGES="update_bb update_oe !run_builds !upload_logs"
 
 ## ACCOUNTING: account some useful things
 # df - log free disk space
@@ -57,6 +58,14 @@ MW_USER=""
 # Build host machine
 # HOST_MACHINE="<cpu model, cores @freq> /<RAM amount>"
 
+## UPLOAD
+# Upload command
+UPLOAD_CMD="rsync"
+# Upload options
+UPLOAD_OPTS="-av --delete"
+# Upload destination
+UPLOAD_DESTDIR="${TB_BUILDER}@server:/var/www/htdocs/testbuilder/logs"
+
 # Misc dirs
 TB_BASE=`pwd`
 BB_DIR="${TB_BASE}/bitbake"





More information about the Openembedded-commits mailing list