Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
PandABox-tst
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
PandABox-tst
Commits
7ef7f90d
Commit
7ef7f90d
authored
Feb 28, 2017
by
Christopher Turner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up userinpuit for plugged and unplugged tests
parent
a6462259
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
50 additions
and
26 deletions
+50
-26
LvdsUnplugged.py
tests/LvdsUnplugged.py
+8
-5
PandATest.py
tests/PandATest.py
+5
-1
PluggedTests.py
tests/PluggedTests.py
+10
-3
TtlUnplugged.py
tests/TtlUnplugged.py
+5
-4
UnpluggedTests.py
tests/UnpluggedTests.py
+10
-3
lvds.py
tests/lvds.py
+6
-5
ttl.py
tests/ttl.py
+6
-5
No files found.
tests/LvdsUnplugged.py
View file @
7ef7f90d
...
...
@@ -4,15 +4,19 @@ import PandATest
class
LvdsUnplugged
(
PandATest
.
PandATest
):
def
test_code
(
self
):
inputs
=
[
1
,
2
]
outputs
=
[
1
,
2
]
def
__init__
(
self
,
*
args
,
**
kwargs
):
super
(
LvdsUnplugged
,
self
)
.
__init__
(
*
args
,
**
kwargs
)
def
get_user_input
(
self
):
inputy
=
'.'
while
inputy
not
in
[
''
]:
print
"Loopback connecters for LVDS NOT connected, OK ? [return]"
inputy
=
raw_input
()
def
test_code
(
self
):
inputs
=
[
1
,
2
]
outputs
=
[
1
,
2
]
self
.
logger
.
info
(
"UNPLUGGED"
)
for
o
in
outputs
:
self
.
set_output
(
'LVDSOUT'
,
o
,
'.VAL=BITS.ONE'
,
'OK'
)
...
...
@@ -24,5 +28,4 @@ class LvdsUnplugged(PandATest.PandATest):
self
.
test_result
.
append
(
self
.
check_input
(
'LVDSIN'
,
o
,
0
,
i
,
o
,
1
,
1
))
return
not
all
(
self
.
test_result
)
return
not
all
(
self
.
test_result
)
\ No newline at end of file
tests/PandATest.py
View file @
7ef7f90d
...
...
@@ -18,6 +18,7 @@ class PandATest(object):
return
rootLogger
def
run
(
self
):
self
.
get_user_input
()
self
.
logger
.
info
(
"TEST START"
)
result
=
self
.
test_code
()
if
result
==
0
:
...
...
@@ -69,4 +70,7 @@ class PandATest(object):
self
.
__class__
.
__name__
,
self
.
blocknum
,
error_count
)]
return
summary
\ No newline at end of file
return
summary
def
get_user_input
(
self
):
pass
\ No newline at end of file
tests/PluggedTests.py
View file @
7ef7f90d
...
...
@@ -11,8 +11,9 @@ class PluggedTests(PandATest.PandATest):
self
.
tp
=
ttl
.
ttl
(
*
args
,
**
kwargs
)
def
test_code
(
self
):
self
.
lp
.
run
()
self
.
tp
.
run
()
self
.
lp
.
test_code
()
self
.
tp
.
test_code
()
#NEED TO RETURN IF PASSED OR NOT..
def
get_summary
(
self
):
summary
=
[
"{:<10}{:<10} ERRORS: {}"
.
format
(
...
...
@@ -24,4 +25,10 @@ class PluggedTests(PandATest.PandATest):
self
.
blocknum
,
self
.
tp
.
test_result
.
count
(
0
)),
]
return
summary
\ No newline at end of file
return
summary
def
get_user_input
(
self
):
inputy
=
'.'
while
inputy
not
in
[
''
]:
print
"Loopback connecters connected, OK ? [return]"
inputy
=
raw_input
()
\ No newline at end of file
tests/TtlUnplugged.py
View file @
7ef7f90d
...
...
@@ -7,15 +7,16 @@ class TtlUnplugged(PandATest.PandATest):
def
__init__
(
self
,
*
args
,
**
kwargs
):
super
(
TtlUnplugged
,
self
)
.
__init__
(
*
args
,
**
kwargs
)
def
test_code
(
self
):
outputs
=
[
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
10
]
inputs
=
[
1
,
2
,
3
,
4
,
5
,
6
]
def
get_user_input
(
self
):
inputy
=
'.'
while
inputy
not
in
[
''
]:
print
"Loopback connecters for TTL NOT connected, OK ? [return]"
inputy
=
raw_input
()
def
test_code
(
self
):
outputs
=
[
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
10
]
inputs
=
[
1
,
2
,
3
,
4
,
5
,
6
]
self
.
logger
.
info
(
"UNPLUGGED"
)
for
o
in
outputs
:
self
.
set_output
(
'TTLOUT'
,
o
,
'.VAL=BITS.ONE'
,
'OK'
)
...
...
tests/UnpluggedTests.py
View file @
7ef7f90d
...
...
@@ -11,8 +11,9 @@ class UnpluggedTests(PandATest.PandATest):
self
.
tu
=
TtlUnplugged
.
TtlUnplugged
(
*
args
,
**
kwargs
)
def
test_code
(
self
):
self
.
lu
.
run
()
self
.
tu
.
run
()
self
.
lu
.
test_code
()
self
.
tu
.
test_code
()
#NEED TO RETURN IF PASSED OR NOT..
def
get_summary
(
self
):
summary
=
[
"{:<10}{:<10} ERRORS: {}"
.
format
(
...
...
@@ -24,4 +25,10 @@ class UnpluggedTests(PandATest.PandATest):
self
.
blocknum
,
self
.
tu
.
test_result
.
count
(
0
)),
]
return
summary
\ No newline at end of file
return
summary
def
get_user_input
(
self
):
inputy
=
'.'
while
inputy
not
in
[
''
]:
print
"Loopback connecters NOT connected, OK ? [return]"
inputy
=
raw_input
()
\ No newline at end of file
tests/lvds.py
View file @
7ef7f90d
...
...
@@ -4,6 +4,12 @@ import PandATest
class
lvds
(
PandATest
.
PandATest
):
def
get_user_input
(
self
):
inputy
=
'.'
while
inputy
not
in
[
''
]:
print
"Loopback connecters for LVDS connected, OK ? [return]"
inputy
=
raw_input
()
def
test_code
(
self
):
outputs
=
[
1
,
2
]
inputs
=
[
1
,
2
]
...
...
@@ -12,11 +18,6 @@ class lvds(PandATest.PandATest):
outputs
[
1
]:
inputs
[
1
]
}
inputy
=
'.'
while
inputy
not
in
[
''
]:
print
"Loopback connecters for LVDS connected, OK ? [return]"
inputy
=
raw_input
()
self
.
logger
.
info
(
"PLUGGED"
)
for
outp
,
inp
in
channel_connect
.
iteritems
():
self
.
set_output
(
'LVDSOUT'
,
outp
,
'.VAL=BITS.ONE'
,
'OK'
)
...
...
tests/ttl.py
View file @
7ef7f90d
...
...
@@ -7,6 +7,12 @@ class ttl(PandATest.PandATest):
def
__init__
(
self
,
*
args
,
**
kwargs
):
super
(
ttl
,
self
)
.
__init__
(
*
args
,
**
kwargs
)
def
get_user_input
(
self
):
inputy
=
'.'
while
inputy
not
in
[
''
]:
print
"Loopback connecters for TTL connected, OK ? [return]"
inputy
=
raw_input
()
def
test_code
(
self
):
outputs
=
[
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
10
]
inputs
=
[
1
,
2
,
3
,
4
,
5
,
6
]
...
...
@@ -23,11 +29,6 @@ class ttl(PandATest.PandATest):
outputs
[
9
]:
inputs
[
3
]
}
inputy
=
'.'
while
inputy
not
in
[
''
]:
print
"Loopback connecters for TTL connected, OK ? [return]"
inputy
=
raw_input
()
self
.
logger
.
info
(
"PLUGGED"
)
for
outp
,
inp
in
channel_connect
.
iteritems
():
self
.
set_output
(
'TTLOUT'
,
outp
,
'.VAL=BITS.ONE'
,
'OK'
)
...
...
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