Commit dd64e981 authored by manuel's avatar manuel

Update the messages showed by the terminal

parent a6c67c6f
...@@ -100,8 +100,8 @@ def main(configuration): ...@@ -100,8 +100,8 @@ def main(configuration):
busIdSpec2 = configuration["busIdSpec2"] busIdSpec2 = configuration["busIdSpec2"]
try: try:
print("\nExecuting advanced DIO test")
print("This test needs White Rabbit working") print("This test needs White Rabbit working")
print("Executing advanced DIO test")
testAdvDIO(hostName1,userName1,password1,interfaceName1,busIdSpec1,hostName2,userName2,password2,interfaceName2,busIdSpec2) testAdvDIO(hostName1,userName1,password1,interfaceName1,busIdSpec1,hostName2,userName2,password2,interfaceName2,busIdSpec2)
print("Test advanced DIO: successful") print("Test advanced DIO: successful")
except: except:
......
...@@ -106,8 +106,9 @@ def main(configuration): ...@@ -106,8 +106,9 @@ def main(configuration):
error = False error = False
numberChannels = 5 numberChannels = 5
print("\nExecuting DIO test")
print("This test needs White Rabbit working") print("This test needs White Rabbit working")
print("Executing DIO test")
for i in range(numberChannels): for i in range(numberChannels):
error |= tryChannel(hostName1,userName1,password1,busIdSpec1,hostName2,userName2,password2,busIdSpec2,i) error |= tryChannel(hostName1,userName1,password1,busIdSpec1,hostName2,userName2,password2,busIdSpec2,i)
......
...@@ -28,24 +28,27 @@ def configurationIpInterface(hostName,userName,password,busId,interfaceName,ip): ...@@ -28,24 +28,27 @@ def configurationIpInterface(hostName,userName,password,busId,interfaceName,ip):
""" """
try: try:
sshCmd = SshCmd() sshCmd = SshCmd()
#check network manager
command = "sudo service network-manager status | grep running"
value = sshCmd.exec(hostName,command,userName,password)
if ("running" in value):
print("\nWarning: The network manager is running on host %s, the test may not work correctly\n" % ip)
command = "sudo ifconfig " + interfaceName + " " + ip command = "sudo ifconfig " + interfaceName + " " + ip
sshCmd.exec(hostName,command,userName,password) sshCmd.exec(hostName,command,userName,password)
command = "ifconfig | grep " + ip + " | wc -l" command = "ifconfig | grep " + ip + " | wc -l"
value = sshCmd.exec(hostName,command,userName,password) value = sshCmd.exec(hostName,command,userName,password)
if (int(value) == 1): if (int(value) == 1):
vuart = Vuart(hostName,userName,password,busId) print("Configuration ip interface: ok on host:",hostName)
value = vuart.setIp(ip) else:
raise
if (("IP-address: " + str(ip)) in value):
print("Configuration ip interface: ok in host:",hostName)
else:
raise
except SshCmdException as e: except SshCmdException as e:
sshCmd.printSshErrorCommand(e.strError,command) sshCmd.printSshErrorCommand(e.strError,command)
print("Configuration ip interface: error in host:",hostName) print("Configuration ip interface: error on host:",hostName)
raise raise
except: except:
print("Configuration ip interface2: error in host:",hostName) print("Configuration ip interface: error on host:",hostName)
raise raise
...@@ -107,7 +110,8 @@ def main(configuration): ...@@ -107,7 +110,8 @@ def main(configuration):
interfaceName2 = configuration["interfaceName2"] interfaceName2 = configuration["interfaceName2"]
try: try:
print("Executing NIC test") print("\nExecuting NIC test")
print("This test needs the network manager stopped")
configurationIpInterface(hostName1,userName1,password1,busIdSpec1,interfaceName1,ipWR1) configurationIpInterface(hostName1,userName1,password1,busIdSpec1,interfaceName1,ipWR1)
configurationIpInterface(hostName2,userName2,password2,busIdSpec2,interfaceName2,ipWR2) configurationIpInterface(hostName2,userName2,password2,busIdSpec2,interfaceName2,ipWR2)
testIperf(hostName1,userName1,password1,ipWR2,hostName2,userName2,password2) testIperf(hostName1,userName1,password1,ipWR2,hostName2,userName2,password2)
......
...@@ -84,7 +84,7 @@ def checkTrackPhase(hostName,userName,password,busId): ...@@ -84,7 +84,7 @@ def checkTrackPhase(hostName,userName,password,busId):
""" """
try: try:
vuart = Vuart(hostName,userName,password,busId) vuart = Vuart(hostName,userName,password,busId)
numberTimesTry = 10 numberTimesTry = 15
i = 0 i = 0
while not vuart.isTrackPhase(): while not vuart.isTrackPhase():
if (i == numberTimesTry): if (i == numberTimesTry):
...@@ -114,7 +114,7 @@ def main(configuration): ...@@ -114,7 +114,7 @@ def main(configuration):
interfaceName2 = configuration["interfaceName2"] interfaceName2 = configuration["interfaceName2"]
try: try:
print("Executing WR test") print("\nExecuting WR test")
masterSpec1 = whoIsMaster(hostName1,userName1,password1,busIdSpec1) masterSpec1 = whoIsMaster(hostName1,userName1,password1,busIdSpec1)
masterSpec2 = whoIsMaster(hostName2,userName2,password2,busIdSpec2) masterSpec2 = whoIsMaster(hostName2,userName2,password2,busIdSpec2)
if (masterSpec1 == 1 or masterSpec2 == 1): if (masterSpec1 == 1 or masterSpec2 == 1):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment