git://git.onelab.eu
/
tests.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
implement retcod as adverized
[tests.git]
/
system
/
TestPlc.py
diff --git
a/system/TestPlc.py
b/system/TestPlc.py
index
a957cd6
..
7c629f0
100644
(file)
--- a/
system/TestPlc.py
+++ b/
system/TestPlc.py
@@
-68,10
+68,10
@@
def slice_mapper (method):
def ignore_result (method):
def wrappee (self):
# ssh_slice_ignore->ssh_slice
def ignore_result (method):
def wrappee (self):
# ssh_slice_ignore->ssh_slice
- ref_name=method.__name__.replace('_ignore','').replace('
ignor
e_','')
+ ref_name=method.__name__.replace('_ignore','').replace('
forc
e_','')
ref_method=TestPlc.__dict__[ref_name]
result=ref_method(self)
ref_method=TestPlc.__dict__[ref_name]
result=ref_method(self)
- print "Actual
- but ignored -
result for %(ref_name)s is %(result)s"%locals()
+ print "Actual
(but ignored)
result for %(ref_name)s is %(result)s"%locals()
return Ignored (result)
wrappee.__doc__="ignored version of " + method.__name__.replace('_ignore','').replace('ignore_','')
return wrappee
return Ignored (result)
wrappee.__doc__="ignored version of " + method.__name__.replace('_ignore','').replace('ignore_','')
return wrappee
@@
-170,7
+170,7
@@
class TestPlc:
'plc_db_dump' , 'plc_db_restore', SEP,
'check_netflow','check_drl', SEP,
'debug_nodemanager', SEP,
'plc_db_dump' , 'plc_db_restore', SEP,
'check_netflow','check_drl', SEP,
'debug_nodemanager', SEP,
- 'standby_1_through_20',SEP,
+ 'standby_1_through_20',
'yes','no',
SEP,
]
@staticmethod
]
@staticmethod
@@
-252,7
+252,7
@@
class TestPlc:
def vm_root_in_host(self):
if self.options.plcs_use_lxc:
def vm_root_in_host(self):
if self.options.plcs_use_lxc:
- return "/vservers/%s/
rootfs/
"%(self.vservername)
+ return "/vservers/%s/"%(self.vservername)
else:
return "/vservers/%s"%(self.vservername)
else:
return "/vservers/%s"%(self.vservername)
@@
-638,7
+638,7
@@
class TestPlc:
repo_url = os.path.dirname(repo_url)
# invoke initvm (drop support for vs)
repo_url = os.path.dirname(repo_url)
# invoke initvm (drop support for vs)
- script="l
test
-initvm.sh"
+ script="l
build
-initvm.sh"
script_options=""
# pass the vbuild-nightly options to [lv]test-initvm
script_options += " -p %s"%self.options.personality
script_options=""
# pass the vbuild-nightly options to [lv]test-initvm
script_options += " -p %s"%self.options.personality
@@
-1187,9
+1187,10
@@
class TestPlc:
@slice_mapper__tasks(20,19,15)
def ssh_slice_off (self): pass
@slice_mapper__tasks(20,19,15)
def ssh_slice_off (self): pass
- # this is semantically just equivalent to ssh_slice
- # but we use another name so we can exclude it from the tests on the nightly command line
- ssh_slice_again=ssh_slice
+ # use another name so we can exclude/ignore it from the tests on the nightly command line
+ def ssh_slice_again(self): return self.ssh_slice()
+ # note that simply doing ssh_slice_again=ssh_slice would kind od work too
+ # but for some reason the ignore-wrapping thing would not
@slice_mapper
def ssh_slice_basics(self): pass
@slice_mapper
def ssh_slice_basics(self): pass
@@
-1775,3
+1776,7
@@
class TestPlc:
def standby_19(): pass
@standby_generic
def standby_20(): pass
def standby_19(): pass
@standby_generic
def standby_20(): pass
+
+ # convenience for debugging the test logic
+ def yes (self): return True
+ def no (self): return False