Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Starting Kit
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
White Rabbit Starting Kit
Commits
dd64e981
Commit
dd64e981
authored
Oct 01, 2019
by
manuel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update the messages showed by the terminal
parent
a6c67c6f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
14 deletions
+19
-14
testAdvDIO.py
test/validation/testAdvDIO.py
+1
-1
testDIO.py
test/validation/testDIO.py
+2
-1
testNIC.py
test/validation/testNIC.py
+14
-10
testWR.py
test/validation/testWR.py
+2
-2
No files found.
test/validation/testAdvDIO.py
View file @
dd64e981
...
@@ -100,8 +100,8 @@ def main(configuration):
...
@@ -100,8 +100,8 @@ def main(configuration):
busIdSpec2
=
configuration
[
"busIdSpec2"
]
busIdSpec2
=
configuration
[
"busIdSpec2"
]
try
:
try
:
print
(
"
\n
Executing 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
:
...
...
test/validation/testDIO.py
View file @
dd64e981
...
@@ -106,8 +106,9 @@ def main(configuration):
...
@@ -106,8 +106,9 @@ def main(configuration):
error
=
False
error
=
False
numberChannels
=
5
numberChannels
=
5
print
(
"
\n
Executing 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
)
...
...
test/validation/testNIC.py
View file @
dd64e981
...
@@ -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
(
"
\n
Warning: 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
i
n host:"
,
hostName
)
print
(
"Configuration ip interface: error
o
n host:"
,
hostName
)
raise
raise
except
:
except
:
print
(
"Configuration ip interface
2: error i
n host:"
,
hostName
)
print
(
"Configuration ip interface
: error o
n 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
(
"
\n
Executing 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
)
...
...
test/validation/testWR.py
View file @
dd64e981
...
@@ -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
=
1
0
numberTimesTry
=
1
5
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
(
"
\n
Executing 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
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment