From cb5f6e9c4ca38eb5a304eb2b278ce049d2ca838b Mon Sep 17 00:00:00 2001 From: dsarrut Date: Thu, 7 Apr 2011 13:49:35 +0000 Subject: [PATCH] Romulo: - Including automated test procedures in clitk - Addition of test data + build/tests is the default working directory set by CMake when running tests --- build/tests/CTestTestfile.cmake | 8 + build/tests/Makefile | 266 ++++++++++++++++++++++++++++++++ build/tests/cmake_install.cmake | 34 ++++ 3 files changed, 308 insertions(+) create mode 100755 build/tests/CTestTestfile.cmake create mode 100755 build/tests/Makefile create mode 100755 build/tests/cmake_install.cmake diff --git a/build/tests/CTestTestfile.cmake b/build/tests/CTestTestfile.cmake new file mode 100755 index 0000000..f8c8376 --- /dev/null +++ b/build/tests/CTestTestfile.cmake @@ -0,0 +1,8 @@ +# CMake generated Testfile for +# Source directory: /home/romulo/creatis/clitk3/tests +# Build directory: /home/romulo/creatis/clitk3/build/tests +# +# This file includes the relevent testing commands required for +# testing this directory and lists subdirectories to be tested as well. +ADD_TEST(clitkImageInfoTest "/home/romulo/creatis/clitk3/build/bin/clitkImageInfoTest") +ADD_TEST(clitkWriteDicomSeriesTest "/home/romulo/creatis/clitk3/build/bin/clitkWriteDicomSeriesTest") diff --git a/build/tests/Makefile b/build/tests/Makefile new file mode 100755 index 0000000..9d64a1c --- /dev/null +++ b/build/tests/Makefile @@ -0,0 +1,266 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +# Default target executed when no arguments are given to make. +default_target: all +.PHONY : default_target + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canoncical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The program to use to edit the cache. +CMAKE_EDIT_COMMAND = /usr/bin/ccmake + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/romulo/creatis/clitk3 + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/romulo/creatis/clitk3/build + +#============================================================================= +# Targets provided globally by CMake. + +# Special rule for the target edit_cache +edit_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake cache editor..." + /usr/bin/ccmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) +.PHONY : edit_cache + +# Special rule for the target edit_cache +edit_cache/fast: edit_cache +.PHONY : edit_cache/fast + +# Special rule for the target install +install: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." + /usr/bin/cmake -P cmake_install.cmake +.PHONY : install + +# Special rule for the target install +install/fast: preinstall/fast + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." + /usr/bin/cmake -P cmake_install.cmake +.PHONY : install/fast + +# Special rule for the target install/local +install/local: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..." + /usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake +.PHONY : install/local + +# Special rule for the target install/local +install/local/fast: install/local +.PHONY : install/local/fast + +# Special rule for the target install/strip +install/strip: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..." + /usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake +.PHONY : install/strip + +# Special rule for the target install/strip +install/strip/fast: install/strip +.PHONY : install/strip/fast + +# Special rule for the target list_install_components +list_install_components: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\"" +.PHONY : list_install_components + +# Special rule for the target list_install_components +list_install_components/fast: list_install_components +.PHONY : list_install_components/fast + +# Special rule for the target package +package: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool..." + cd /home/romulo/creatis/clitk3/build && /usr/bin/cpack --config ./CPackConfig.cmake +.PHONY : package + +# Special rule for the target package +package/fast: package +.PHONY : package/fast + +# Special rule for the target package_source +package_source: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool for source..." + cd /home/romulo/creatis/clitk3/build && /usr/bin/cpack --config ./CPackSourceConfig.cmake /home/romulo/creatis/clitk3/build/CPackSourceConfig.cmake +.PHONY : package_source + +# Special rule for the target package_source +package_source/fast: package_source +.PHONY : package_source/fast + +# Special rule for the target rebuild_cache +rebuild_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." + /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) +.PHONY : rebuild_cache + +# Special rule for the target rebuild_cache +rebuild_cache/fast: rebuild_cache +.PHONY : rebuild_cache/fast + +# Special rule for the target test +test: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running tests..." + /usr/bin/ctest --force-new-ctest-process $(ARGS) +.PHONY : test + +# Special rule for the target test +test/fast: test +.PHONY : test/fast + +# The main all target +all: cmake_check_build_system + cd /home/romulo/creatis/clitk3/build && $(CMAKE_COMMAND) -E cmake_progress_start /home/romulo/creatis/clitk3/build/CMakeFiles /home/romulo/creatis/clitk3/build/tests/CMakeFiles/progress.marks + cd /home/romulo/creatis/clitk3/build && $(MAKE) -f CMakeFiles/Makefile2 tests/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/romulo/creatis/clitk3/build/CMakeFiles 0 +.PHONY : all + +# The main clean target +clean: + cd /home/romulo/creatis/clitk3/build && $(MAKE) -f CMakeFiles/Makefile2 tests/clean +.PHONY : clean + +# The main clean target +clean/fast: clean +.PHONY : clean/fast + +# Prepare targets for installation. +preinstall: all + cd /home/romulo/creatis/clitk3/build && $(MAKE) -f CMakeFiles/Makefile2 tests/preinstall +.PHONY : preinstall + +# Prepare targets for installation. +preinstall/fast: + cd /home/romulo/creatis/clitk3/build && $(MAKE) -f CMakeFiles/Makefile2 tests/preinstall +.PHONY : preinstall/fast + +# clear depends +depend: + cd /home/romulo/creatis/clitk3/build && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 +.PHONY : depend + +# Convenience name for target. +tests/CMakeFiles/clitkImageInfoTest.dir/rule: + cd /home/romulo/creatis/clitk3/build && $(MAKE) -f CMakeFiles/Makefile2 tests/CMakeFiles/clitkImageInfoTest.dir/rule +.PHONY : tests/CMakeFiles/clitkImageInfoTest.dir/rule + +# Convenience name for target. +clitkImageInfoTest: tests/CMakeFiles/clitkImageInfoTest.dir/rule +.PHONY : clitkImageInfoTest + +# fast build rule for target. +clitkImageInfoTest/fast: + cd /home/romulo/creatis/clitk3/build && $(MAKE) -f tests/CMakeFiles/clitkImageInfoTest.dir/build.make tests/CMakeFiles/clitkImageInfoTest.dir/build +.PHONY : clitkImageInfoTest/fast + +# Convenience name for target. +tests/CMakeFiles/clitkWriteDicomSeriesTest.dir/rule: + cd /home/romulo/creatis/clitk3/build && $(MAKE) -f CMakeFiles/Makefile2 tests/CMakeFiles/clitkWriteDicomSeriesTest.dir/rule +.PHONY : tests/CMakeFiles/clitkWriteDicomSeriesTest.dir/rule + +# Convenience name for target. +clitkWriteDicomSeriesTest: tests/CMakeFiles/clitkWriteDicomSeriesTest.dir/rule +.PHONY : clitkWriteDicomSeriesTest + +# fast build rule for target. +clitkWriteDicomSeriesTest/fast: + cd /home/romulo/creatis/clitk3/build && $(MAKE) -f tests/CMakeFiles/clitkWriteDicomSeriesTest.dir/build.make tests/CMakeFiles/clitkWriteDicomSeriesTest.dir/build +.PHONY : clitkWriteDicomSeriesTest/fast + +# target to build an object file +tools/clitkImageInfoTest.o: + cd /home/romulo/creatis/clitk3/build && $(MAKE) -f tests/CMakeFiles/clitkImageInfoTest.dir/build.make tests/CMakeFiles/clitkImageInfoTest.dir/tools/clitkImageInfoTest.o +.PHONY : tools/clitkImageInfoTest.o + +# target to preprocess a source file +tools/clitkImageInfoTest.i: + cd /home/romulo/creatis/clitk3/build && $(MAKE) -f tests/CMakeFiles/clitkImageInfoTest.dir/build.make tests/CMakeFiles/clitkImageInfoTest.dir/tools/clitkImageInfoTest.i +.PHONY : tools/clitkImageInfoTest.i + +# target to generate assembly for a file +tools/clitkImageInfoTest.s: + cd /home/romulo/creatis/clitk3/build && $(MAKE) -f tests/CMakeFiles/clitkImageInfoTest.dir/build.make tests/CMakeFiles/clitkImageInfoTest.dir/tools/clitkImageInfoTest.s +.PHONY : tools/clitkImageInfoTest.s + +# target to build an object file +tools/clitkWriteDicomSeriesTest.o: + cd /home/romulo/creatis/clitk3/build && $(MAKE) -f tests/CMakeFiles/clitkWriteDicomSeriesTest.dir/build.make tests/CMakeFiles/clitkWriteDicomSeriesTest.dir/tools/clitkWriteDicomSeriesTest.o +.PHONY : tools/clitkWriteDicomSeriesTest.o + +# target to preprocess a source file +tools/clitkWriteDicomSeriesTest.i: + cd /home/romulo/creatis/clitk3/build && $(MAKE) -f tests/CMakeFiles/clitkWriteDicomSeriesTest.dir/build.make tests/CMakeFiles/clitkWriteDicomSeriesTest.dir/tools/clitkWriteDicomSeriesTest.i +.PHONY : tools/clitkWriteDicomSeriesTest.i + +# target to generate assembly for a file +tools/clitkWriteDicomSeriesTest.s: + cd /home/romulo/creatis/clitk3/build && $(MAKE) -f tests/CMakeFiles/clitkWriteDicomSeriesTest.dir/build.make tests/CMakeFiles/clitkWriteDicomSeriesTest.dir/tools/clitkWriteDicomSeriesTest.s +.PHONY : tools/clitkWriteDicomSeriesTest.s + +# Help Target +help: + @echo "The following are some of the valid targets for this Makefile:" + @echo "... all (the default if no target is provided)" + @echo "... clean" + @echo "... depend" + @echo "... clitkImageInfoTest" + @echo "... clitkWriteDicomSeriesTest" + @echo "... edit_cache" + @echo "... install" + @echo "... install/local" + @echo "... install/strip" + @echo "... list_install_components" + @echo "... package" + @echo "... package_source" + @echo "... rebuild_cache" + @echo "... test" + @echo "... tools/clitkImageInfoTest.o" + @echo "... tools/clitkImageInfoTest.i" + @echo "... tools/clitkImageInfoTest.s" + @echo "... tools/clitkWriteDicomSeriesTest.o" + @echo "... tools/clitkWriteDicomSeriesTest.i" + @echo "... tools/clitkWriteDicomSeriesTest.s" +.PHONY : help + + + +#============================================================================= +# Special targets to cleanup operation of make. + +# Special rule to run CMake to check the build system integrity. +# No rule that depends on this can have commands that come from listfiles +# because they might be regenerated. +cmake_check_build_system: + cd /home/romulo/creatis/clitk3/build && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 +.PHONY : cmake_check_build_system + diff --git a/build/tests/cmake_install.cmake b/build/tests/cmake_install.cmake new file mode 100755 index 0000000..f46c0af --- /dev/null +++ b/build/tests/cmake_install.cmake @@ -0,0 +1,34 @@ +# Install script for directory: /home/romulo/creatis/clitk3/tests + +# Set the install prefix +IF(NOT DEFINED CMAKE_INSTALL_PREFIX) + SET(CMAKE_INSTALL_PREFIX "/usr/local") +ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX) +STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") + +# Set the install configuration name. +IF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) + IF(BUILD_TYPE) + STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" "" + CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") + ELSE(BUILD_TYPE) + SET(CMAKE_INSTALL_CONFIG_NAME "Release") + ENDIF(BUILD_TYPE) + MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") +ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) + +# Set the component getting installed. +IF(NOT CMAKE_INSTALL_COMPONENT) + IF(COMPONENT) + MESSAGE(STATUS "Install component: \"${COMPONENT}\"") + SET(CMAKE_INSTALL_COMPONENT "${COMPONENT}") + ELSE(COMPONENT) + SET(CMAKE_INSTALL_COMPONENT) + ENDIF(COMPONENT) +ENDIF(NOT CMAKE_INSTALL_COMPONENT) + +# Install shared libraries without execute permission? +IF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) + SET(CMAKE_INSTALL_SO_NO_EXE "0") +ENDIF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) + -- 2.47.1