From: Thierry Parmentelat Date: Wed, 4 Jul 2012 07:10:16 +0000 (+0200) Subject: tweak run export for multi-plcs, only report about the first one X-Git-Tag: tests-5.1-7~6 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=5f24cdce803275b3898a7408596e91cf800a34bc;p=tests.git tweak run export for multi-plcs, only report about the first one --- diff --git a/system/TestPlc.py b/system/TestPlc.py index fe0ec2e..2550f4b 100644 --- a/system/TestPlc.py +++ b/system/TestPlc.py @@ -389,9 +389,16 @@ class TestPlc: self.show_pass (2) return True + # uggly hack to make sure 'run export' only reports about the 1st plc + # to avoid confusion - also we use 'inri_slice1' in various aliases.. + exported_id=1 def export (self): "print cut'n paste-able stuff to export env variables to your shell" # guess local domain from hostname + if TestPlc.exported_id>1: + print "export GUESTHOSTNAME%d=%s"%(TestPlc.exported_id,self.plc_spec['vservername']) + return + TestPlc.exported_id+=1 domain=socket.gethostname().split('.',1)[1] fqdn="%s.%s"%(self.plc_spec['host_box'],domain) print "export BUILD=%s"%self.options.buildname