Skip to content

Commit

Permalink
Merge branch 'master' into nine
Browse files Browse the repository at this point in the history
Conflicts:
	master/buildbot/changes/gitpoller.py
	master/buildbot/test/integration/test_try_client.py
	master/buildbot/test/unit/test_changes_gitpoller.py
	master/docs/relnotes/index.rst
  • Loading branch information
djmitche committed Apr 20, 2014
2 parents 0a2ffe5 + 894bb85 commit 10205b4
Show file tree
Hide file tree
Showing 23 changed files with 513 additions and 233 deletions.
2 changes: 1 addition & 1 deletion master/buildbot/changes/gitpoller.py
Expand Up @@ -282,7 +282,7 @@ def _process_changes(self, newRev, branch):
files=files,
comments=comments,
when_timestamp=timestamp,
branch=ascii2unicode(branch),
branch=ascii2unicode(self._removeHeads(branch)),
category=self.category,
project=self.project,
repository=ascii2unicode(self.repourl),
Expand Down
2 changes: 2 additions & 0 deletions master/buildbot/test/integration/test_slave_comm.py
Expand Up @@ -26,6 +26,7 @@
from buildbot.status import master
from buildbot.test.fake import fakemaster
from buildbot.test.util import compat
from buildbot.test.util.flaky import flaky
from buildbot.util.eventual import eventually
from twisted.cred import credentials
from twisted.internet import defer
Expand Down Expand Up @@ -268,6 +269,7 @@ def test_connect_disconnect(self):
# wait for the resulting detach
yield slave.waitForDetach()

@flaky(bugNumber=2761)
@defer.inlineCallbacks
@compat.usesFlushLoggedErrors
def test_duplicate_slave(self):
Expand Down
2 changes: 2 additions & 0 deletions master/buildbot/test/integration/test_try_client.py
Expand Up @@ -23,6 +23,7 @@
from buildbot.schedulers import trysched
from buildbot.test.util import dirs
from buildbot.test.util import www
from buildbot.test.util.flaky import flaky
from twisted.cred import credentials
from twisted.internet import defer
from twisted.internet import reactor
Expand Down Expand Up @@ -231,6 +232,7 @@ def test_userpass_no_wait(self):
buildsets = yield self.master.db.buildsets.getBuildsets()
self.assertEqual(len(buildsets), 1)

@flaky(bugNumber=2762)
@defer.inlineCallbacks
def test_userpass_wait(self):
yield self.startMaster(
Expand Down
6 changes: 3 additions & 3 deletions master/buildbot/test/unit/test_changes_gitpoller.py
Expand Up @@ -532,7 +532,7 @@ def cb(_):
self.assertEqual(added[0]['author'], 'by:4423cdbc')
self.assertEqual(added[0]['when_timestamp'], 1273258009)
self.assertEqual(added[0]['comments'], 'hello!')
self.assertEqual(added[0]['branch'], 'refs/heads/master')
self.assertEqual(added[0]['branch'], 'master')
self.assertEqual(added[0]['files'], [u'/etc/442'])
self.assertEqual(added[0]['src'], 'git')

Expand Down Expand Up @@ -663,7 +663,7 @@ def cb(_):
self.assertEqual(added[0]['author'], 'by:4423cdbc')
self.assertEqual(added[0]['when_timestamp'], 1273258009)
self.assertEqual(added[0]['comments'], 'hello!')
self.assertEqual(added[0]['branch'], 'refs/heads/master')
self.assertEqual(added[0]['branch'], 'master')
self.assertEqual(added[0]['files'], ['/etc/442'])
self.assertEqual(added[0]['src'], 'git')

Expand Down Expand Up @@ -758,7 +758,7 @@ def cb(_):
self.assertEqual(added[0]['author'], 'by:4423cdbc')
self.assertEqual(added[0]['when_timestamp'], 1273258009)
self.assertEqual(added[0]['comments'], 'hello!')
self.assertEqual(added[0]['branch'], 'refs/heads/master')
self.assertEqual(added[0]['branch'], 'master')
self.assertEqual(added[0]['files'], ['/etc/442'])
self.assertEqual(added[0]['src'], 'git')

Expand Down
2 changes: 2 additions & 0 deletions master/buildbot/test/unit/test_scripts_start.py
Expand Up @@ -24,6 +24,7 @@
from buildbot.test.util import compat
from buildbot.test.util import dirs
from buildbot.test.util import misc
from buildbot.test.util.flaky import flaky
from twisted.internet.utils import getProcessOutputAndValue
from twisted.python import versions
from twisted.trial import unittest
Expand Down Expand Up @@ -98,6 +99,7 @@ def cb(res):
print res
return d

@flaky(bugNumber=2760)
@compat.skipUnlessPlatformIs('posix')
def test_start(self):
d = self.runStart()
Expand Down
26 changes: 26 additions & 0 deletions master/buildbot/test/util/flaky.py
@@ -0,0 +1,26 @@
# This file is part of Buildbot. Buildbot is free software: you can
# redistribute it and/or modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation, version 2.
#
# This program is distributed in the hope that it will be useful, 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.
#
# You should have received a copy of the GNU General Public License along with
# this program; if not, write to the Free Software Foundation, Inc., 51
# Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Copyright Buildbot Team Members

import os
envVar = 'RUN_FLAKY_TESTS'


def flaky(bugNumber):
def wrap(fn):
if not os.environ.get(envVar):
fn.skip = ("Flaky test (http://trac.buildbot.net/ticket/%d) "
"- set $%s to run anyway" % (bugNumber, envVar))
return fn
return wrap
16 changes: 8 additions & 8 deletions master/docs/developer/config.rst
Expand Up @@ -266,7 +266,7 @@ Builder Configuration
The builder's description, displayed in the web status.

Error Handling
==============
--------------

If any errors are encountered while loading the configuration :py:func:`buildbot.config.error`
should be called. This can occur both in the configuration-loading code,
Expand Down Expand Up @@ -346,7 +346,7 @@ All of this is used by to serve ``/config.js`` to the JavaScript frontend.
.. _developer-Reconfiguration:

Reconfiguration
===============
---------------

When the buildmaster receives a signal to begin a reconfig, it re-reads the
configuration file, generating a new :py:class:`MasterConfig` instance, and
Expand Down Expand Up @@ -376,7 +376,7 @@ components in Buildbot.
.. index:: Service Mixins; ReconfigurableServiceMixin

Reconfigurable Services
-----------------------
.......................

Instances which need to be notified of a change in configuration should be
implemented as Twisted services, and mix in the
Expand Down Expand Up @@ -418,7 +418,7 @@ implemented as Twisted services, and mix in the


Change Sources
--------------
..............

When reconfiguring, there is no method by which Buildbot can determine that a
new :py:class:`~buildbot.changes.base.ChangeSource` represents the same source
Expand All @@ -444,7 +444,7 @@ values change.


Schedulers
----------
..........

Schedulers have names, so Buildbot can determine whether a scheduler has been
added, removed, or changed during a reconfig. Old schedulers will be stopped,
Expand Down Expand Up @@ -484,7 +484,7 @@ reconfig - this will cause the old scheduler to be stopped, and the new
scheduler (with the new name and class) to be started.

Slaves
------
......

Similar to schedulers, slaves are specified by name, so new and old
configurations are first compared by name, and any slaves to be added or
Expand All @@ -503,14 +503,14 @@ a new instance. The
can be used to find the new instance.

User Managers
-------------
.............

Since user managers are rarely used, and their purpose is unclear, they are
always stopped and re-started on every reconfig. This may change in figure
versions.

Status Receivers
----------------
................

At every reconfig, all status listeners are stopped and new versions started.

Expand Down
4 changes: 4 additions & 0 deletions master/docs/manual/cfg-builders.rst
Expand Up @@ -7,6 +7,10 @@
Builder Configuration
---------------------

.. contents::
:depth: 1
:local:

The :bb:cfg:`builders` configuration key is a list of objects giving
configuration for the Builders. For more information on the function of
Builders in Buildbot, see :ref:`the Concepts chapter <Builder>`. The class
Expand Down
4 changes: 4 additions & 0 deletions master/docs/manual/cfg-buildfactories.rst
Expand Up @@ -14,6 +14,10 @@ The steps used by these builds are defined in the next section, :ref:`Build-Step
Build factories are used with builders, and are not added directly to the
buildmaster configuration dictionary.

.. contents::
:depth: 1
:local:

.. _BuildFactory:

.. index:: Build Factory
Expand Down
7 changes: 7 additions & 0 deletions master/docs/manual/cfg-buildslaves.rst
Expand Up @@ -13,6 +13,13 @@ that will try to connect to the buildbot master as a slave. Buildbot also
supports "on-demand", or latent, buildslaves, which allow buildbot to
dynamically start and stop buildslave instances.

.. contents::
:depth: 1
:local:

Defining Buildslaves
~~~~~~~~~~~~~~~~~~~~

A :class:`BuildSlave` instance is created with a ``slavename`` and a
``slavepassword``. These are the same two values that need to be provided to
the buildslave administrator when they create the buildslave.
Expand Down
4 changes: 4 additions & 0 deletions master/docs/manual/cfg-buildsteps.rst
Expand Up @@ -33,6 +33,10 @@ The rest of this section describes all the standard :class:`BuildStep` objects
available for use in a :class:`Build`, and the parameters which can be used to
control each. A full list of build steps is available in the :bb:index:`step`.

.. contents::
:depth: 2
:local:

.. index:: Buildstep Parameter

.. _Buildstep-Common-Parameters:
Expand Down
4 changes: 4 additions & 0 deletions master/docs/manual/cfg-changesources.rst
Expand Up @@ -3,6 +3,10 @@
Change Sources
--------------

.. contents::
:depth: 2
:local:

A Version Control System maintains a source tree, and tells the
buildmaster when it changes. The first step of each :class:`Build` is typically
to acquire a copy of some version of this tree.
Expand Down
4 changes: 4 additions & 0 deletions master/docs/manual/cfg-global.rst
Expand Up @@ -3,6 +3,10 @@ Global Configuration

The keys in this section affect the operations of the buildmaster globally.

.. contents::
:depth: 1
:local:

.. bb:cfg:: db
.. bb:cfg:: db_url
Expand Down
4 changes: 4 additions & 0 deletions master/docs/manual/cfg-interlocks.rst
Expand Up @@ -4,6 +4,10 @@
Interlocks
----------

.. contents::
:depth: 1
:local:

Until now, we assumed that a master can run builds at any slave whenever
needed or desired. Some times, you want to enforce additional constraints on
builds. For reasons like limited network bandwidth, old slave machines, or a
Expand Down
4 changes: 4 additions & 0 deletions master/docs/manual/cfg-properties.rst
Expand Up @@ -9,6 +9,10 @@ Build properties are a generalized way to provide configuration information to
build steps; see :ref:`Build-Properties` for the conceptual overview of
properties.

.. contents::
:depth: 1
:local:

Some build properties come from external sources and are set before the build
begins; others are set during the build, and available for later steps. The
sources for properties are:
Expand Down
4 changes: 4 additions & 0 deletions master/docs/manual/cfg-schedulers.rst
Expand Up @@ -4,6 +4,10 @@
Schedulers
----------

.. contents::
:depth: 1
:local:

Schedulers are responsible for initiating builds on builders.

Some schedulers listen for changes from ChangeSources and generate build sets
Expand Down
4 changes: 4 additions & 0 deletions master/docs/manual/cfg-statustargets.rst
Expand Up @@ -5,6 +5,10 @@
Status Targets
--------------

.. contents::
:depth: 2
:local:

The Buildmaster has a variety of ways to present build status to
various users. Each such delivery method is a `Status Target` object
in the configuration's :bb:cfg:`status` list. To add status targets, you
Expand Down

0 comments on commit 10205b4

Please sign in to comment.