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
70684643
Commit
70684643
authored
Jun 21, 2011
by
Samuel Iglesias Gonsalvez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tps: added question-to-operator feature in case of repeated test in the same board
parent
26fd2872
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
3 deletions
+24
-3
tps.py
tps.py
+24
-3
No files found.
tps.py
View file @
70684643
...
...
@@ -16,6 +16,7 @@ import datetime
import
random
import
warnings
import
zipfile
import
string
from
ConfigParser
import
ConfigParser
,
NoOptionError
from
optparse
import
OptionParser
...
...
@@ -188,7 +189,26 @@ class Suite(object):
return
self
.
run_
def
search_prev_logs
(
self
)
:
"""Search for previous logs and ask the operator why repeat the test"""
for
filename
in
os
.
listdir
(
self
.
log_path
):
if
string
.
find
(
filename
,
"run"
)
==
-
1
:
continue
;
try
:
serial
=
re
.
match
(
r'^.*_([^_.]+)\.txt$'
,
filename
)
.
group
(
1
)
if
serial
==
self
.
serial
:
self
.
comment
=
raw_input
(
'Previous logs for this board have been recorded.
\n
Why do you want to repeat the test? (press ENTER to finish) :
\n
'
)
break
;
except
AttributeError
:
pass
def
run
(
self
):
self
.
comment
=
""
self
.
search_prev_logs
();
sequence
=
self
.
validate_and_compute_run
()
ts
=
timestamp
()
runid
=
sha
(
self
.
board
+
':'
+
self
.
serial
+
':'
+
ts
)
...
...
@@ -212,9 +232,10 @@ class Suite(object):
' board = {0}
\n
'
' serial = {1}
\n
'
' optional serial = {2}
\n
'
' timestamp = {3}
\n
'
' runid = {4}
\n
'
.
format
(
self
.
board
,
self
.
serial
,
self
.
extra_serial
,
ts
,
runid
))
' comment = {3}
\n
'
' timestamp = {4}
\n
'
' runid = {5}
\n
'
.
format
(
self
.
board
,
self
.
serial
,
self
.
extra_serial
,
self
.
comment
,
ts
,
runid
))
failures
=
[]
for
test
in
sequence
:
try
:
...
...
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