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 );
if( !(test->get_support_testing_modes() & get_testing_mode()) )
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 )
{
}
-int CvTS::filter( CvTest* test )
+int CvTS::filter( CvTest* test, const char** blacklist )
{
const char* pattern = params.test_filter_pattern;
+ const char* test_name = test->get_name();
int inverse = 0;
+ if( blacklist )
+ {
+ for( ; *blacklist != 0; blacklist++ )
+ {
+ if( strcmp( *blacklist, test_name ) == 0 )
+ return 0;
+ }
+ }
+
if( pattern && pattern[0] == '!' )
{
inverse = 1;
if( !pattern || strcmp( pattern, "" ) == 0 || strcmp( pattern, "*" ) == 0 )
return 1 ^ inverse;
-
+
if( params.test_filter_mode == CHOOSE_TESTS )
{
int found = 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)) &&
- (len == 0 || memcmp( test->get_name(), pattern, len ) == 0);
+ (len == 0 || memcmp( test_name, pattern, len ) == 0);
if( endptr )
{
*endptr = ',';
virtual void vprintf( int streams, const char* fmt, va_list arglist );
// 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
virtual void update_context( CvTest* test, int test_case_idx, bool update_ts_context );
virtual int read_params( CvFileStorage* fs );
// 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
virtual void make_output_stream_base_name( const char* config_name );