diff options
author | Marcin Juszkiewicz <hrw@openembedded.org> | 2009-04-29 12:31:42 +0200 |
---|---|---|
committer | Marcin Juszkiewicz <hrw@openembedded.org> | 2009-04-29 12:40:16 +0200 |
commit | 565e76ba4588fc2baa34862f7378f243d117ee39 (patch) | |
tree | b52151af07539efc9077d6752ca231e0a130b8f0 | |
parent | 3b21d9500708e4043b51f2edb75ca71d82b2dcd8 (diff) |
buildbot config: simplified a lot and cleaned
- it is configurable by few variables:
- machines_glibc/machines_uclibc lists MACHINE values for each libc build
(so atngw100 can be used just for uclibc)
- targets_glibc/targets_uclibc lists targets (can be image or any other
argument for bitbake)
- ANGSTROMLIBC and MACHINE are passed only by environment now so less
parameters are given to bbot_build_oe_target (RunOEImage before
renaming).
- initialization of factories is done in one function
bbot_initialize_factory which gets few arguments:
- factory
- clean $TMPDIR (default False)
- URL to git repository
- git branch
-rw-r--r-- | contrib/buildbot/master.cfg | 158 | ||||
-rwxr-xr-x | contrib/buildbot/scripts/full-oe-autobuild | 24 |
2 files changed, 76 insertions, 106 deletions
diff --git a/contrib/buildbot/master.cfg b/contrib/buildbot/master.cfg index 7fb4578246..b03bfbb8e6 100644 --- a/contrib/buildbot/master.cfg +++ b/contrib/buildbot/master.cfg @@ -1,33 +1,81 @@ -def runOEImage(factory, machine, image, libc): - defaultenv['ANGSTROMLIBC'] = libc - factory.addStep(ShellCommand, description=["Building", machine, image], command=["/home/buildbot/scripts/full-oe-autobuild", image, machine], env=copy.copy(defaultenv), timeout=10000) - import copy -builders = [] +from buildbot.buildslave import BuildSlave +from buildbot.scheduler import Nightly +from buildbot.process import factory +from buildbot.steps.shell import Compile, ShellCommand +from buildbot.steps import source +from buildbot.status import html + +# ------------------------------------------------------------------------------------------------------------------------------------------------ + +def bbot_build_oe_target(factory, target): + factory.addStep(ShellCommand, description=["Building", defaultenv['MACHINE'], target], command=["/home/buildbot/scripts/full-oe-autobuild", target], env=copy.copy(defaultenv), timeout=10000) + +def bbot_initialize_factory(factory, clean_tmp=False, repository="git://git.openembedded.net/openembedded", branch="stable/2009"): + factory.addStep(source.Git(repourl=repository, branch=branch, mode='update')) + + if clean_tmp: + factory.addStep(ShellCommand, description=["Cleaning", "tmp"], command="/bin/rm tmp || /bin/true", timeout=600) + else: + factory.addStep(ShellCommand, description=["Cleaning", "previous", "targets"], command="/bin/rm tmp/deploy/*/images/*/*rootfs* || /bin/true", timeout=600) + factory.addStep(ShellCommand, description=["Cleaning", "previous", "targets", "step 2"], command="/bin/rm -rf tmp/deploy/*/images/*/*testlab* || /bin/true", timeout=600) + +# ------------------------------------------------------------------------------------------------------------------------------------------------ + defaultenv = {} +machines_glibc = ['at91sam9263ek', 'beagleboard', 'qemux86', 'vortex86sx', 'bug'] +machines_uclibc = ['at91sam9263ek', 'beagleboard', 'qemux86', 'atngw100', 'bug'] + +targets_glibc = ['console-image', 'x11-image'] +targets_uclibc = ['console-image', 'x11-image'] + +angstrom_glibc_incremental_build = factory.BuildFactory() +bbot_initialize_factory(angstrom_glibc_incremental_build) +defaultenv['ANGSTROMLIBC'] = 'glibc' + +for machine in machines_glibc: + defaultenv['MACHINE'] = machine + for target in targets_glibc: + bbot_build_oe_target(angstrom_glibc_incremental_build, target) + +angstrom_glibc_full_build = factory.BuildFactory() +bbot_initialize_factory(angstrom_glibc_full_build, True) +defaultenv['ANGSTROMLIBC'] = 'glibc' + +for machine in machines_glibc: + defaultenv['MACHINE'] = machine + for target in targets_glibc: + bbot_build_oe_target(angstrom_glibc_full_build, target) + +angstrom_uclibc_incremental_build = factory.BuildFactory() +bbot_initialize_factory(angstrom_uclibc_incremental_build) +defaultenv['ANGSTROMLIBC'] = 'uclibc' + +for machine in machines_uclibc: + defaultenv['MACHINE'] = machine + for target in targets_uclibc: + bbot_build_oe_target(angstrom_uclibc_incremental_build, target) + +angstrom_uclibc_full_build = factory.BuildFactory() +bbot_initialize_factory(angstrom_uclibc_full_build, True) +defaultenv['ANGSTROMLIBC'] = 'uclibc' + +for machine in machines_uclibc: + defaultenv['MACHINE'] = machine + for target in targets_uclibc: + bbot_build_oe_target(angstrom_uclibc_full_build, target) + +# ------------------------------------------------------------------------------------------------------------------------------------------------ + config = BuildmasterConfig = {} config['projectName'] = "HaeRWu buildbot" config['buildbotURL'] = "http://localhost:8010/" -from buildbot.buildslave import BuildSlave -from buildbot.changes.pb import PBChangeSource -from buildbot.scheduler import Scheduler -from buildbot.scheduler import Periodic -from buildbot.scheduler import Nightly -from buildbot.process import factory -from buildbot.process import buildstep as step -from buildbot.steps.source import SVN -from buildbot.steps.python_twisted import Trial -from buildbot.steps.shell import Compile, ShellCommand -from buildbot.steps import source, shell - config['slaves'] = [BuildSlave("homeQuad", "BOT-PASSWORD")] -config['slavePortnum'] = 9989 - -config['change_source'] = PBChangeSource() +Config['slavePortnum'] = 9989 config['schedulers'] = [] @@ -48,69 +96,6 @@ config['schedulers'].append(Nightly(name="Angstrom uclibc incremental build", builderNames=["angstrom_uclibc_incremental_build"])) -angstrom_glibc_incremental_build = factory.BuildFactory() -angstrom_glibc_incremental_build.addStep(source.Git(repourl="git://git.openembedded.net/openembedded", branch='stable/2009', mode='update')) - -angstrom_glibc_incremental_build.addStep(ShellCommand, description=["Cleaning", "previous", "images"], command="/bin/rm tmp/deploy/*/images/*/*rootfs* || /bin/true", timeout=600) -angstrom_glibc_incremental_build.addStep(ShellCommand, description=["Cleaning", "previous", "images", "step 2"], command="/bin/rm -rf tmp/deploy/*/images/*/*testlab* || /bin/true", timeout=600) -runOEImage(angstrom_glibc_incremental_build, 'at91sam9263ek', 'base-image', 'glibc') -runOEImage(angstrom_glibc_incremental_build, 'at91sam9263ek', 'console-image', 'glibc') -runOEImage(angstrom_glibc_incremental_build, 'at91sam9263ek', 'x11-image', 'glibc') -runOEImage(angstrom_glibc_incremental_build, 'beagleboard', 'base-image', 'glibc') -runOEImage(angstrom_glibc_incremental_build, 'beagleboard', 'console-image', 'glibc') -runOEImage(angstrom_glibc_incremental_build, 'beagleboard', 'x11-image', 'glibc') -runOEImage(angstrom_glibc_incremental_build, 'qemux86', 'base-image', 'glibc') -runOEImage(angstrom_glibc_incremental_build, 'qemux86', 'console-image', 'glibc') -runOEImage(angstrom_glibc_incremental_build, 'qemux86', 'x11-image', 'glibc') - -angstrom_glibc_full_build = factory.BuildFactory() -angstrom_glibc_full_build.addStep(source.Git(repourl="git://git.openembedded.net/openembedded", branch='stable/2009', mode='update')) - -angstrom_glibc_full_build.addStep(ShellCommand, description=["Cleaning", "previous", "build"], command="/bin/rm -rf tmp", timeout=600) -runOEImage(angstrom_glibc_full_build, 'at91sam9263ek', 'base-image', 'glibc') -runOEImage(angstrom_glibc_full_build, 'at91sam9263ek', 'console-image', 'glibc') -runOEImage(angstrom_glibc_full_build, 'at91sam9263ek', 'x11-image', 'glibc') -runOEImage(angstrom_glibc_full_build, 'beagleboard', 'base-image', 'glibc') -runOEImage(angstrom_glibc_full_build, 'beagleboard', 'console-image', 'glibc') -runOEImage(angstrom_glibc_full_build, 'beagleboard', 'x11-image', 'glibc') -runOEImage(angstrom_glibc_full_build, 'qemux86', 'base-image', 'glibc') -runOEImage(angstrom_glibc_full_build, 'qemux86', 'console-image', 'glibc') -runOEImage(angstrom_glibc_full_build, 'qemux86', 'x11-image', 'glibc') - -angstrom_uclibc_incremental_build = factory.BuildFactory() -angstrom_uclibc_incremental_build.addStep(source.Git(repourl="git://git.openembedded.net/openembedded", branch='stable/2009', mode='update')) - -angstrom_uclibc_incremental_build.addStep(ShellCommand, description=["Cleaning", "previous", "images"], command="/bin/rm tmp/deploy/*/images/*/*rootfs* || /bin/true", timeout=600) -angstrom_uclibc_incremental_build.addStep(ShellCommand, description=["Cleaning", "previous", "images", "step 2"], command="/bin/rm -rf tmp/deploy/*/images/*/*testlab* || /bin/true", timeout=600) -runOEImage(angstrom_uclibc_incremental_build, 'atngw100', 'base-image', 'uclibc') -runOEImage(angstrom_uclibc_incremental_build, 'atngw100', 'console-image', 'uclibc') -runOEImage(angstrom_uclibc_incremental_build, 'atngw100', 'x11-image', 'uclibc') -runOEImage(angstrom_uclibc_incremental_build, 'at91sam9263ek', 'base-image', 'uclibc') -runOEImage(angstrom_uclibc_incremental_build, 'at91sam9263ek', 'console-image', 'uclibc') -runOEImage(angstrom_uclibc_incremental_build, 'at91sam9263ek', 'x11-image', 'uclibc') -runOEImage(angstrom_uclibc_incremental_build, 'beagleboard', 'base-image', 'uclibc') -runOEImage(angstrom_uclibc_incremental_build, 'beagleboard', 'console-image', 'uclibc') -runOEImage(angstrom_uclibc_incremental_build, 'beagleboard', 'x11-image', 'uclibc') -runOEImage(angstrom_uclibc_incremental_build, 'qemux86', 'base-image', 'uclibc') -runOEImage(angstrom_uclibc_incremental_build, 'qemux86', 'console-image', 'uclibc') -runOEImage(angstrom_uclibc_incremental_build, 'qemux86', 'x11-image', 'uclibc') - -angstrom_uclibc_full_build = factory.BuildFactory() -angstrom_uclibc_full_build.addStep(source.Git(repourl="git://git.openembedded.net/openembedded", branch='stable/2009', mode='update')) - -angstrom_uclibc_full_build.addStep(ShellCommand, description=["Cleaning", "previous", "images"], command="/bin/rm -rf tmp", timeout=600) -runOEImage(angstrom_uclibc_full_build, 'atngw100', 'base-image', 'uclibc') -runOEImage(angstrom_uclibc_full_build, 'atngw100', 'console-image', 'uclibc') -runOEImage(angstrom_uclibc_full_build, 'atngw100', 'x11-image', 'uclibc') -runOEImage(angstrom_uclibc_full_build, 'at91sam9263ek', 'base-image', 'uclibc') -runOEImage(angstrom_uclibc_full_build, 'at91sam9263ek', 'console-image', 'uclibc') -runOEImage(angstrom_uclibc_full_build, 'at91sam9263ek', 'x11-image', 'uclibc') -runOEImage(angstrom_uclibc_full_build, 'beagleboard', 'base-image', 'uclibc') -runOEImage(angstrom_uclibc_full_build, 'beagleboard', 'console-image', 'uclibc') -runOEImage(angstrom_uclibc_full_build, 'beagleboard', 'x11-image', 'uclibc') -runOEImage(angstrom_uclibc_full_build, 'qemux86', 'base-image', 'uclibc') -runOEImage(angstrom_uclibc_full_build, 'qemux86', 'console-image', 'uclibc') -runOEImage(angstrom_uclibc_full_build, 'qemux86', 'x11-image', 'uclibc') #--------------------------------------------------------------------- build_agf = { @@ -144,8 +129,5 @@ config['builders'] = [build_agf, build_agi, build_auf, build_aui ] config['status'] = [] config['debugPassword'] = "" -from buildbot.status import html - -config['status'].append(html.Waterfall(http_port=8010)) -config['status'].append(html.Waterfall(http_port=8011, allowForce=False)) - +config['status'].append(html.WebStatus(http_port=8010, allowForce=True)) +config['status'].append(html.WebStatus(http_port=8011, allowForce=False)) diff --git a/contrib/buildbot/scripts/full-oe-autobuild b/contrib/buildbot/scripts/full-oe-autobuild index 65605f0a7b..6ad7367f8f 100755 --- a/contrib/buildbot/scripts/full-oe-autobuild +++ b/contrib/buildbot/scripts/full-oe-autobuild @@ -1,9 +1,10 @@ #!/bin/sh # Poky Automated Build Server Enviroment Setup Script +# OpenEmbedded Automated Build Server Environment Setup Script # # Copyright (C) 2006-2007 OpenedHand Ltd. -# Adapted to OpenEmbedded by Marcin Juszkiewicz in 2008. +# Copyright (C) 2008-2009 Marcin Juszkiewicz # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -19,24 +20,13 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -CURRDIR=`pwd` - -BB_DIR=$PWD/bitbake - -PATH=$BB_DIR/bin:$PATH - -# Don't export TARGET_ARCH - it *will* cause build failures -export PATH LD_LIBRARY_PATH - -export BBPATH=`pwd` +export PATH=$PWD/bitbake/bin:$PATH +export LC_ALL=C +export BBPATH=$PWD export BB_ENV_EXTRAWHITE="MACHINE ANGSTROMLIBC" -CONFFILE="./conf/local.conf" - umask 000 -rm conf/auto.conf - CONFFILE="./conf/local.conf" if [ ! -e "$CONFFILE" ]; then @@ -53,9 +43,7 @@ if [ ! -e "$CONFFILE" ]; then echo 'BBINCLUDELOGS = "1"' >> "$CONFFILE" fi -touch ./conf/local.conf - -MACHINE=$2 nice ionice -c3 bitbake $1 +nice ionice -c3 bitbake $1 retval=$? |