Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Mesa
piglit
Commits
3f0804af
Commit
3f0804af
authored
Sep 28, 2008
by
Nicolai Hähnle
Browse files
Measure time taken for tests
parent
a6ee9840
Changes
1
Hide whitespace changes
Inline
Side-by-side
framework/core.py
View file @
3f0804af
...
...
@@ -160,7 +160,7 @@ class GroupResult(dict):
class
TestrunResult
:
def
__init__
(
self
,
*
args
):
self
.
name
=
''
self
.
globalkeys
=
[
'name'
,
'href'
,
'glxinfo'
,
'lspci'
]
self
.
globalkeys
=
[
'name'
,
'href'
,
'glxinfo'
,
'lspci'
,
'time'
]
self
.
results
=
GroupResult
()
def
allTestResults
(
self
):
...
...
@@ -292,7 +292,11 @@ class Test:
if
env
.
execute
:
try
:
print
"Test: %(path)s"
%
locals
()
time_start
=
time
.
time
()
result
=
self
.
run
()
time_end
=
time
.
time
()
if
'time'
not
in
result
:
result
[
'time'
]
=
time_end
-
time_start
if
'result'
not
in
result
:
result
[
'result'
]
=
'fail'
if
not
isinstance
(
result
,
TestResult
):
...
...
@@ -353,7 +357,10 @@ class TestProfile:
self
.
sleep
=
0
def
run
(
self
,
env
):
time_start
=
time
.
time
()
self
.
tests
.
doRun
(
env
,
''
)
time_end
=
time
.
time
()
print
>>
env
.
file
,
"time:"
,(
time_end
-
time_start
)
#############################################################################
##### Loaders
...
...
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