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
498246a9
Commit
498246a9
authored
Aug 29, 2013
by
Matthieu Cattin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test31: Move program argument read out of main function.
Was causing trouble when called from pts.
parent
021bfdf4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
12 deletions
+15
-12
test31.py
test/fmcadc100m14b4cha/python/test31.py
+15
-12
No files found.
test/fmcadc100m14b4cha/python/test31.py
View file @
498246a9
...
...
@@ -42,7 +42,7 @@ test31: Fix EEPROM content:
Note: Requires test00.py to run first to load the firmware!
"""
def
main
(
default_directory
=
'.'
):
def
main
(
default_directory
=
'.'
,
offset
=
"0x1000"
,
filename
=
"calibration.sdb"
):
# Constants declaration
TEST_NB
=
31
...
...
@@ -62,16 +62,8 @@ def main (default_directory='.'):
NEW_EEPROM_BIN_FILENAME
=
os
.
path
.
join
(
default_directory
,
NEW_EEPROM_BIN_FILENAME
)
EEPROM_SIZE
=
8192
# in Bytes
arg_nb
=
len
(
sys
.
argv
[
1
:])
if
arg_nb
==
2
:
BAD_SDB_DIR_OFFSET
=
sys
.
argv
[
1
]
BAD_CALIBR_BIN_FILENAME
=
sys
.
argv
[
2
]
elif
arg_nb
>
2
:
print
(
"Too many arguments."
)
sys
.
exit
()
else
:
BAD_SDB_DIR_OFFSET
=
"0x1000"
BAD_CALIBR_BIN_FILENAME
=
"calibration.sdb"
BAD_SDB_DIR_OFFSET
=
offset
BAD_CALIBR_BIN_FILENAME
=
filename
start_test_time
=
time
.
time
()
...
...
@@ -350,4 +342,15 @@ P1 Bank A nb signal=%d, P1 Bank B nb signal=%d, P2 Bank A nb signal=%d, P2 Bank
if
__name__
==
'__main__'
:
main
()
arg_nb
=
len
(
sys
.
argv
[
1
:])
if
arg_nb
==
2
:
offset
=
sys
.
argv
[
1
]
filename
=
sys
.
argv
[
2
]
elif
arg_nb
>
2
:
print
(
"Too many arguments."
)
sys
.
exit
()
else
:
offset
=
"0x1000"
filename
=
"calibration.sdb"
main
(
'.'
,
offset
,
filename
)
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