Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FMC ADC 100M 14b 4cha - Testing
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
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
FMC ADC 100M 14b 4cha - Testing
Commits
9573b430
Commit
9573b430
authored
May 26, 2011
by
Juan David González Cobas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tps: normalize log file names for easy cataloguing
parent
42ced838
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
tps.py
tps.py
+10
-5
No files found.
tps.py
View file @
9573b430
...
...
@@ -17,8 +17,8 @@ from sha import sha as sha160
from
tpsexcept
import
*
default_config_file
=
'tpsdefault.cfg'
default_log_pattern
=
'tps_
%(board)
s_
%(serial)
s_
%(number)
s_
%(timestamp)
s
.txt'
default_log_name
=
'tps_run_{
0}_{1}_{2}_{3
}.txt'
default_log_pattern
=
'tps_
tst_{runid}_{timestamp}_{board}_{serial}_{number}
.txt'
default_log_name
=
'tps_run_{
runid}_{timestamp}_{board}_{serial
}.txt'
default_test_pattern
=
r'test[0-9][0-9]'
default_test_syntax
=
r'(test)?(\d\d)'
...
...
@@ -150,7 +150,10 @@ class Suite(object):
sequence
=
self
.
validate_and_compute_run
()
ts
=
timestamp
()
runid
=
sha
(
self
.
board
+
':'
+
self
.
serial
+
':'
+
ts
)
logfilename
=
self
.
log_name
.
format
(
self
.
board
,
self
.
serial
,
ts
,
runid
)
logfilename
=
self
.
log_name
.
format
(
board
=
self
.
board
,
serial
=
self
.
serial
,
timestamp
=
ts
,
runid
=
runid
)
logfilename
=
os
.
path
.
join
(
self
.
log_path
,
logfilename
)
log
=
file
(
logfilename
,
'wb'
)
...
...
@@ -168,8 +171,10 @@ class Suite(object):
try
:
testname
=
os
.
path
.
splitext
(
os
.
path
.
basename
(
test
))[
0
]
shortname
=
re
.
match
(
'test(
\
d
\
d)'
,
testname
)
.
group
(
1
)
logname
=
self
.
log_pattern
%
dict
(
board
=
self
.
board
,
serial
=
self
.
serial
,
timestamp
=
ts
,
logname
=
self
.
log_pattern
.
format
(
board
=
self
.
board
,
serial
=
self
.
serial
,
timestamp
=
timestamp
(),
runid
=
runid
,
number
=
shortname
)
logname
=
os
.
path
.
join
(
self
.
log_path
,
logname
)
log
.
write
(
'------------------------
\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