subversion_id = "$Id$"
- default_config = [ 'main' , '1vnodes' , '1testbox64' ]
+ default_config = [ 'default' ]
default_build_url = "http://svn.planet-lab.org/svn/build/trunk"
parser.add_option("-i","--ip",action="callback", callback=TestMain.optparse_list, dest="ips",
nargs=1,type="string",
help="Specify the set of IP addresses to use in vserver mode (disable scanning)")
- parser.add_option("-s","--small",action="store_true",dest="small_test",default=False,
+ parser.add_option("-s","--vserver",action="store_true",dest="native",default=False,
+ help="deploy myplc-native rather than former chroot-based package")
+ parser.add_option("-1","--small",action="store_true",dest="small_test",default=False,
help="run a small test -- typically only one node")
parser.add_option("-d","--dbname",action="store",dest="dbname",default=None,
help="Used by db_dump and db_restore")
help="Force the NM to restart in check_slices step")
(self.options, self.args) = parser.parse_args()
- # tmp : force small test
- utils.header("XXX WARNING : forcing small tests")
- self.options.small_test = True
+# tmp : force small test
+# utils.header("XXX WARNING : forcing small tests")
+# self.options.small_test = True
if len(self.args) == 0:
if self.options.all_steps:
fsave.close()
# utils.header('Saved %s into %s'%(recname,filename))
+ self.options.arch = "i386"
+ if self.options.myplc_url.find("x86_64") >= 0:
+ self.options.arch="x86_64"
# steps
if not self.options.steps:
#default (all) steps
repo_url = self.options.myplc_url
for level in [ 'rpmname','arch' ]:
repo_url = os.path.dirname(repo_url)
- create_vserver="%s/vtest-init-vserver.sh %s %s -- --interface eth0:%s"%\
- (build_dir,self.vservername,repo_url,self.vserverip)
+ if self.options.arch == "i386":
+ personality="-p linux32"
+ else:
+ personality="-p linux64"
+ create_vserver="%s/vtest-init-vserver.sh %s %s %s -- --interface eth0:%s"%\
+ (build_dir,personality,self.vservername,repo_url,self.vserverip)
return self.run_in_host(create_vserver) == 0
def install(self):
-#
+import sys
+
from TestMapper import TestMapper
# using mapper to do the reallocation job
-target = 'testbox32.one-lab.org'
-
def config (plcs, options):
+ if options.arch == "i386":
+ target = 'testbox32.one-lab.org'
+ elif options.arch == "x86_64":
+ target = 'testbox64.one-lab.org'
+ else:
+ print 'Unsupported arch %s'%options.arch
+ sys.exit(1)
+
mapper = {'plc': [ ('*' , {'hostname':target,
'PLC_DB_HOST':target,
'PLC_API_HOST':target,
'PLC_BOOT_HOST':target,
'PLC_WWW_HOST':target,
- 'name':'%s32' } ) ],
+ 'name':'%s'+options.arch } ) ],
'node': [ ('*' , {'host_box': target } ) ],
}
+++ /dev/null
-#
-from TestMapper import TestMapper
-
-# using mapper to do the reallocation job
-
-target = 'testbox64.one-lab.org'
-
-def config (plcs, options):
-
- mapper = {'plc': [ ('*' , {'hostname':target,
- 'PLC_DB_HOST':target,
- 'PLC_API_HOST':target,
- 'PLC_BOOT_HOST':target,
- 'PLC_WWW_HOST':target,
- 'name':'%s64' } ) ],
- 'node': [ ('*' , {'host_box': target } ) ],
- }
-
- return TestMapper(plcs,options).map(mapper)
--- /dev/null
+# the defaults
+# long story short, this does
+# main (standard scenario), 1vnodes (map node(s) in the onelab pool) and then
+# 1testbox32 or 64 depending on the personality option
+
+def config (plc_specs, options):
+ import config_main
+ plcs = config_main.config([],options)
+ import config_1vnodes
+ plcs = config_1vnodes.config(plcs,options)
+ import config_1testbox
+ plcs = config_1testbox.config (plcs,options)
+
+ if options.native:
+ import config_1vservers
+ plcs = config_1vservers.config (plcs,options)
+
+ return plcs
+