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
db87d3d1
Commit
db87d3d1
authored
Sep 24, 2014
by
Tomasz Wlostowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test06: keep a copy of the EEPROM contents with the test report
parent
41f138d5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
6 deletions
+28
-6
test06.py
test/fmcdelay1ns4cha/python/test06.py
+28
-6
No files found.
test/fmcdelay1ns4cha/python/test06.py
100755 → 100644
View file @
db87d3d1
...
...
@@ -10,6 +10,9 @@ from ptsexcept import *
from
utilFunctions
import
*
import
sys
import
time
import
subprocess
import
datetime
"""
test06: Writes and validates the card's EEPROM.
...
...
@@ -28,15 +31,34 @@ def main (card=None, default_directory='.',suite=None):
print
(
"Programming SDB filesystem into mezzanine's EEPROM..."
)
os
.
system
(
"./
%
s/gensdbfs
%
s/sdbfs
%
s/fd-eeprom.bin"
%
(
default_directory
,
default_directory
,
default_directory
))
#subprocess.call(["./%s/gensdbfs %s/sdbfs %s/fd-eeprom.bin" % (default_directory, default_directory, default_directory)])
returnval
=
os
.
system
(
"./
%
s/gensdbfs
%
s/sdbfs
%
s/fd-eeprom.bin"
%
(
default_directory
,
default_directory
,
default_directory
))
if
(
returnval
!=
0
):
print
"swapfile not enabled, run out of memory"
raise
PtsError
(
'An error occurred during writing the calibration EEPROM, check log for details'
)
else
:
print
(
"eeprom file created in
%
s"
%
(
default_directory
))
# run eeprom writing procedure
card
.
write_eeprom_from_file
(
"
%
s/fd-eeprom.bin"
%
default_directory
,
0
)
# wait for file to be visible on disk
time
.
sleep
(
1
)
if
(
card
.
get_return_value
()
==
-
1
):
raise
PtsError
(
'An error occurred during writing the calibration EEPROM, check log for details'
)
# run eeprom writing procedure
card
.
write_eeprom_from_file
(
"
%
s/fd-eeprom.bin"
%
default_directory
,
0
)
print
(
"eeprom file written to eeprom"
)
eeprom
=
"/home/user/pts/log_fmcdelay1ns4cha/eeprom/fd-eeprom_
%
s.bin"
%
datetime
.
datetime
.
now
()
#print eeprom
os
.
rename
(
"
%
s/fd-eeprom.bin"
%
default_directory
,
"
%
s"
%
eeprom
)
print
(
"eeprom file moved to
%
s"
%
eeprom
)
#os.remove("%s/fd-eeprom.bin" % (default_directory))
if
(
card
.
get_return_value
()
==
-
1
):
raise
PtsError
(
'An error occurred during writing the calibration EEPROM, check log for details'
)
print
(
"Programming OK."
)
print
(
"Programming OK."
)
# restore stderr and display debug information from file
restore_stderr
(
new_stderr
,
default_directory
)
...
...
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