Finishing the mappings
authorSapan Bhatia <sapanb@cs.princeton.edu>
Thu, 23 Jul 2009 19:53:18 +0000 (19:53 +0000)
committerSapan Bhatia <sapanb@cs.princeton.edu>
Thu, 23 Jul 2009 19:53:18 +0000 (19:53 +0000)
build_conf_planetlab.py
run_nightlies.py

index c876caa..bc0a03d 100755 (executable)
@@ -22,7 +22,8 @@ sapans_k27_build = {
 #
 #
 
 #
 #
 
-personality_to_arch={'linux32':'i386','linux64':'x86_64'}
+__personality_to_arch__={'linux32':'i386','linux64':'x86_64'}
+__flag_to_test__={0:'-B', 1:'')
 
 __default_build__ = {
        'path':'/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin',
 
 __default_build__ = {
        'path':'/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin',
@@ -34,7 +35,9 @@ __default_build__ = {
        'date':'2009-07-21',
        'svnpath':'http://svn.planet-lab.org/svn/build/trunk',
     'personality':'linux32',
        'date':'2009-07-21',
        'svnpath':'http://svn.planet-lab.org/svn/build/trunk',
     'personality':'linux32',
-### Define lambdas at the end, because they may need the above values to be filled in for their evaluation
-    'arch':lambda build: personality_to_arch[concrete_build['personality']]
-}
 
 
+### Dependencies: Define paramater mappings as lambdas here
+
+    'arch':lambda build: __personality_to_arch__[build['personality']],
+    'runtests':lambda build: __flag_to_test__[build['test']],
+}
index 12e682b..8b43860 100755 (executable)
@@ -35,17 +35,20 @@ def complete_build_spec_with_defaults (build, default_build):
 # Turn a concrete build into a commandline
 
 def concrete_build_to_commandline(concrete_build):
 # Turn a concrete build into a commandline
 
 def concrete_build_to_commandline(concrete_build):
-    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) """ % 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 = cmdline % concrete_build
 
     return cmdline
 
 
     return cmdline