bug 696161: create simplified talos buildbot for a-team usage. r=rail/catlee
authorBen Hearsum <bhearsum@mozilla.com>
Tue, 01 Nov 2011 14:27:18 -0400
changeset 4971 6fa12d51d6987dab53892943726bf1bce7ebea48
parent 4970 4434972a6dee8edb6b6f1a5477e1d356a81afe50
child 4972 891e4bd17d10b86198e99677db96f4db32e98a43
child 4973 1840471f3427091739791b9f26d59ae3f942f496
push id1
push userroot
push dateWed, 17 Dec 2014 00:18:48 +0000
reviewersrail, catlee
bugs696161
bug 696161: create simplified talos buildbot for a-team usage. r=rail/catlee
simple-talos/README
simple-talos/config.py
simple-talos/master.cfg
simple-talos/secrets.py
test-masters.sh
new file mode 100644
--- /dev/null
+++ b/simple-talos/README
@@ -0,0 +1,55 @@
+Overview:
+  This directory contains all the necessary files to start a self-contained
+  Buildbot master capable of running any type of Talos test. It contains one
+  Builder for every platform listed in config.py. Tests can be triggered through
+  "buildbot sendchange", and by setting the appropriate properties, any Talos
+  test may be run. Below, the required and optional properties are described
+  and examples are provided.
+
+Required Properties:
+  supportUrlBase: Where to look for various support tools required to run a
+                  Talos job, including but not limited to: installdmg.sh,
+                  count_and_reboot.py, talos.zip, pageloader.xpi, as well as
+                  any pagesets, plugins, or talos addons provided. (See
+                  'Option Properties' for descriptions of those three things.)
+                  If you're not using custom versions of any of these tools,
+                  http://build.mozilla.org/talos is a good value for this.
+
+  configurationOptions: A comma seperated list of arguments to pass to
+                        PerfConfigurator.py. You must pass at least
+                        --activeTests and one test to run. Other common
+                        options include: --mozAfterPaint, --noShutdown,
+                        --sampleConfig. See PerfConfigurator.py for a full
+                        list of options.
+
+Optional Properties:
+  plugin: A plugin to download and install into Firefox. Must be a filename,
+          and possibly path, relative to supportBaseUrl. Typically this is
+          used for Flash. The plugin will be extracted into talos/base_profile.
+
+  pageset1, pageset2: Pagesets to download and install into Talos. Must be a
+                      filename, and possibly path, relative to supportBaseUrl.
+                      Each supplied pageset will be extracted into
+                      talos/page_load_test.
+
+  talosAddon1, talosAddon2: Addons to the Talos framework itself. Must be a
+                            filename, and possibly path, relative to
+                            supportBaseUrl. Each supplied addon will be
+                            extracted into talos/.
+
+  extraTalosArg: An extra argument to pass to run_tests.py. --amo (used for
+                 addon testing), is the only known one.
+
+  addonUrl: A Firefox addon to download and install before running tests. The
+            addon will be downloaded to talos/ and the Talos framework will
+            install it into the profile.
+
+Examples:
+- To run an add-on test (after flipping releaseTester=True in master.cfg) on Windows 7:
+    buildbot sendchange -m localhost:9118 -u bhearsum -p 'configurationOptions:--activeTests,ts,--noShutdown,--sampleConfig,addon.config' -p 'supportUrlBase:http://build.mozilla.org/talos' --branch=win7 -p 'addonUrl:/pub/mozilla.org/addons/722/noscript-2.1.5-fn+sm+fx.xpi' -p'extraTalosArg:--amo' http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-central/firefox-10.0a1.en-US.win32.installer.exe
+
+- To run Tp5 on Snow Leopard:
+    buildbot sendchange -m localhost:9118 -u bhearsum -p 'configurationOptions:--activeTests,tp5,--mozAfterPaint' -p 'supportUrlBase:http://build.mozilla.org/talos' --branch=snowleopard -p 'pageset1:zips/tp5.zip' http://stage.mozilla.org/pub/mozilla.org/firefox/releases/7.0.1/mac/en-US/Firefox%207.0.1.dmg
+
+- To run Ts on Snow Leopard:
+    buildbot sendchange -m localhost:9118 -u bhearsum -p 'configurationOptions:--activeTests,ts_places_generated_min:ts_places_generated_med:ts_places_generated_max' -p 'supportUrlBase:http://build.mozilla.org/talos' --branch=snowleopard -p 'talosAddon1:profiles/dirtyDBs.zip' -p 'talosAddon2:profiles/dirtyMaxDBs.zip' http://stage.mozilla.org/pub/mozilla.org/firefox/releases/7.0.1/mac/en-US/Firefox%207.0.1.dmg
new file mode 100644
--- /dev/null
+++ b/simple-talos/config.py
@@ -0,0 +1,42 @@
+platforms = {
+    'leopard-o': {
+        'slaves': ['leopard-o1'],
+        'env': 'mac-perf'
+    },
+    'leopard': {
+        'slaves': ['leopard1'],
+        'env': 'mac-perf'
+    },
+    'snowleopard': {
+        'slaves': ['snowleopard1'],
+        'env': 'mac-perf'
+    },
+    'snowleopard-r4': {
+        'slaves': ['snowleopard-r4-1'],
+        'env': 'mac-perf'
+    },
+    'xp': {
+        'slaves': ['xp1'],
+        'env': 'win32-perf'
+    },
+    'win7': {
+        'slaves': ['win7-1'],
+        'env': 'win32-perf'
+    },
+    'w764': {
+        'slaves': ['w764-1'],
+        'env': 'win64-perf'
+    },
+    'fedora': {
+        'slaves': ['fed1'],
+        'env': 'linux-perf'
+    },
+    'fedora64': {
+        'slaves': ['fed64-1'],
+        'env': 'linux-perf'
+    },
+}
+
+buildBranch = 'MozillaTest'
+talosBranch = 'MozillaTest'
+branchName = 'MozillaTest'
new file mode 100644
--- /dev/null
+++ b/simple-talos/master.cfg
@@ -0,0 +1,62 @@
+from buildbot.buildslave import BuildSlave
+from buildbot.changes.pb import PBChangeSource
+from buildbot.config import BuilderConfig
+from buildbot.process.properties import WithProperties
+from buildbot.schedulers.basic import Scheduler
+from buildbot.status.html import WebStatus
+
+import buildbotcustom.process.factory
+reload(buildbotcustom.process.factory)
+
+from buildbotcustom.process.factory import RuntimeTalosFactory
+
+import config
+import secrets
+reload(config)
+reload(secrets)
+
+c = BuildmasterConfig = {}
+c['title'] = 'Ateam Talos Buildbot'
+c['titleURL'] = 'http://wiki.mozilla.org/Ateam'
+c['buildbotURL'] = 'http://talos-staging-master02.mv.mozilla.com:8010/'
+c['db_url'] = 'sqlite:///state.sqlite'
+c['slavePortnum'] = 9989
+c['slaves'] = []
+c['builders'] = []
+c['change_source'] = [PBChangeSource()]
+c['schedulers'] = []
+c['status'] = [WebStatus(http_port=8010, allowForce=True)]
+
+for platform in config.platforms:
+    p = config.platforms[platform]
+    for slave in p['slaves']:
+        c['slaves'].append(BuildSlave(slave, secrets.buildslavePassword))
+
+    factory = RuntimeTalosFactory(
+        OS=platform,
+        envName=p['env'],
+        buildBranch=config.buildBranch,
+        branchName=config.branchName,
+        talosBranch=config.talosBranch,
+        customManifest=None,
+        workdirBase='../talos-data',
+        fetchSymbols=False,
+        talosCmd=['python', 'run_tests.py', '--noisy', WithProperties('%(extraTalosArg)s'), WithProperties('%(configFile)s')],
+        # Uncomment this to test EXEs on Windows instead of ZIPs
+        #releaseTester=True
+    )
+    c['builders'].append(BuilderConfig(
+        name=platform,
+        slavenames=p['slaves'],
+        factory=factory,
+        category=platform
+    ))
+    c['schedulers'].append(Scheduler(
+        name=platform,
+        builderNames=[platform],
+        branch=platform
+    ))
+
+if __name__ == '__main__':
+    for s in c['schedulers']:
+        print "Scheduler %s triggers builders %s" % (s.name, s.builderNames)
new file mode 100644
--- /dev/null
+++ b/simple-talos/secrets.py
@@ -0,0 +1,1 @@
+buildslavePassword = 'omgsecret'
--- a/test-masters.sh
+++ b/test-masters.sh
@@ -30,16 +30,21 @@ if [ "$1" = "-7" ]; then
 
 # Any other arg will be treated as a json file to load
 elif [ -n "$1" ]; then
     extra_args="-j $1"
 fi
 
 exit_code=0
 
+# Also test the simpler masters
+for master_name in simple-talos; do
+    echo -n "${master_name}... "
+    (cd $master_name; buildbot checkconfig > /dev/null && echo OK)
+done
 # It will iterate through list of masters and checkconfig for each one of them
 for master_name in $(python setup-master.py $extra_args --list); do
     rm -rf $master_dir
     mkdir $master_dir
     echo -n "${master_name}... "
     python setup-master.py $extra_args $master_dir $master_name
     (cd $master_dir; buildbot checkconfig > /dev/null && echo OK) || \
         { echo "Broken pieces are in $master_dir"; exit_code=1; false; }