bug 417332 - unittest configuration for moz2

This commit is contained in:
rcampbell%mozilla.com 2008-04-18 18:23:39 +00:00
Родитель 6676b47c30
Коммит ad246ac670
4 изменённых файлов: 239 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,227 @@
# -*- python -*-
# ex: set syntax=python:
# This is a sample buildmaster config file. It must be installed as
# 'master.cfg' in your buildmaster's base directory (although the filename
# can be changed with the --basedir option to 'mktap buildbot master').
# It has one job: define a dictionary named BuildmasterConfig. This
# dictionary has a variety of keys to control different aspects of the
# buildmaster. They are documented in docs/config.xhtml .
import os.path
from buildbot.process import factory
from buildbot.changes.hgpoller import HgPoller
from buildbot.scheduler import Scheduler, Nightly, Periodic
from buildbot.status import html, words, tinderbox
from buildbot.steps.source import Mercurial
from buildbot.steps.transfer import FileDownload
from buildbot.steps.shell import Compile, ShellCommand, WithProperties
from mozbuild import *
s = factory.s
# This is the dictionary that the buildmaster pays attention to. We also use
# a shorter alias to save typing.
c = BuildmasterConfig = {}
c['projectName'] = "Mozilla2"
c['projectURL'] = "http://wiki.mozilla.org/Mozilla_2"
c['buildbotURL'] = "qm-moz2-unittest01.mozilla.org:2010"
####### BUILDSLAVES
# the 'bots' list defines the set of allowable buildslaves. Each element is a
# tuple of bot-name and bot-password. These correspond to values given to the
# buildslave's mktap invocation.
from buildbot.buildslave import BuildSlave
c['slaves'] = [BuildSlave("qm-centos5-moz2-01", "moz2"),
BuildSlave("qm-moz2mini01", "moz2"),
BuildSlave("qm-win2k3-moz2-01", "moz2")]
# 'slavePortnum' defines the TCP port to listen on. This must match the value
# configured into the buildslaves (with their --master option)
c['slavePortnum'] = 9999
c['status'] = []
c['status'].append(html.WebStatus(http_port=2010))
c['status'].append(tinderbox.TinderboxMailNotifier(
fromaddr="rcampbell@mozilla.com",
tree="MozillaTest",
extraRecipients=["tinderbox-daemon@tinderbox.mozilla.org"],
relayhost="localhost",
logCompression="bzip2"))
####### CHANGESOURCES
# the 'change_source' list tells the buildmaster how it should find out about
# source code changes. Any class which implements IChangeSource can be added
# to this list: there are several in buildbot/changes/*.py to choose from.
c['change_source'] = []
c['change_source'].append(HgPoller(
hgURL = "http://hg.mozilla.org/",
branch = "mozilla-central",
pollInterval = 1 * 60))
####### SCHEDULERS
## configure the Schedulers
c['schedulers'] = []
c['schedulers'].append(Scheduler(name="mozilla-central",
branch="mozilla-central",
treeStableTimer=5*60,
builderNames=["mozilla2 firefox unittest linux",
"mozilla2 firefox unittest darwin"]))
####### BUILDERS
# the 'builders' list defines the Builders. Each one is configured with a
# dictionary, using the following keys:
# name (required): the name used to describe this bilder
# slavename (required): which slave to use, must appear in c['bots']
# builddir (required): which subdirectory to run the builder in
# factory (required): a BuildFactory to define how the build is run
# periodicBuildTime (optional): if set, force a build every N seconds
# the first BuildStep is typically responsible for obtaining a copy of the
# change_source. There are source-obtaining Steps in buildbot/process/step.py for
# CVS, SVN, and others.
CVSROOT = ":ext:unittest@cvs.mozilla.org:/cvsroot"
builders = []
moz2_linux_unittest_factory = factory.BuildFactory()
moz2_linux_unittest_factory.addStep(Mercurial, mode='update',
baseURL='http://hg.mozilla.org/',
defaultBranch='mozilla-central')
moz2_linux_unittest_factory.addStep(ShellCommand, command=['python', 'client.py',
'--mozilla-repo=http://hg.mozilla.org/mozilla-central/',
'--cvsroot=%s' % CVSROOT,
'checkout'],
description='running client.py checkout',
descriptionDone='client.py checkout')
moz2_linux_unittest_factory.addStep(ShellCommand, name="download mozconfig",
command=['cvs', '-d', CVSROOT, 'co', '-d', 'mozconfigs',
'mozilla/tools/buildbot-configs/testing/moz2unit/mozconfig-firefox-linux'],
workdir='.')
moz2_linux_unittest_factory.addStep(ShellCommand, name="copy mozconfig",
command=['cp', 'mozconfigs/mozconfig-firefox-linux', 'build/.mozconfig'],
workdir='.')
moz2_linux_unittest_factory.addStep(ShellCommand, name='mozconfig contents',
command=['cat', '.mozconfig'])
moz2_linux_unittest_factory.addStep(Compile, command=['make', '-f', 'client.mk', 'build'])
moz2_linux_unittest_factory.addStep(MozillaCheck,
warnOnWarnings=True,
timeout=60*40,
workdir="build/objdir")
moz2_linux_unittest_factory.addStep(MozillaUnixReftest, warnOnWarnings=True,
workdir="build/layout/reftests",
env=MozillaEnvironments['centos'])
moz2_linux_unittest_factory.addStep(MozillaUnixCrashtest, warnOnWarnings=True,
workdir="build/testing/crashtest",
env=MozillaEnvironments['centos'])
moz2_linux_unittest_factory.addStep(MozillaMochitest, warnOnWarnings=True,
workdir="build/objdir/_tests/testing/mochitest",
env=MozillaEnvironments['centos'])
moz2_linux_unittest_factory.addStep(MozillaMochichrome, warnOnWarnings=True,
workdir="build/objdir/_tests/testing/mochitest",
env=MozillaEnvironments['centos'])
moz2_linux_unittest_factory.addStep(MozillaBrowserChromeTest, warnOnWarnings=True,
workdir="build/objdir/_tests/testing/mochitest",
env=MozillaEnvironments['centos'])
mozilla2_firefox_unix_test_builder = {
'name': 'mozilla2 firefox unittest linux',
'slavenames': ['qm-centos5-moz2-01'],
'builddir': 'linux',
'factory': moz2_linux_unittest_factory,
'category': 'HEAD',
}
builders.append(mozilla2_firefox_unix_test_builder)
moz2_darwin_unittest_factory = factory.BuildFactory()
moz2_darwin_unittest_factory.addStep(Mercurial, mode='update',
baseURL='http://hg.mozilla.org/',
defaultBranch='mozilla-central')
moz2_darwin_unittest_factory.addStep(ShellCommand, command=['python', 'client.py',
'--mozilla-repo=http://hg.mozilla.org/mozilla-central/',
'--cvsroot=%s' % CVSROOT,
'checkout'],
description='running client.py checkout',
descriptionDone='client.py checkout')
moz2_darwin_unittest_factory.addStep(ShellCommand, name="download mozconfig",
command=['cvs', '-d', CVSROOT, 'co', '-d', 'mozconfigs',
'mozilla/tools/buildbot-configs/testing/moz2unit/mozconfig-firefox-darwin'],
workdir='.')
moz2_darwin_unittest_factory.addStep(ShellCommand, name="copy mozconfig",
command=['cp', 'mozconfigs/mozconfig-firefox-darwin', 'build/.mozconfig'],
workdir='.')
moz2_darwin_unittest_factory.addStep(ShellCommand, name='mozconfig contents',
command=['cat', '.mozconfig'])
moz2_darwin_unittest_factory.addStep(Compile,
command=['make', '-f', 'client.mk', 'build'])
moz2_darwin_unittest_factory.addStep(MozillaCheck,
warnOnWarnings=True,
timeout=60*40,
workdir="build/objdir")
moz2_darwin_unittest_factory.addStep(MozillaUnixReftest, warnOnWarnings=True,
workdir="build/layout/reftests",
env=MozillaEnvironments['osx'])
moz2_darwin_unittest_factory.addStep(MozillaUnixCrashtest, warnOnWarnings=True,
workdir="build/testing/crashtest",
env=MozillaEnvironments['osx'])
moz2_darwin_unittest_factory.addStep(MozillaMochitest, warnOnWarnings=True,
workdir="build/objdir/_tests/testing/mochitest",
env=MozillaEnvironments['osx'])
moz2_darwin_unittest_factory.addStep(MozillaMochichrome, warnOnWarnings=True,
workdir="build/objdir/_tests/testing/mochitest",
env=MozillaEnvironments['osx'])
moz2_darwin_unittest_factory.addStep(MozillaBrowserChromeTest, warnOnWarnings=True,
workdir="build/objdir/_tests/testing/mochitest",
env=MozillaEnvironments['osx'])
mozilla2_firefox_osx_test_builder = {
'name': 'mozilla2 firefox unittest darwin',
'slavenames': ['qm-moz2mini01'],
'builddir': 'darwin',
'factory': moz2_darwin_unittest_factory,
'category': 'HEAD',
}
builders.append(mozilla2_firefox_osx_test_builder)
c['builders'] = builders
####### DEBUGGING OPTIONS
# if you set 'debugPassword', then you can connect to the buildmaster with
# the diagnostic tool in contrib/debugclient.py . From this tool, you can
# manually force builds and inject changes, which may be useful for testing
# your buildmaster without actually commiting changes to your repository (or
# before you have a functioning 'change_source' set up). The debug tool uses the
# same port number as the slaves do: 'slavePortnum'.
c['debugPassword'] = "painandsuffering"
# if you set 'manhole', you can ssh into the buildmaster and get an
# interactive python shell, which may be useful for debugging buildbot
# internals. It is probably only useful for buildbot developers. You can also
# use an authorized_keys file, or plain telnet.
#from buildbot import manhole
#c['manhole'] = manhole.PasswordManhole("tcp:9999:interface=127.0.0.1",
# "admin", "password")

Просмотреть файл

Просмотреть файл

@ -0,0 +1,4 @@
ac_add_options --enable-application=browser
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/objdir
ac_add_options --disable-debug
ac_add_options --enable-tests

Просмотреть файл

@ -0,0 +1,8 @@
ac_add_options --enable-application=browser
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/objdir
ac_add_options --enable-optimize="-Os"
ac_add_options --disable-debug
ac_add_options --enable-tests
CC=/tools/gcc/bin/gcc
CXX=/tools/gcc/bin/g++