[Insight-developers] How to run the tests: itkGDCMImageIOTest3

Mark Roden mmroden at gmail.com
Mon Mar 7 17:54:08 EST 2011


Hi Luis,

I can see the failing test, now that I'm in the right place.

How did you get the stack trace there?  I'm used to using IDEs, I
haven't really done command line debugging for a long while.  XCode
doesn't play nice with CTest, in that I can't figure out how to run
the test via XCode, which is how I'd normall debug this.

As far as I know, it's building in the default for CMake (debug,
right?).  Debug is set to just have the switch -g, as well as all of
Bradley's compiler warning switches.

Right now, the test output looks like:

Mark-Rodens-MacBook-Pro:itk-build-unix mmroden$ ctest -R
itkGDCMImageIOTest3 -V -n
UpdateCTestConfiguration  from
:/Users/mmroden/Documents/src/itk/itk-build-unix/DartConfiguration.tcl
Parse Config file:/Users/mmroden/Documents/src/itk/itk-build-unix/DartConfiguration.tcl
 Add coverage exclude regular expressions.
 Add coverage exclude: /CMakeFiles/CMakeTmp/
 Add coverage exclude: .*/Testing/.*
 Add coverage exclude: .*/Wrapping/.*
 Add coverage glob: Source/.*/*.h
 Add coverage glob: Source/.*/*.txx
 Add coverage glob: Source/.*/*.cxx
UpdateCTestConfiguration  from
:/Users/mmroden/Documents/src/itk/itk-build-unix/DartConfiguration.tcl
Parse Config file:/Users/mmroden/Documents/src/itk/itk-build-unix/DartConfiguration.tcl
Test project /Users/mmroden/Documents/src/itk/itk-build-unix
Constructing a list of tests
Done constructing a list of tests
Checking test dependency graph...
test 1212
    Start 1212: itkGDCMImageIOTest3

1212: Test command:
/Users/mmroden/Documents/src/itk/itk-build-unix/bin/IOCxxTests
"itkGDCMImageIOTest"
"/Users/mmroden/Documents/src/itk/itk/Testing/Data/Input/012345.002.050"
"/Users/mmroden/Documents/src/itk/itk-build-unix/Testing/Temporary/itkGDCMImageIOTest3.dcm"
"/Users/mmroden/Documents/src/itk/itk-build-unix/Testing/Temporary/itkGDCMImageIOTest3.png"
"/Users/mmroden/Documents/src/itk/itk-build-unix/Testing/Temporary/itkGDCMRescaleImageIOTest3.dcm"
1212: Test timeout computed to be: 1500
1/1 Test #1212: itkGDCMImageIOTest3 ..............***Exception:
SegFault  0.23 sec

0% tests passed, 1 tests failed out of 1

Total Test time (real) =   0.52 sec

The following tests FAILED:
	1212 - itkGDCMImageIOTest3 (SEGFAULT)
Errors while running CTest


Thanks,
Mark

On Mon, Mar 7, 2011 at 2:44 PM, Luis Ibanez <luis.ibanez at kitware.com> wrote:
> Hi Mark,
>
>
> When you downloaded ITK...
> did you follow the instruction in:
>
>   http://www.itk.org/Wiki/ITK/Git/Develop    ?
>
>
>
> In particular, did you run the script:
>
>     ./Utilities/SetupForDevelopment.sh
>
> as described in the instructions ?
>
>
> --
>
> If you go to the source tree of ITK,
> do you have a directory:
>
>            ITK/Testing/Data     ?
>
> Is there anything inside that directory ?
>
> If not, it means that you didn't run that
> script, or that something went wrong
> when you ran it.
>
>
>
>      Luis
>
>
> ----------------------------------------------
> On Mon, Mar 7, 2011 at 5:33 PM, Mark Roden <mmroden at gmail.com> wrote:
>> Hi Luis,
>>
>> 0) Good, I thought so.
>>
>> 1) When I do that, after building 'testing', I get the following:
>> Mark-Rodens-MacBook-Pro:bin mmroden$ ctest -R itkGDCMImageIOTest3
>> Test project /Users/mmroden/Documents/src/itk/itk-build-unix/bin
>> No tests were found!!!
>>
>> That's what's causing me some consternation.  Is there something else
>> I need to do to bring those tests out?  Because when I run the IOTests
>> under xcode, which brings up a testing app, that test isn't listed
>> either.  I do see it in the cmakelists, I just don't know how to get
>> there from here.
>>
>> Thanks,
>> Mark
>>
>> On Mon, Mar 7, 2011 at 2:30 PM, Luis Ibanez <luis.ibanez at kitware.com> wrote:
>>> Hi Mark,
>>>
>>> 0) You don't need GDCM data to run this test.
>>>
>>>   The input file that is uses is in:
>>>
>>>       ITK/Testing/Data/Input/012345.002.050
>>>
>>>    For details please look at lines 1057-1061 of
>>>    the file  ITK/Testing/Code/IO/CMakeLists.txt:
>>>
>>> add_test(itkGDCMImageIOTest3 ${TestDriver} itkGDCMImageIOTest
>>>        ${ITK_DATA_ROOT}/Input/012345.002.050
>>>        ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageIOTest3.dcm
>>>        ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageIOTest3.png
>>>        ${ITK_TEST_OUTPUT_DIR}/itkGDCMRescaleImageIOTest3.dcm)
>>>
>>>
>>> 1) To run this single test you can "cd" into
>>>     the ITK binary directory and type:
>>>
>>>            ctest   -R      itkGDCMImageIOTest3
>>>
>>> 2) If you want the actual command line that
>>>     directly executes this test, type:
>>>
>>>       ctest -R itkGDCMImageIOTest3 -V -N
>>>
>>> you will get something like:
>>>
>>> ITK_BINARY_DIR/bin/IOCxxTests "itkGDCMImageIOTest"
>>> "/home/ibanez/src/ITK/Testing/Data/Input/012345.002.050"
>>> "/home/ibanez/bin/ITK/Release/Testing/Temporary/itkGDCMImageIOTest3.dcm"
>>> "/home/ibanez/bin/ITK/Release/Testing/Temporary/itkGDCMImageIOTest3.png"
>>> "/home/ibanez/bin/ITK/Release/Testing/Temporary/itkGDCMRescaleImageIOTest3.dcm"
>>>
>>> 4) Here is the link to the same tests as it is executed
>>>     in the Dashboard machines:
>>>
>>> http://www.cdash.org/CDash/testSummary.php?project=2&name=itkGDCMImageIOTest3&date=2011-03-07
>>>
>>>
>>>       Luis
>>>
>>>
>>> -------------------------------------------
>>> On Sat, Mar 5, 2011 at 7:50 PM, Mark Roden <mmroden at gmail.com> wrote:
>>>> Hi Luis,
>>>>
>>>> OK, now I've spent quite a bit of time trying to fix this patch and
>>>> this failing test with no luck. There has to be a better way.
>>>>
>>>> How can I find just this test to run it from the command line?  I've
>>>> cmade everything using unix makefiles on my mac using Bradley
>>>> Lowecamp's switches to expose warnings:
>>>>
>>>> Cxx : -Wall -Wextra -Wunused -Wpointer-arith -Winvalid-pch
>>>> -Wcast-align -Woverloaded-virtual -Wshadow -Wwrite-strings
>>>> -Wstrict-null-sentinel
>>>> C: -Wall -Wextra -Wunused -Wpointer-arith -Winvalid-pch -Wcast-align
>>>> -Wno-deprecated-declarations -Wno-uninitialized
>>>>
>>>> I then run make with default options on, as well as testing and
>>>> examples.  Everything builds, no tests are produced (or are they in
>>>> some directory that I don't know about).
>>>>
>>>> In what may not be a related error, if I turn on anything in gdcm (ie,
>>>> gdcm testing), I'll get these cmake errors:
>>>>
>>>> CMake Error at Utilities/gdcm/CMakeLists.txt:510 (SUBDIRS):
>>>>  subdirs Incorrect SUBDIRS command.  Directory: Testing does not exists.
>>>>
>>>>
>>>> If you want to build the test suite, you must set GDCM_DATA_ROOT
>>>> (advanced option) to the full path name of the gdcmData directory; if
>>>> you don't want, disable GDCM_BUILD_TESTING.
>>>> What is gdcmData? Please read:
>>>> http://sourceforge.net/apps/mediawiki/gdcm/index.php?title=General_questions#What_is_gdcmData_.3F
>>>> CMake Error at Utilities/gdcm/Utilities/CMakeLists.txt:54 (SUBDIRS):
>>>>  subdirs Incorrect SUBDIRS command.  Directory: gdcmmd5 does not exists.
>>>>
>>>>
>>>> Configuring incomplete, errors occurred!
>>>>
>>>> The second error makes sense, since I haven't put the gdcm testing
>>>> data in their yet (do I need that for the failing test for this
>>>> patch?).  But what's the deal with that first error?  The 'Testing'
>>>> directory does 'exists' (sic) in the cmake target directory.
>>>>
>>>> If I set the testing directory to be the directory from the gdcm root,
>>>> CMake now reports:
>>>> CMake Error at Utilities/gdcm/CMakeLists.txt:510 (SUBDIRS):
>>>>  subdirs Incorrect SUBDIRS command.  Directory: Testing does not exists.
>>>>
>>>>
>>>> CMake Error at Utilities/gdcm/Utilities/CMakeLists.txt:54 (SUBDIRS):
>>>>  subdirs Incorrect SUBDIRS command.  Directory: gdcmmd5 does not exists.
>>>>
>>>>
>>>> Configuring incomplete, errors occurred!
>>>>
>>>> If this is related to the failing test, then I'll need to fix it in
>>>> order to fix the test, right?
>>>>
>>>> I'd like to just run  directly so that I can fix that particular test
>>>> (and perhaps develop further tests that check codecs other than jpeg).
>>>>
>>>> Thanks,
>>>> Mark
>>>>
>>>>
>>>> On Fri, Mar 4, 2011 at 9:58 AM, Code Review <review at kitware.com> wrote:
>>>>> From Mathieu Malaterre <mathieu.malaterre at gmail.com>:
>>>>>
>>>>> Mathieu Malaterre has posted comments on this change.
>>>>>
>>>>> Change subject: COMP: attempts to fix gdcm function hiding warnings
>>>>> ......................................................................
>>>>>
>>>>>
>>>>> Patch Set 1: Fails; I would prefer that you didn't submit this
>>>>>
>>>>> --
>>>>> To view, visit http://review.source.kitware.com/1120
>>>>> To unsubscribe, visit http://review.source.kitware.com/settings
>>>>>
>>>>> Gerrit-MessageType: comment
>>>>> Gerrit-Change-Id: I413102b25d1c9eee60eace2585c2f857ad564a67
>>>>> Gerrit-PatchSet: 1
>>>>> Gerrit-Project: ITK
>>>>> Gerrit-Branch: master
>>>>> Gerrit-Owner: Mark Roden <mmroden at gmail.com>
>>>>> Gerrit-Reviewer: Hans J. Johnson <hans-johnson at uiowa.edu>
>>>>> Gerrit-Reviewer: Luis Ibanez <luis.ibanez at kitware.com>
>>>>> Gerrit-Reviewer: Mathieu Malaterre <mathieu.malaterre at gmail.com>
>>>>>
>>>>
>>>
>>
>


More information about the Insight-developers mailing list