[ITK Community] [Insight-users] run test manually

Xiaoxiao Liu xiaoxiao.liu at kitware.com
Mon Dec 2 11:52:33 EST 2013


Alternatively,
If you have your ITK build tree ready with the cache entry:BUILD_TESTING=ON.
You could just run the single test with ctest, e.g.:
ctest -R HDF5ImageIOStreamingReadWriteTest
 from the root of the ITK build tree, or from the ${the root of the ITK
build tree}/Modules/IO/HDF5/test/.


On Mon, Dec 2, 2013 at 11:12 AM, Bill Lorensen <bill.lorensen at gmail.com>wrote:

> I suggest copying the "test" into a new directory .
>
> Then change the line:
> itkHDF5ImageIOStreamingReadWriteTest(int ac, char * av [])
> to
> main(int ac, char * av [])
>
> Then use a CMakeLists.txt file like this:
>
> make_minimum_required(VERSION 2.8)
>
> project(HDFExample)
>
> find_package(ITK REQUIRED)
> include(${ITK_USE_FILE})
>
> add_executable(HDFExample MACOSX_BUNDLE
> itkHDF5ImageIOStreamingReadWriteTest.cxx)
> target_link_libraries(HDFExample ${ITK_LIBRARIES})
>
>
> On Mon, Dec 2, 2013 at 4:46 AM, David Froger <david.froger at inria.fr>
> wrote:
> > Replacing the CMakeLists.txt with, the following content almost works (I
> get
> > 'relocation has invalid symbol index' at link, seems that objects
> compiled
> > without -fPIC are put in dynamic lib).
> >
> > cmake_minimum_required(VERSION 2.8)
> >
> > PROJECT(MAIN)
> >
> > FIND_PACKAGE(ITK)
> >
> > SET(CMAKE_BUILD_TYPE debug)
> >
> > IF(ITK_FOUND)
> >     INCLUDE(${ITK_USE_FILE})
> > ELSE(ITK_FOUND)
> >     MESSAGE(FATAL_ERROR "ITK not found. Please set ITK_DIR.")
> > ENDIF(ITK_FOUND)
> >
> > ADD_EXECUTABLE(main itkHDF5ImageIOStreamingReadWriteTest.cxx)
> >
> > TARGET_LINK_LIBRARIES(main ${ITK_LIBRARIES})
> >
> > Quoting David Froger (2013-12-02 10:33:56)
> >> Hi all,
> >>
> >> How to run a ITK test manuall?
> >>
> >> I would like to experiment with
> >> ITK/Modules/IO/HDF5/test/itkHDF5ImageIOStreamingReadWriteTest.cxx, but
> when
> >> trying to build the test:
> >>
> >>     cd ITK/Modules/IO/HDF5/test
> >>     mkdir build
> >>     cd build
> >>     cmake ..
> >>
> >> Because the ITK cmake testing module (I'm not sure how to name it) is
> not loaded,
> >> functions are not found:
> >>
> >> CMake Error at CMakeLists.txt:1 (itk_module_test):
> >>   Unknown CMake command "itk_module_test".
> >>
> >> Thanks,
> >> David
> > _____________________________________
> > Powered by www.kitware.com
> >
> > Visit other Kitware open-source projects at
> > http://www.kitware.com/opensource/opensource.html
> >
> > Kitware offers ITK Training Courses, for more information visit:
> > http://www.kitware.com/products/protraining.php
> >
> > Please keep messages on-topic and check the ITK FAQ at:
> > http://www.itk.org/Wiki/ITK_FAQ
> >
> > Follow this link to subscribe/unsubscribe:
> > http://www.itk.org/mailman/listinfo/insight-users
>
>
>
> --
> Unpaid intern in BillsBasement at noware dot com
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.php
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
> _______________________________________________
> Community mailing list
> Community at itk.org
> http://public.kitware.com/cgi-bin/mailman/listinfo/community
>



-- 


---------------------------------------------
*Xiaoxiao Liu*, Ph.D.
R & D Engineer
Kitware Inc <http://www.kitware.com/>.
Clifton Park, NY
Phone: (518) 881-4924  or  (518) 371-3971 x124
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20131202/04ecd35f/attachment-0001.html>
-------------- next part --------------
_____________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.itk.org/mailman/listinfo/insight-users


More information about the Community mailing list