most of the performance tests was rewritten in google-test manner

This commit is contained in:
ilya-lavrenov
2013-08-22 18:03:05 +04:00
parent 6c4ad9b597
commit 4c28a6f0f6
22 changed files with 2817 additions and 2735 deletions

View File

@@ -42,7 +42,7 @@
#include "perf_precomp.hpp"
int main(int argc, const char *argv[])
static int old_main(int argc, const char *argv[])
{
const char *keys =
"{ h | help | false | print help message }"
@@ -99,7 +99,7 @@ int main(int argc, const char *argv[])
// set this to overwrite binary cache every time the test starts
ocl::setBinaryDiskCache(ocl::CACHE_UPDATE);
if (cmd.get<bool>("verify"))
{
TestSystem::instance().setNumIters(1);
@@ -162,3 +162,33 @@ END_DEV:
return 0;
}
const char * impls[] =
{
"ocl",
"plain",
#ifdef HAVE_OPENCV_GPU
"gpu"
#endif
};
int main(int argc, char **argv)
{
// temp solution: if no '--gtest_' and '--perf_' args switch to old behavior
bool useGTest = false;
for(int i=1; i<argc; i++)
{
std::string arg( argv[i] );
if( arg.find("--gtest_")==0 || arg.find("--perf_")==0 )
useGTest = true;
// if (arg == "--perf_verify_sanity")
// argv[i] = (char*)"--perf_no_verify_sanity";
}
if( !useGTest )
return old_main(argc, (const char**)argv);
CV_PERF_TEST_MAIN_INTERNALS(ocl, impls)
}