From ab18c2d1323a58294db30b0eaac08917cf0aa4b8 Mon Sep 17 00:00:00 2001
From: Konstantin Matskevich <konstantin.matskevich@itseez.com>
Date: Wed, 15 Jan 2014 15:08:09 +0400
Subject: [PATCH] changed testdata path for calib3d

---
 modules/calib3d/test/test_cameracalibration.cpp   | 6 +++---
 modules/calib3d/test/test_chesscorners.cpp        | 6 +++---
 modules/calib3d/test/test_chesscorners_timing.cpp | 2 +-
 modules/calib3d/test/test_main.cpp                | 2 +-
 modules/calib3d/test/test_stereomatching.cpp      | 2 +-
 5 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/modules/calib3d/test/test_cameracalibration.cpp b/modules/calib3d/test/test_cameracalibration.cpp
index fb8238237..7262e61a1 100644
--- a/modules/calib3d/test/test_cameracalibration.cpp
+++ b/modules/calib3d/test/test_cameracalibration.cpp
@@ -337,7 +337,7 @@ void CV_CameraCalibrationTest::run( int start_from )
     int progress = 0;
     int values_read = -1;
 
-    sprintf( filepath, "%scameracalibration/", ts->get_data_path().c_str() );
+    sprintf( filepath, "%scv/cameracalibration/", ts->get_data_path().c_str() );
     sprintf( filename, "%sdatafiles.txt", filepath );
     datafile = fopen( filename, "r" );
     if( datafile == 0 )
@@ -1384,7 +1384,7 @@ void CV_StereoCalibrationTest::run( int )
     {
         char filepath[1000];
         char buf[1000];
-        sprintf( filepath, "%sstereo/case%d/stereo_calib.txt", ts->get_data_path().c_str(), testcase );
+        sprintf( filepath, "%scv/stereo/case%d/stereo_calib.txt", ts->get_data_path().c_str(), testcase );
         f = fopen(filepath, "rt");
         Size patternSize;
         vector<string> imglist;
@@ -1405,7 +1405,7 @@ void CV_StereoCalibrationTest::run( int )
                 buf[--len] = '\0';
             if( buf[0] == '#')
                 continue;
-            sprintf(filepath, "%sstereo/case%d/%s", ts->get_data_path().c_str(), testcase, buf );
+            sprintf(filepath, "%scv/stereo/case%d/%s", ts->get_data_path().c_str(), testcase, buf );
             imglist.push_back(string(filepath));
         }
         fclose(f);
diff --git a/modules/calib3d/test/test_chesscorners.cpp b/modules/calib3d/test/test_chesscorners.cpp
index 6769e47c6..17ecb6717 100644
--- a/modules/calib3d/test/test_chesscorners.cpp
+++ b/modules/calib3d/test/test_chesscorners.cpp
@@ -185,13 +185,13 @@ void CV_ChessboardDetectorTest::run_batch( const string& filename )
     switch( pattern )
     {
         case CHESSBOARD:
-            folder = string(ts->get_data_path()) + "cameracalibration/";
+            folder = string(ts->get_data_path()) + "cv/cameracalibration/";
             break;
         case CIRCLES_GRID:
-            folder = string(ts->get_data_path()) + "cameracalibration/circles/";
+            folder = string(ts->get_data_path()) + "cv/cameracalibration/circles/";
             break;
         case ASYMMETRIC_CIRCLES_GRID:
-            folder = string(ts->get_data_path()) + "cameracalibration/asymmetric_circles/";
+            folder = string(ts->get_data_path()) + "cv/cameracalibration/asymmetric_circles/";
             break;
     }
 
diff --git a/modules/calib3d/test/test_chesscorners_timing.cpp b/modules/calib3d/test/test_chesscorners_timing.cpp
index 47653f88d..a990aea84 100644
--- a/modules/calib3d/test/test_chesscorners_timing.cpp
+++ b/modules/calib3d/test/test_chesscorners_timing.cpp
@@ -75,7 +75,7 @@ void CV_ChessboardDetectorTimingTest::run( int start_from )
     int  idx, max_idx;
     int  progress = 0;
 
-    sprintf( filepath, "%scameracalibration/", ts->get_data_path().c_str() );
+    sprintf( filepath, "%scv/cameracalibration/", ts->get_data_path().c_str() );
     sprintf( filename, "%schessboard_timing_list.dat", filepath );
     CvFileStorage* fs = cvOpenFileStorage( filename, 0, CV_STORAGE_READ );
     CvFileNode* board_list = fs ? cvGetFileNodeByName( fs, 0, "boards" ) : 0;
diff --git a/modules/calib3d/test/test_main.cpp b/modules/calib3d/test/test_main.cpp
index 6b2499344..6f9ac2e0d 100644
--- a/modules/calib3d/test/test_main.cpp
+++ b/modules/calib3d/test/test_main.cpp
@@ -1,3 +1,3 @@
 #include "test_precomp.hpp"
 
-CV_TEST_MAIN("cv")
+CV_TEST_MAIN("")
diff --git a/modules/calib3d/test/test_stereomatching.cpp b/modules/calib3d/test/test_stereomatching.cpp
index 8e1120e47..8beb9f905 100644
--- a/modules/calib3d/test/test_stereomatching.cpp
+++ b/modules/calib3d/test/test_stereomatching.cpp
@@ -398,7 +398,7 @@ protected:
 
 void CV_StereoMatchingTest::run(int)
 {
-    string dataPath = ts->get_data_path();
+    string dataPath = ts->get_data_path() + "cv/";
     string algorithmName = name;
     assert( !algorithmName.empty() );
     if( dataPath.empty() )