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
cosmetic changes only
[tests.git]
/
system
/
TestSliver.py
diff --git
a/system/TestSliver.py
b/system/TestSliver.py
index
e9aa7aa
..
a82b27b
100644
(file)
--- a/
system/TestSliver.py
+++ b/
system/TestSliver.py
@@
-34,24
+34,24
@@
class TestSliver:
def name (self):
return "%s@%s"%(self.test_slice.name(),self.test_node.name())
def name (self):
return "%s@%s"%(self.test_slice.name(),self.test_node.name())
- def check_initscript_stamp(self,stamp):
- utils.header("Checking for initscript stamp %s on sliver %s"%(stamp,self.name()))
+ def check_initscript_stamp(self,
stamp):
+ utils.header("Checking for initscript stamp %s on sliver %s"%(stamp,
self.name()))
return self.test_ssh.run("ls -l /var/tmp/%s.stamp"%stamp)==0
return self.test_ssh.run("ls -l /var/tmp/%s.stamp"%stamp)==0
- def run_tcp_server (self,
port,
timeout=10):
+ def run_tcp_server (self,
port,
timeout=10):
server_command = "./tcptest.py server -p %d -t %d"%(port,timeout)
return self.test_ssh.copy("tcptest.py")==0 and \
server_command = "./tcptest.py server -p %d -t %d"%(port,timeout)
return self.test_ssh.copy("tcptest.py")==0 and \
- self.test_ssh.run(server_command,background=True)==0
+ self.test_ssh.run(server_command,
background=True)==0
- def run_tcp_client (self,
servername,port,
retry=5):
- client_command="./tcptest.py client -a %s -p %d"%(servername,port)
+ def run_tcp_client (self,
servername, port,
retry=5):
+ client_command="./tcptest.py client -a %s -p %d"%(servername,
port)
if self.test_ssh.copy("tcptest.py")!=0: return False
utils.header ("tcp client - first attempt")
if self.test_ssh.copy("tcptest.py")!=0: return False
utils.header ("tcp client - first attempt")
- if self.test_ssh.run(client_command,background=False)==0: return True
+ if self.test_ssh.run(client_command,
background=False)==0: return True
# if first try has failed, wait for <retry> s an try again
time.sleep(retry)
utils.header ("tcp client - second attempt")
# if first try has failed, wait for <retry> s an try again
time.sleep(retry)
utils.header ("tcp client - second attempt")
- if self.test_ssh.run(client_command,background=False)==0: return True
+ if self.test_ssh.run(client_command,
background=False)==0: return True
return False
# use the node's main ssh root entrance, as the slice entrance might be down
return False
# use the node's main ssh root entrance, as the slice entrance might be down