changeset 198:1a50b63c73a3

template now uses the slave os
author Jeff Hammel <jhammel@mozilla.com>
date Wed, 02 Feb 2011 15:08:54 -0800
parents 854ac4008ac8
children 38fc07fb6aad
files autobot/template.py autobot/template/master/master.ini
diffstat 2 files changed, 13 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/autobot/template.py	Wed Feb 02 14:52:09 2011 -0800
+++ b/autobot/template.py	Wed Feb 02 15:08:54 2011 -0800
@@ -20,6 +20,16 @@
 except ImportError:
     from subprocess import call
 
+# default OS type
+# XXX this should use MozInfo when that's ready
+os_type=None
+if sys.platform.startswith('linux'):
+    os_type = 'linux'
+elif sys.platform.startswith('darwin'):
+    os_type = 'mac'
+elif sys.platform.startswith('win'):
+    os_type = 'win'
+
 def print_descriptions():
     """print factory descriptions"""
 
@@ -37,6 +47,7 @@
     description = 'template for the autotools buildbot master'
     templates = [os.path.join('template', 'master')]
     vars = [Variable('slave', 'buildslave name', 'slave'),
+            Variable('os', 'buildslave os (win, mac, linux)', os_type),
             Variable('passwd', 'buildslave password', default='passwd'),
             Variable('slaveport', 'port to talk to slaves on', default=9010, cast=int),
             Variable('htmlport', 'port for waterfall display', default=8010, cast=int)]
--- a/autobot/template/master/master.ini	Wed Feb 02 14:52:09 2011 -0800
+++ b/autobot/template/master/master.ini	Wed Feb 02 15:08:54 2011 -0800
@@ -6,4 +6,5 @@
 pollInterval = 30
 treeStableTimer = 30
 
-[slave:{{slave}}]
\ No newline at end of file
+[slave:{{slave}}]
+os = {{os}}