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
e23d62b8
Commit
e23d62b8
authored
Sep 14, 2010
by
Vadim Pisarevsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added blacklist support in the OpenCV test engine for centralized exclusion of failed tests
parent
652d0c2a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
9 deletions
+25
-9
cxcoretest_main.cpp
tests/cxcore/src/cxcoretest_main.cpp
+7
-1
cxts.cpp
tests/cxts/cxts.cpp
+16
-6
cxts.h
tests/cxts/cxts.h
+2
-2
No files found.
tests/cxcore/src/cxcoretest_main.cpp
View file @
e23d62b8
...
@@ -43,9 +43,15 @@
...
@@ -43,9 +43,15 @@
CvTS
test_system
;
CvTS
test_system
;
const
char
*
blacklist
[]
=
{
//"matrix-invert",
0
};
int
main
(
int
argc
,
char
**
argv
)
int
main
(
int
argc
,
char
**
argv
)
{
{
return
test_system
.
run
(
argc
,
argv
);
return
test_system
.
run
(
argc
,
argv
,
blacklist
);
}
}
/* End of file. */
/* End of file. */
tests/cxts/cxts.cpp
View file @
e23d62b8
...
@@ -1302,7 +1302,7 @@ static int CV_CDECL cmp_test_names( const void* a, const void* b )
...
@@ -1302,7 +1302,7 @@ static int CV_CDECL cmp_test_names( const void* a, const void* b )
return
strcmp
(
(
*
(
const
CvTest
**
)
a
)
->
get_name
(),
(
*
(
const
CvTest
**
)
b
)
->
get_name
()
);
return
strcmp
(
(
*
(
const
CvTest
**
)
a
)
->
get_name
(),
(
*
(
const
CvTest
**
)
b
)
->
get_name
()
);
}
}
int
CvTS
::
run
(
int
argc
,
char
**
argv
)
int
CvTS
::
run
(
int
argc
,
char
**
argv
,
const
char
**
blacklist
)
{
{
time
(
&
start_time
);
time
(
&
start_time
);
...
@@ -1475,7 +1475,7 @@ int CvTS::run( int argc, char** argv )
...
@@ -1475,7 +1475,7 @@ int CvTS::run( int argc, char** argv )
if
(
!
(
test
->
get_support_testing_modes
()
&
get_testing_mode
())
)
if
(
!
(
test
->
get_support_testing_modes
()
&
get_testing_mode
())
)
continue
;
continue
;
if
(
strcmp
(
test
->
get_func_list
(),
""
)
!=
0
&&
filter
(
test
)
)
if
(
strcmp
(
test
->
get_func_list
(),
""
)
!=
0
&&
filter
(
test
,
blacklist
)
)
{
{
if
(
test
->
init
(
this
)
>=
0
)
if
(
test
->
init
(
this
)
>=
0
)
{
{
...
@@ -1875,11 +1875,21 @@ static char* cv_strnstr( const char* str, int len,
...
@@ -1875,11 +1875,21 @@ static char* cv_strnstr( const char* str, int len,
}
}
int
CvTS
::
filter
(
CvTest
*
test
)
int
CvTS
::
filter
(
CvTest
*
test
,
const
char
**
blacklist
)
{
{
const
char
*
pattern
=
params
.
test_filter_pattern
;
const
char
*
pattern
=
params
.
test_filter_pattern
;
const
char
*
test_name
=
test
->
get_name
();
int
inverse
=
0
;
int
inverse
=
0
;
if
(
blacklist
)
{
for
(
;
*
blacklist
!=
0
;
blacklist
++
)
{
if
(
strcmp
(
*
blacklist
,
test_name
)
==
0
)
return
0
;
}
}
if
(
pattern
&&
pattern
[
0
]
==
'!'
)
if
(
pattern
&&
pattern
[
0
]
==
'!'
)
{
{
inverse
=
1
;
inverse
=
1
;
...
@@ -1888,7 +1898,7 @@ int CvTS::filter( CvTest* test )
...
@@ -1888,7 +1898,7 @@ int CvTS::filter( CvTest* test )
if
(
!
pattern
||
strcmp
(
pattern
,
""
)
==
0
||
strcmp
(
pattern
,
"*"
)
==
0
)
if
(
!
pattern
||
strcmp
(
pattern
,
""
)
==
0
||
strcmp
(
pattern
,
"*"
)
==
0
)
return
1
^
inverse
;
return
1
^
inverse
;
if
(
params
.
test_filter_mode
==
CHOOSE_TESTS
)
if
(
params
.
test_filter_mode
==
CHOOSE_TESTS
)
{
{
int
found
=
0
;
int
found
=
0
;
...
@@ -1914,9 +1924,9 @@ int CvTS::filter( CvTest* test )
...
@@ -1914,9 +1924,9 @@ int CvTS::filter( CvTest* test )
have_wildcard
=
0
;
have_wildcard
=
0
;
}
}
t_name_len
=
(
int
)
strlen
(
test
->
get_name
()
);
t_name_len
=
(
int
)
strlen
(
test
_name
);
found
=
(
t_name_len
==
len
||
(
have_wildcard
&&
t_name_len
>
len
))
&&
found
=
(
t_name_len
==
len
||
(
have_wildcard
&&
t_name_len
>
len
))
&&
(
len
==
0
||
memcmp
(
test
->
get_name
()
,
pattern
,
len
)
==
0
);
(
len
==
0
||
memcmp
(
test
_name
,
pattern
,
len
)
==
0
);
if
(
endptr
)
if
(
endptr
)
{
{
*
endptr
=
','
;
*
endptr
=
','
;
...
...
tests/cxts/cxts.h
View file @
e23d62b8
...
@@ -290,7 +290,7 @@ public:
...
@@ -290,7 +290,7 @@ public:
virtual
void
vprintf
(
int
streams
,
const
char
*
fmt
,
va_list
arglist
);
virtual
void
vprintf
(
int
streams
,
const
char
*
fmt
,
va_list
arglist
);
// runs the tests (the whole set or some selected tests)
// runs the tests (the whole set or some selected tests)
virtual
int
run
(
int
argc
,
char
**
argv
);
virtual
int
run
(
int
argc
,
char
**
argv
,
const
char
**
blacklist
=
0
);
// updates the context: current test, test case, rng state
// updates the context: current test, test case, rng state
virtual
void
update_context
(
CvTest
*
test
,
int
test_case_idx
,
bool
update_ts_context
);
virtual
void
update_context
(
CvTest
*
test
,
int
test_case_idx
,
bool
update_ts_context
);
...
@@ -433,7 +433,7 @@ protected:
...
@@ -433,7 +433,7 @@ protected:
virtual
int
read_params
(
CvFileStorage
*
fs
);
virtual
int
read_params
(
CvFileStorage
*
fs
);
// checks, whether the test needs to be run (1) or not (0); called from run()
// checks, whether the test needs to be run (1) or not (0); called from run()
virtual
int
filter
(
CvTest
*
test
);
virtual
int
filter
(
CvTest
*
test
,
const
char
**
blacklist
=
0
);
// makes base name of output files
// makes base name of output files
virtual
void
make_output_stream_base_name
(
const
char
*
config_name
);
virtual
void
make_output_stream_base_name
(
const
char
*
config_name
);
...
...
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