Rev 75: Add a build to capture selftest timings with subunit. in file:///home/vila/buildbot/bzr/
Vincent Ladeuil
v.ladeuil+lp at free.fr
Thu Sep 17 14:06:36 BST 2009
At file:///home/vila/buildbot/bzr/
------------------------------------------------------------
revno: 75
revision-id: v.ladeuil+lp at free.fr-20090917130636-ekj22ibojbwc02hx
parent: babune at freebsd8-20090914085215-pfsh8zuxqtf9tmto
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: bzr
timestamp: Thu 2009-09-17 15:06:36 +0200
message:
Add a build to capture selftest timings with subunit.
* slaves/jaunty/bin/time-selftest.sh:
buildbot don't less us filter stderr out easily. Resort to a true shell script.
* slaves/jaunty/Makefile:
(PATH): Add a slave specific dir.
* master/master.cfg:
(BzrTimingTests): Subunit output.
(timing_factory): To collect selftest timings.
(c['builders']): Clearly separate the various builders.
(eleventh_scheduler): Dedicated scheduler for timing tests.
* .bzrignore:
(timings): Ignored for both master and slaves.
-------------- next part --------------
=== modified file '.bzrignore'
--- a/.bzrignore 2009-08-10 08:30:57 +0000
+++ b/.bzrignore 2009-09-17 13:06:36 +0000
@@ -1,10 +1,12 @@
+master/installers/*
+master/tests/*
+master/timings/*
master/twistd.log
RE:master/twistd.log.[0-9]+
master/twistd.pid
-master/tests/*
-master/installers/*
+slaves/*/installers
+slaves/*/tests
+slaves/jaunty/timings
slaves/*/twistd.log
RE:slaves/.*/twistd.log.[0-9]+
slaves/*/twistd.pid
-slaves/*/tests
-slaves/*/installers
=== modified file 'master/master.cfg'
--- a/master/master.cfg 2009-09-14 08:52:15 +0000
+++ b/master/master.cfg 2009-09-17 13:06:36 +0000
@@ -162,6 +162,15 @@
]
+class BzrTimingTests(shell.ShellCommand):
+
+ haltOnFailure = 1
+ name = 'Timing tests'
+ description = ['timing selftest']
+ descriptionDone = ['selftest timing']
+ command = ['time-selftest.sh']
+
+
tests_factory = factory.BuildFactory()
tests_factory.addStep(BzrGetSource())
@@ -182,10 +191,16 @@
# We resort to default LANG here
tests_factory.addStep(BzrSelftest())
+timing_factory = factory.BuildFactory()
+
+timing_factory.addStep(BzrGetSource())
+timing_factory.addStep(BzrBuildExtensions())
+timing_factory.addStep(BzrTimingTests())
+
# Builders for running the non-regression tests
-builders = []
+tests_builders = []
for s in c['slaves']:
name = s.slavename
if name == 'w2003x64':
@@ -199,9 +214,22 @@
builder = dict(name=name, slavename=name,
builddir='tests/%s' % name,
factory=tests_factory)
- builders.append(builder)
-
-c['builders'] = builders
+ tests_builders.append(builder)
+
+# Builders for timing the tests
+
+timing_builders = []
+
+for s in c['slaves']:
+ name = s.slavename
+ if name != 'jaunty':
+ # A single one is enough for now
+ continue
+ builder = dict(name='timing-at-%s' % name,
+ slavename=name,
+ builddir='timings/%s' % name,
+ factory=timing_factory)
+ timing_builders.append(builder)
# Factories for the Bazaar Installers for Windows.
#
@@ -238,14 +266,18 @@
f.addStep(s)
installer_factories[name] = f
+installer_builders = []
for name, factory in sorted(installer_factories.iteritems()):
- c["builders"].append(
- {"name": name,
- "slavename": 'w2003x64',
- "builddir": 'installers/%s' % (name,),
- "factory": factory,
+ installer_builders.append(
+ {'name': name,
+ 'slavename': 'w2003x64',
+ 'builddir': 'installers/%s' % (name,),
+ 'factory': factory,
})
+
+c['builders'] = tests_builders + timing_builders + installer_builders
+
####### SCHEDULERS
## configure the Schedulers
@@ -255,7 +287,7 @@
default_scheduler = scheduler.Scheduler(
name="all", branch=None,
treeStableTimer=2*60,
- builderNames=[b["name"] for b in c["builders"]])
+ builderNames=[b['name'] for b in c['builders']])
# Since so many bugs trigger only around midnight, it's only fair to try to
# help them. Well, it may sound a bit vain to speak about midnight in a
@@ -263,10 +295,17 @@
# in the same TZ as the master anyway.
midnight_scheduler = scheduler.Nightly(
name='midnight',
- builderNames=[b["name"] for b in c["builders"]],
+ builderNames=[b['name'] for b in c['builders']
+ if not b['name'].startswith('timing-at')],
hour=0, minute=0)
-c['schedulers'] = [midnight_scheduler]
+eleventh_scheduler = scheduler.Nightly(
+ name='elevenPM',
+ builderNames=[b['name'] for b in c['builders']
+ if b['name'].startswith('timing-at')],
+ hour=23, minute=0)
+
+c['schedulers'] = [midnight_scheduler, eleventh_scheduler]
####### STATUS TARGETS
=== added directory 'master/timings'
=== modified file 'slaves/jaunty/Makefile'
--- a/slaves/jaunty/Makefile 2009-09-12 10:07:20 +0000
+++ b/slaves/jaunty/Makefile 2009-09-17 13:06:36 +0000
@@ -2,10 +2,11 @@
include ../slave.mk
+# ${PWD}/bin for slave-specific versions
# ${HOME}/bin for slave specific versions
# /bin for kill
# /usr/bin for bzr, make, python, tail, twistd
-export PATH=${HOME}/bin:/bin:/usr/bin
+export PATH=${PWD}/bin:${HOME}/bin:/bin:/usr/bin
start:
twistd --no_save -y buildbot.tac
=== added directory 'slaves/jaunty/bin'
=== added file 'slaves/jaunty/bin/time-selftest.sh'
--- a/slaves/jaunty/bin/time-selftest.sh 1970-01-01 00:00:00 +0000
+++ b/slaves/jaunty/bin/time-selftest.sh 2009-09-17 13:06:36 +0000
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+python ./bzr selftest --subunit 2>/dev/null
More information about the bazaar-commits
mailing list