]> Creatis software - clitk.git/commitdiff
renaming clitk_data_path in clitk_test_data_path
authormpech <maxime.pech@insa-lyon.fr>
Wed, 29 Jun 2011 16:02:26 +0000 (18:02 +0200)
committermpech <maxime.pech@insa-lyon.fr>
Wed, 29 Jun 2011 16:02:26 +0000 (18:02 +0200)
"factorizing" git repo in CTestConfig

CTestConfig.cmake
tests/CMakeLists.txt
tests/fetch_data_test.sh
tests/tools/clitkAffineTransformTest.cxx
tests/tools/clitkImageInfoTest.cxx
tests/tools/clitkImageInfoTest_oldWay.cpp
tests/tools/clitkWriteDicomSeriesTest.cxx
tests/vv/vvRegisterFormTest.cxx

index 1f71d14bffb6550951f8f699de5ea0520bc2bb3b..6eb9c8669416b568cfaf98c2604c996195e222c3 100644 (file)
@@ -5,3 +5,14 @@ set(CTEST_DROP_METHOD "http")
 set(CTEST_DROP_SITE "my.cdash.org")
 set(CTEST_DROP_LOCATION "/submit.php?project=VV")
 set(CTEST_DROP_SITE_CDASH TRUE)
+
+
+#=========================================================
+SET(CLITK_TEST_DATA_PATH ${PROJECT_BINARY_DIR}/tests/data CACHE INTERNAL DOCSTRING)
+# Get the data tests
+IF(WIN32)
+  SET(scriptExt bat)
+ELSE(UNIX)
+  SET(scriptExt sh)
+ENDIF()
+EXEC_PROGRAM(${PROJECT_SOURCE_DIR}/tests/fetch_data_test.${scriptExt} ARGS ${CLITK_TEST_DATA_PATH} http://russule/data/.git)
\ No newline at end of file
index 479b144fbe9bf8b86ff6ee7dbcde0a626e8554b5..0ad6b8575e4660e93ca988a4642aa433be4fe2c5 100644 (file)
@@ -3,18 +3,8 @@ cmake_policy(SET CMP0005 NEW)
 
 #=========================================================
 # Data tests path
-
-OPTION(CLITK_DATA_PATH ${CMAKE_CURRENT_BINARY_DIR}/data)
-ADD_DEFINITIONS(-DCLITK_DATA_PATH=\"${CLITK_DATA_PATH}/\")
-#=========================================================
+ADD_DEFINITIONS(-DCLITK_TEST_DATA_PATH=\"${CLITK_TEST_DATA_PATH}/\")
 #=========================================================
-# Get the data tests
-IF(WIN32)
-  SET(scriptExt bat)
-ELSE(UNIX)
-  SET(scriptExt sh)
-ENDIF()
-EXEC_PROGRAM(${CMAKE_CURRENT_SOURCE_DIR}/fetch_data_test.${scriptExt} ARGS ${CLITK_DATA_PATH})
 #=========================================================
 # Google test macro
 macro(ADD_GOOGLE_TESTS executable)
index ce581b67187fe1eeb3abe444a94a20ab4f255942..f516146d511b7520cb40db727290f92a673ecd2b 100755 (executable)
@@ -2,22 +2,11 @@
 #
 # arg[1] is TESTING_BINARY_DIR
 # This script has been edited from itk/Modules/ThirdParty/NIFTI/src/nifti/Testing/nifti_regress_test/cmake_testscripts/fetch_data_test.sh
-if [ $# -lt 1 ]
-then
-echo Missing Binary directory name
-exit 1
-fi
-
-repo=http://localhost/data/.git
-
 if cd $1
 then
-git pull
+  git pull
 else
-git clone $repo $1
-exit 1
+  git clone $2 $1
 fi
-
-
 exit 0
 
index 82d4df99d0e2ca232d4f96c002797fe1982da54a..2a7fe92e8089977a61fbb9bae44a8d35d4fe6156 100644 (file)
@@ -52,8 +52,8 @@ static inline void compare(std::string mhd, std::string refMhd, std::string refR
   remove("out.raw");
 }
 TEST(identity, clitkAffineTransformTest){
-  std::string mhd1=std::string(CLITK_DATA_PATH)+"Deformation4D.mhd";
-  std::string refMhd1=std::string(CLITK_DATA_PATH)+"Deformation4DRef.mhd";
-  std::string refRaw1=std::string(CLITK_DATA_PATH)+"Deformation4DRef.raw";
+  std::string mhd1=std::string(CLITK_TEST_DATA_PATH)+"Deformation4D.mhd";
+  std::string refMhd1=std::string(CLITK_TEST_DATA_PATH)+"Deformation4DRef.mhd";
+  std::string refRaw1=std::string(CLITK_TEST_DATA_PATH)+"Deformation4DRef.raw";
   compare(mhd1, refMhd1, refRaw1);
 }
\ No newline at end of file
index 4f8413c798fba30ae8878e9a216cc22eded500b8..0b3f30394a178b6cb08c7dffdfbeacc17091f312 100644 (file)
@@ -31,14 +31,14 @@ static inline void compare(std::string mhd, std::string ref){
   remove("clitkImageInfoTest.out");
 }
 TEST(clitkImageInfoTest, main){
-  std::string mhd1=std::string(CLITK_DATA_PATH)+"Deformation4D.mhd";
+  std::string mhd1=std::string(CLITK_TEST_DATA_PATH)+"Deformation4D.mhd";
   ASSERT_TRUE(itksys::SystemTools::FileExists(mhd1.c_str(), true));
   
-  std::string mhd2=std::string(CLITK_DATA_PATH)+"Lung3D.mhd";
+  std::string mhd2=std::string(CLITK_TEST_DATA_PATH)+"Lung3D.mhd";
   ASSERT_TRUE(itksys::SystemTools::FileExists(mhd2.c_str(), true));
   
   mhd1+=" "+mhd2;
-  std::string ref1=std::string(CLITK_DATA_PATH)+"clitkImageInfoTestRef.out";
+  std::string ref1=std::string(CLITK_TEST_DATA_PATH)+"clitkImageInfoTestRef.out";
   ASSERT_TRUE(itksys::SystemTools::FileExists(ref1.c_str(), true));
   compare(mhd1, ref1);
 }
\ No newline at end of file
index fa60e44ec1e9379a19af79d28442d22d9427b3e7..634a68cb8fec6f1d20770ab4c56737a5ba13eef7 100644 (file)
@@ -24,8 +24,8 @@
 #include <itksys/SystemTools.hxx>
 int main(int argc, char** argv){
   int fail = 1;
-  std::string mhd = std::string(CLITK_DATA_PATH);
-  std::string ref = std::string(CLITK_DATA_PATH);
+  std::string mhd = std::string(CLITK_TEST_DATA_PATH);
+  std::string ref = std::string(CLITK_TEST_DATA_PATH);
   
   //We select which image we use to test clitkImageInfo
   int idImg = atoi(argv[1]);
index bc63080a459b6c104046b75ae4aba47dab66c8d5..2e0c505c4bbfb00949d1e09b682bb12e842cd5d1 100644 (file)
@@ -21,8 +21,8 @@
 #include <itksys/SystemTools.hxx>
 TEST(clitkWriteDicomSeriesTest, main){
   
-  std::string fIn=std::string(CLITK_DATA_PATH)+"/3d/mhd/00.mhd";
-  std::string fOut=std::string(CLITK_DATA_PATH)+"/3d/dcm/1.2.840.113704.1.111.536.1248695032.26";
+  std::string fIn=std::string(CLITK_TEST_DATA_PATH)+"/3d/mhd/00.mhd";
+  std::string fOut=std::string(CLITK_TEST_DATA_PATH)+"/3d/dcm/1.2.840.113704.1.111.536.1248695032.26";
   ASSERT_TRUE(itksys::SystemTools::FileExists(fIn.c_str(), true));
   std::ostringstream cmd_line;
   cmd_line << TOOLS_PATH <<"clitkWriteDicomSeries -i " << fIn << " -d " << fOut << " -o dcm --verbose";
index 15d88c4fb41dd6d2cb1b488487705934ccd7f4b8..6c623dfc3f4d04e024694d751f93ccdf2ed4ba5f 100644 (file)
@@ -22,7 +22,7 @@
 #include "vvConfiguration.h"
 #include <stdio.h>
 #include <fstream>
-const std::string data_path = CLITK_DATA_PATH;
+const std::string data_path = CLITK_TEST_DATA_PATH;
 TEST(vvRegisterForm, canPush){
   QUrl url;
   //the file exists with some old lines