Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
Production Test Suite
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
9
Issues
9
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
Production Test Suite
Commits
be556c4c
Commit
be556c4c
authored
Oct 26, 2011
by
Matthieu Cattin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
For test03 add print to log if test is ok, move error print to the end (after stdio redirection).
parent
93690ffe
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
test03.py
test/fmcadc100m14b4cha/python/test03.py
+10
-6
No files found.
test/fmcadc100m14b4cha/python/test03.py
View file @
be556c4c
...
...
@@ -48,7 +48,7 @@ def main (default_directory='.'):
sys
.
stdin
=
sys
.
__stdin__
;
# Initialize error variable, disable triggers and make sure no acquisition is running
error
=
0
error
=
[
0
,
0
]
fmc
.
set_trig_config
(
1
,
0
,
0
,
0
,
0
,
0
,
0
)
fmc
.
stop_acq
()
...
...
@@ -67,8 +67,7 @@ def main (default_directory='.'):
if
(
ask
==
"N"
):
# LED ON fail
print
(
"One or both LEDs not switching ON. Check for soldering or connection problem, grounded control line."
)
errors
+=
1
errors
[
0
]
+=
1
############################################################################
# Test LEDs OFF
...
...
@@ -85,16 +84,21 @@ def main (default_directory='.'):
if
(
ask
==
"N"
):
# LED OFF fail
print
(
"One or both LEDs not switching OFF. Check for short-cut."
)
error
+=
1
error
[
0
]
+=
1
# Standard in/out redirection
sys
.
stdout
=
tmp_stdout
;
sys
.
stdin
=
tmp_stdin
;
# Check if an error occured during LED test
if
(
error
!=
0
):
if
(
error
!=
[
0
]
*
2
):
if
(
error
[
0
]
!=
0
):
print
(
"One or both LEDs not switching ON. Check for soldering or connection problem, grounded control line."
)
if
(
error
[
1
]
!=
0
):
print
(
"One or both LEDs not switching OFF. Check for short-cut."
)
raise
PtsError
(
'An error occured during LEDs test, check log for details.'
)
else
:
print
(
'LEDs are working ok.'
)
if
__name__
==
'__main__'
:
...
...
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