Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
f5bf1e51
Commit
f5bf1e51
authored
Dec 14, 2016
by
mshabunin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test run script: added long test filter for valgrind
parent
55921425
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
94 additions
and
1 deletion
+94
-1
run_long.py
modules/ts/misc/run_long.py
+92
-0
run_suite.py
modules/ts/misc/run_suite.py
+2
-1
No files found.
modules/ts/misc/run_long.py
0 → 100644
View file @
f5bf1e51
#!/usr/bin/env python
from
__future__
import
print_function
import
xml.etree.ElementTree
as
ET
from
glob
import
glob
from
pprint
import
PrettyPrinter
as
PP
LONG_TESTS_DEBUG_VALGRIND
=
[
(
'calib3d'
,
'Calib3d_InitUndistortRectifyMap.accuracy'
,
2017.22
),
(
'features2d'
,
'Features2d_Feature2d.no_crash'
,
1235.68
),
(
'ml'
,
'ML_RTrees.regression'
,
1423.47
),
(
'optflow'
,
'DenseOpticalFlow_DeepFlow.ReferenceAccuracy'
,
1360.95
),
(
'optflow'
,
'DenseOpticalFlow_DeepFlow_perf.perf/0'
,
1881.59
),
(
'optflow'
,
'DenseOpticalFlow_DeepFlow_perf.perf/1'
,
5608.75
),
(
'optflow'
,
'DenseOpticalFlow_GlobalPatchColliderDCT.ReferenceAccuracy'
,
5433.84
),
(
'optflow'
,
'DenseOpticalFlow_GlobalPatchColliderWHT.ReferenceAccuracy'
,
5232.73
),
(
'optflow'
,
'DenseOpticalFlow_SimpleFlow.ReferenceAccuracy'
,
1542.1
),
(
'photo'
,
'Photo_Denoising.speed'
,
1484.87
),
(
'photo'
,
'Photo_DenoisingColoredMulti.regression'
,
2447.11
),
(
'rgbd'
,
'Rgbd_Normals.compute'
,
1156.32
),
(
'shape'
,
'Hauss.regression'
,
2625.72
),
(
'shape'
,
'ShapeEMD_SCD.regression'
,
61913.7
),
(
'shape'
,
'Shape_SCD.regression'
,
3311.46
),
(
'tracking'
,
'AUKF.br_mean_squared_error'
,
10764.6
),
(
'tracking'
,
'UKF.br_mean_squared_error'
,
5228.27
),
(
'xfeatures2d'
,
'Features2d_RotationInvariance_Descriptor_BoostDesc_LBGM.regression'
,
1124.51
),
(
'xfeatures2d'
,
'Features2d_RotationInvariance_Descriptor_VGG120.regression'
,
2198.1
),
(
'xfeatures2d'
,
'Features2d_RotationInvariance_Descriptor_VGG48.regression'
,
1958.52
),
(
'xfeatures2d'
,
'Features2d_RotationInvariance_Descriptor_VGG64.regression'
,
2113.12
),
(
'xfeatures2d'
,
'Features2d_RotationInvariance_Descriptor_VGG80.regression'
,
2167.16
),
(
'xfeatures2d'
,
'Features2d_ScaleInvariance_Descriptor_BoostDesc_LBGM.regression'
,
1511.39
),
(
'xfeatures2d'
,
'Features2d_ScaleInvariance_Descriptor_VGG120.regression'
,
1222.07
),
(
'xfeatures2d'
,
'Features2d_ScaleInvariance_Descriptor_VGG48.regression'
,
1059.14
),
(
'xfeatures2d'
,
'Features2d_ScaleInvariance_Descriptor_VGG64.regression'
,
1163.41
),
(
'xfeatures2d'
,
'Features2d_ScaleInvariance_Descriptor_VGG80.regression'
,
1179.06
),
(
'ximgproc'
,
'L0SmoothTest.SplatSurfaceAccuracy'
,
6382.26
),
(
'ximgproc'
,
'L0SmoothTest_perf.perf/17'
,
2052.16
),
(
'ximgproc'
,
'RollingGuidanceFilterTest_perf.perf/59'
,
2760.29
),
(
'ximgproc'
,
'TypicalSet1/RollingGuidanceFilterTest.MultiThreadReproducibility/5'
,
1086.33
),
(
'ximgproc'
,
'TypicalSet1/RollingGuidanceFilterTest.MultiThreadReproducibility/7'
,
1405.05
),
(
'ximgproc'
,
'TypicalSet1/RollingGuidanceFilterTest.SplatSurfaceAccuracy/5'
,
1253.07
),
(
'ximgproc'
,
'TypicalSet1/RollingGuidanceFilterTest.SplatSurfaceAccuracy/7'
,
1599.98
),
]
def
longTestFilter
(
data
):
res
=
[
'*'
,
'-'
]
for
_
,
v
,
_
in
data
:
res
.
append
(
v
)
return
'--gtest_filter={}'
.
format
(
':'
.
join
(
res
))
# Parse one xml file, filter out tests which took less than 'timeLimit' seconds
# Returns tuple: ( <module_name>, [ (<module_name>, <test_name>, <test_time>), ... ] )
def
parseOneFile
(
filename
,
timeLimit
):
tree
=
ET
.
parse
(
filename
)
root
=
tree
.
getroot
()
def
guess
(
s
,
delims
):
for
delim
in
delims
:
tmp
=
s
.
partition
(
delim
)
if
len
(
tmp
[
1
])
!=
0
:
return
tmp
[
0
]
return
None
module
=
guess
(
filename
,
[
'_posix_'
,
'_nt_'
,
'__'
])
or
root
.
get
(
'cv_module_name'
)
if
not
module
:
return
(
None
,
None
)
res
=
[]
for
elem
in
root
.
findall
(
'.//testcase'
):
key
=
'{}.{}'
.
format
(
elem
.
get
(
'classname'
),
elem
.
get
(
'name'
))
val
=
elem
.
get
(
'time'
)
if
float
(
val
)
>=
timeLimit
:
res
.
append
((
module
,
key
,
float
(
val
)))
return
(
module
,
res
)
# Parse all xml files in current folder and combine results into one list
# Print result to the stdout
if
__name__
==
'__main__'
:
LIMIT
=
1000
res
=
[]
xmls
=
glob
(
'*.xml'
)
for
xml
in
xmls
:
print
(
'Parsing file'
,
xml
,
'...'
)
module
,
testinfo
=
parseOneFile
(
xml
,
LIMIT
)
if
not
module
:
print
(
'SKIP'
)
continue
res
.
extend
(
testinfo
)
print
(
'========= RESULTS ========='
)
PP
(
indent
=
4
,
width
=
100
)
.
pprint
(
sorted
(
res
))
modules/ts/misc/run_suite.py
View file @
f5bf1e51
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
import
datetime
import
datetime
from
run_utils
import
*
from
run_utils
import
*
from
run_long
import
LONG_TESTS_DEBUG_VALGRIND
,
longTestFilter
class
TestSuite
(
object
):
class
TestSuite
(
object
):
def
__init__
(
self
,
options
,
cache
):
def
__init__
(
self
,
options
,
cache
):
...
@@ -99,7 +100,7 @@ class TestSuite(object):
...
@@ -99,7 +100,7 @@ class TestSuite(object):
if
self
.
options
.
valgrind_supp
:
if
self
.
options
.
valgrind_supp
:
res
.
append
(
"--suppressions=
%
s"
%
self
.
options
.
valgrind_supp
)
res
.
append
(
"--suppressions=
%
s"
%
self
.
options
.
valgrind_supp
)
res
.
extend
(
self
.
options
.
valgrind_opt
)
res
.
extend
(
self
.
options
.
valgrind_opt
)
return
res
+
cmd
return
res
+
cmd
+
[
longTestFilter
(
LONG_TESTS_DEBUG_VALGRIND
)]
return
cmd
return
cmd
def
tryCommand
(
self
,
cmd
):
def
tryCommand
(
self
,
cmd
):
...
...
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