From bb98e5f2a4d79848b855cd8c6e73c2ad70058ae6 Mon Sep 17 00:00:00 2001 From: mpech Date: Fri, 1 Jul 2011 12:53:57 +0200 Subject: [PATCH] obsolete dartConfig file --- DartConfiguration.tcl | 90 ---------------------------------- tests/tools/CMakeLists.txt | 28 ++++++++--- tests/tools/toolTestRunner.cxx | 79 +++++++++++++++++++++++++++++ 3 files changed, 100 insertions(+), 97 deletions(-) delete mode 100644 DartConfiguration.tcl create mode 100644 tests/tools/toolTestRunner.cxx diff --git a/DartConfiguration.tcl b/DartConfiguration.tcl deleted file mode 100644 index 789d086..0000000 --- a/DartConfiguration.tcl +++ /dev/null @@ -1,90 +0,0 @@ -# This file is configured by CMake automatically as DartConfiguration.tcl -# If you choose not to use CMake, this file may be hand configured, by -# filling in the required variables. - - -# Configuration directories and files -SourceDirectory: /home/mpech/workspace/vvSource -BuildDirectory: /home/mpech/workspace/vvSource - -# Where to place the cost data store -CostDataFile: - -# Site is something like machine.domain, i.e. pragmatic.crd -Site: russule - -# Build name is osname-revision-compiler, i.e. Linux-2.4.2-2smp-c++ -BuildName: Linux-c++ - -# Submission information -IsCDash: TRUE -CDashVersion: -QueryCDashVersion: -DropSite: localhost -DropLocation: /cdash/submit.php?project=vv -DropSiteUser: -DropSitePassword: -DropSiteMode: -DropMethod: http -TriggerSite: -ScpCommand: /usr/bin/scp - -# Dashboard start time -NightlyStartTime: 00:00:00 EST - -# Commands for the build/test/submit cycle -ConfigureCommand: "/usr/bin/cmake" "/home/mpech/workspace/vvSource" -MakeCommand: /usr/bin/gmake -i -DefaultCTestConfigurationType: Release - -# CVS options -# Default is "-d -P -A" -CVSCommand: /usr/bin/cvs -CVSUpdateOptions: -d -A -P - -# Subversion options -SVNCommand: /usr/bin/svn -SVNUpdateOptions: - -# Git options -GITCommand: /usr/bin/git -GITUpdateOptions: -GITUpdateCustom: - -# Generic update command -UpdateCommand: /usr/bin/git -UpdateOptions: -UpdateType: git - -# Compiler info -Compiler: /usr/bin/c++ - -# Dynamic analysis and coverage -PurifyCommand: -ValgrindCommand: -ValgrindCommandOptions: -MemoryCheckCommand: MEMORYCHECK_COMMAND-NOTFOUND -MemoryCheckCommandOptions: -MemoryCheckSuppressionFile: -CoverageCommand: /usr/bin/gcov - -# Cluster commands -SlurmBatchCommand: SLURM_SBATCH_COMMAND-NOTFOUND -SlurmRunCommand: SLURM_SRUN_COMMAND-NOTFOUND - -# Testing options -# TimeOut is the amount of time in seconds to wait for processes -# to complete during testing. After TimeOut seconds, the -# process will be summarily terminated. -# Currently set to 25 minutes -TimeOut: 1500 - -UseLaunchers: -CurlOptions: -# warning, if you add new options here that have to do with submit, -# you have to update cmCTestSubmitCommand.cxx - -# For CTest submissions that timeout, these options -# specify behavior for retrying the submission -CTestSubmitRetryDelay: 5 -CTestSubmitRetryCount: 3 diff --git a/tests/tools/CMakeLists.txt b/tests/tools/CMakeLists.txt index 6f4bcbf..7713d09 100644 --- a/tests/tools/CMakeLists.txt +++ b/tests/tools/CMakeLists.txt @@ -4,17 +4,31 @@ include_directories( ${GTEST_DIR}/include ) -FILE(GLOB srcs *.cxx) -ADD_EXECUTABLE(toolsTest ${srcs}) +SET (CUSTOM_TEST_SRC + clitkImageInfoTest.cxx + vvMainTest.cxx +) +ADD_EXECUTABLE(toolsTest ${CUSTOM_TEST_SRC}) ADD_DEFINITIONS(-DTOOLS_PATH=\"${PROJECT_BINARY_DIR}/bin/\") -target_link_libraries(toolsTest vvLib ${vvExternalLibs} gtest) +TARGET_LINK_LIBRARIES(toolsTest vvLib ${vvExternalLibs} gtest) # Add all tests found in the source code, calling the executable to run them add_google_tests ( ${EXECUTABLE_OUTPUT_PATH}/toolsTest ${srcs}) SET(BUILDNAME ${BUILDNAME}_tools CACHE INTERNAL DOCSTRING) -ADD_EXECUTABLE(clitkImageInfoTest_oldWay clitkImageInfoTest_oldWay.cpp) -target_link_libraries(clitkImageInfoTest_oldWay vvLib ${vvExternalLibs}) -ADD_TEST(clitkImageInfoTest_oldWay ${EXECUTABLE_OUTPUT_PATH}/clitkImageInfoTest_oldWay firstOne) -ADD_TEST(clitkImageInfoTest_oldWay ${EXECUTABLE_OUTPUT_PATH}/clitkImageInfoTest_oldWay secondOne) \ No newline at end of file +SET (srcs + toolTestRunner.cxx +) +ADD_EXECUTABLE(toolTestRunner ${srcs}) +TARGET_LINK_LIBRARIES(toolTestRunner vvLib ${vvExternalLibs}) +SET(exe ${EXECUTABLE_OUTPUT_PATH}/toolTestRunner) +#========================================================= +# clitkImageInfo +ADD_TEST(clitkImageInfo_1 ${exe} clitkImageInfo Deformation4D.mhd Deformation4D_ref.info) +ADD_TEST(clitkImageInfo_2 ${exe} clitkImageInfo Lung3D.mhd Lung3D_ref.info) +#========================================================= +# clitkGetSpacing +ADD_TEST(clitkGetSpacing_1 ${exe} clitkGetSpacing Deformation4D.mhd Cropped_Deformation4D_ref.spacing) +ADD_TEST(clitkGetSpacing_2 ${exe} clitkGetSpacing Lung3D.mhd Cropped_Deformation4D_ref.spacing) +UNSET(exe) \ No newline at end of file diff --git a/tests/tools/toolTestRunner.cxx b/tests/tools/toolTestRunner.cxx new file mode 100644 index 0000000..4e13ec0 --- /dev/null +++ b/tests/tools/toolTestRunner.cxx @@ -0,0 +1,79 @@ +/*========================================================================= + Program: vv http://www.creatis.insa-lyon.fr/rio/vv + + Authors belong to: + - University of LYON http://www.universite-lyon.fr/ + - Léon Bérard cancer center http://www.centreleonberard.fr + - CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the copyright notices for more information. + + It is distributed under dual licence + + - BSD See included LICENSE.txt file + - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html +===========================================================================*/ +#include +#include +#include +#include +#include +#include +#include +const int NO_OUTPUT_OPTION=-1; +int getOutputOptionIndex(int argc, char** argv){ + for(int i=1; i