Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
Conv TTL Blocking - Testing
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
Conv TTL Blocking - Testing
Commits
8e8168eb
Commit
8e8168eb
authored
Jan 18, 2019
by
Dimitris Lampridis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
write file name as first line in log files
parent
fe52dd88
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
8 deletions
+12
-8
jpts.py
fm/pts/python/jpts.py
+12
-8
No files found.
fm/pts/python/jpts.py
View file @
8e8168eb
...
...
@@ -152,13 +152,13 @@ if __name__ == '__main__':
now
=
now
.
replace
(
" "
,
"-"
)
now
=
now
.
replace
(
":"
,
"-"
)
l
gf
=
"
%
s/log/
%
s-
%
s-
%
s-
%
s-
%1
d.log"
%
(
dir
,
bnm
,
sno
,
xno
,
now
,
lun
)
inf
=
"
%
s/log/
%
s-
%
s-
%
s-
%
s-
%1
d.inf"
%
(
dir
,
bnm
,
sno
,
xno
,
now
,
lun
)
l
og_file
=
"
%
s/log/
%
s-
%
s-
%
s-
%
s-
%1
d.log"
%
(
dir
,
bnm
,
sno
,
xno
,
now
,
lun
)
inf
_file
=
"
%
s/log/
%
s-
%
s-
%
s-
%
s-
%1
d.inf"
%
(
dir
,
bnm
,
sno
,
xno
,
now
,
lun
)
# Open the log and info files
try
:
log
=
open
(
l
gf
,
"w"
)
inf
=
open
(
inf
,
"w"
)
log
=
open
(
l
og_file
,
"w"
)
inf
=
open
(
inf
_file
,
"w"
)
except
Exception
,
e
:
msg
=
"Exception:
%
s"
%
(
e
)
...
...
@@ -168,11 +168,15 @@ if __name__ == '__main__':
# and print them to console if in debug mode
if
options
.
debug
:
print
"
\n
"
print
"Log file is:
%
s"
%
l
gf
print
"Inf file is:
%
s"
%
inf
print
"Log file is:
%
s"
%
l
og_file
print
"Inf file is:
%
s"
%
inf
_file
print
"
\n
"
# write file name as first line in file
inf
.
write
(
inf_file
+
'
\n
'
)
log
.
write
(
log_file
+
'
\n
'
)
# Open up a bus object, can be one of following (depending on tested device):
# * VME -- VME board (SVEC, etc.)
# * PCI -- PCI board (SPEC, etc.)
...
...
@@ -294,8 +298,8 @@ if __name__ == '__main__':
# Print info file to console if in debug mode
if
options
.
debug
:
print
"Debug: printing:
%
s"
%
(
inf
)
inf
=
open
(
inf
,
"r"
)
print
"Debug: printing:
%
s"
%
(
inf
_file
)
inf
=
open
(
inf
_file
,
"r"
)
try
:
for
line
in
inf
:
l
=
line
.
split
(
"
\n
"
)
...
...
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