###
#
-# Defaults: Any values that you leave out from the above specs will get filled in by the defaults specified below
-#
+# DEFAULTS
#
+# Any values that you leave out from the above specs will get filled in by the defaults specified below.
+# You shouldn't need to modify these values to add new builds
__personality_to_arch__={'linux32':'i386','linux64':'x86_64'}
-__flag_to_test__={0:'-B', 1:'')
+__flag_to_test__={0:'-B', 1:''}
+
+def __check_out_build_script__(build):
+ import os
+ tmpname = os.popen('mktemp /tmp/'+build['build-script']+'.XXXXXX').read().rstrip('\n')
+ os.system("svn cat %s/%s > %s 2>/dev/null"%(build['svnpath'],build['build-script'],tmpname))
+ return tmpname
__default_build__ = {
+
+### Simple parameters
+
'path':'/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin',
'sh':'/bin/bash',
'mailto':'build@lists.planet-lab.org',
'date':'2009-07-21',
'svnpath':'http://svn.planet-lab.org/svn/build/trunk',
'personality':'linux32',
+ 'myplcversion':'4.3',
+
-### Dependencies: Define paramater mappings as lambdas here
+### Parameters with dependencies: define paramater mappings as lambdas here
'arch':lambda build: __personality_to_arch__[build['personality']],
'runtests':lambda build: __flag_to_test__[build['test']],
+ 'vbuildnightly':lambda build: __check_out_build_script__(build)
+
}
def concrete_build_to_commandline(concrete_build):
import pdb
pdb.set_trace()
- cmdline = """%(sh)
- %(vbuildinghtly)
- -b %(pldistro)-%(fcdistro)-%(arch)-%(myplc_version)-%(release)-%(date)
- -f %(distro)
- -m %(mailto)
- -p %(personality)
- -r %(webpath)
- -s %(svnpath)
- -t %(tags)
- -w %(webpath)/%(pldistro)/%(distro)
- %(runtests)""".replace('\n','')
+ cmdline = '''%(sh)s
+ %(vbuildnightly)s
+ -b %(pldistro)s-%(fcdistro)s-%(arch)s-%(myplcversion)s-%(release)s-%(date)s
+ -f %(distro)s
+ -m %(mailto)s
+ -p %(personality)s
+ -r %(webpath)s
+ -s %(svnpath)s
+ -t %(tags)s
+ -w %(webpath)s/%(pldistro)s/%(distro)s
+ %(runtests)s'''.replace('\n','')
cmdline = cmdline % concrete_build
return cmdline