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
db3ba981
Commit
db3ba981
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
3c76940b
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 @
db3ba981
...
@@ -16,6 +16,7 @@ import datetime
...
@@ -16,6 +16,7 @@ import datetime
import
random
import
random
import
warnings
import
warnings
import
zipfile
import
zipfile
import
string
from
ConfigParser
import
ConfigParser
,
NoOptionError
from
ConfigParser
import
ConfigParser
,
NoOptionError
from
optparse
import
OptionParser
from
optparse
import
OptionParser
...
@@ -188,7 +189,26 @@ class Suite(object):
...
@@ -188,7 +189,26 @@ class Suite(object):
return
self
.
run_
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
):
def
run
(
self
):
self
.
comment
=
""
self
.
search_prev_logs
();
sequence
=
self
.
validate_and_compute_run
()
sequence
=
self
.
validate_and_compute_run
()
ts
=
timestamp
()
ts
=
timestamp
()
runid
=
sha
(
self
.
board
+
':'
+
self
.
serial
+
':'
+
ts
)
runid
=
sha
(
self
.
board
+
':'
+
self
.
serial
+
':'
+
ts
)
...
@@ -212,9 +232,10 @@ class Suite(object):
...
@@ -212,9 +232,10 @@ class Suite(object):
' board = {0}
\n
'
' board = {0}
\n
'
' serial = {1}
\n
'
' serial = {1}
\n
'
' optional serial = {2}
\n
'
' optional serial = {2}
\n
'
' timestamp = {3}
\n
'
' comment = {3}
\n
'
' runid = {4}
\n
'
.
format
(
' timestamp = {4}
\n
'
self
.
board
,
self
.
serial
,
self
.
extra_serial
,
ts
,
runid
))
' runid = {5}
\n
'
.
format
(
self
.
board
,
self
.
serial
,
self
.
extra_serial
,
self
.
comment
,
ts
,
runid
))
failures
=
[]
failures
=
[]
for
test
in
sequence
:
for
test
in
sequence
:
try
:
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