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
#=========================================================
# 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)
#
# 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
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
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
#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]);
#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";
#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