utils.header('* Using %s = %s'%(recname,getattr(self.options,recname)))
- if self.options.personality == "linux32":
- self.options.arch = "i386"
- elif self.options.personality == "linux64":
- self.options.arch = "x86_64"
- else:
- raise Exception, "Unsupported personality %r"%self.options.personality
# steps
if not self.options.steps:
#default (all) steps
if self.run_in_host(build_checkout) != 0:
return False
# the repo url is taken from arch-rpms-url
- # with the last step (i386.) removed
+ # with the last step (i386) removed
repo_url = self.options.arch_rpms_url
for level in [ 'arch' ]:
repo_url = os.path.dirname(repo_url)
### install_rpm
def install_rpm(self):
- return self.run_in_guest("yum -y install myplc-native")==0 \
- and self.run_in_guest("yum -y install noderepo-%s-%s"%(self.options.pldistro,self.options.arch))==0
+ if self.options.personality == "linux32":
+ arch = "i386"
+ elif self.options.personality == "linux64":
+ arch = "x86_64"
+ else:
+ raise Exception, "Unsupported personality %r"%self.options.personality
+ return \
+ self.run_in_guest("yum -y install myplc-native")==0 and \
+ self.run_in_guest("yum -y install noderepo-%s-%s"%(self.options.pldistro,arch))==0
###
def configure(self):
def config (plcs, options):
- if options.arch == "i386":
+ if options.personality == "linux32":
plc_box ='speedball.inria.fr'
node_box1 = 'testbox64_1.onelab.eu'
node_box2 = 'testbox64_2.onelab.eu'
- elif options.arch == "x86_64":
+ label="32"
+ elif options.personality == "linux64":
plc_box = 'speedball.inria.fr'
node_box1 = 'testbox64_1.onelab.eu'
node_box2 = 'testbox64_2.onelab.eu'
+ label="64"
else:
- print 'Unsupported arch %s'%options.arch
+ print 'Unsupported personality %s'%options.personality
sys.exit(1)
mapper = {'plc': [ ('*' , {'hostname':plc_box,
'PLC_API_HOST':plc_box,
'PLC_BOOT_HOST':plc_box,
'PLC_WWW_HOST':plc_box,
- 'name':'%s-'+options.arch } )
+ 'name':'%s-'+label } )
],
'node': [ ('node1' , {'host_box': node_box1 } ),
('node2' , {'host_box': node_box2 } ),
[ -f "$CONFIG" ] || { echo "Config file for qemu $CONFIG not found in $(pwd)" ; exit 1 ; }
. $CONFIG
-# the launcher, depending on local/target archs
+# the launcher, depending on target arch
# make sure to check qemu-kill-node for consistency
-archs="$(uname -i)+$TARGET_ARCH"
-case $archs in
- i386+i386) QEMU=qemu;;
- i386+x86_64) QEMU=qemu-system-x86_64;;
- x86_64+i386) QEMU=qemu;;
- x86_64+x86_64) QEMU=qemu-system-x86_64;;
+case $TARGET_ARCH in
+ i386) QEMU=qemu;;
+ x86_64) QEMU=qemu-system-x86_64;;
+ *) echo "Cannot handle TARGET_ARCH=$TARGET_ARCH"; exit 1 ;;
esac
echo "Running $COMMAND in $(pwd)"