[Insight-developers] Additional targets in CTest dashboard script for SimpleITK

Bradley Lowekamp blowekamp at mail.nih.gov
Thu Feb 20 19:21:38 EST 2014


Hello,

I am in need of some ctest scripting assistance.

I need to build the additional "dist" target on SimpleITK's release builds in the dashboard script, with the goal to upload the built packages. My problem is I can't get the  additional "ctest_build" command to work on windows.

Here is the CMake script which add the dist target which is not part of "all":
https://github.com/SimpleITK/SimpleITK/blob/master/Wrapping/dist/CMakeLists.txt#L7

And here is the current simpleitk_common.cmake file based off of ITK where I added a build error variable:
https://github.com/SimpleITK/SimpleITK/blob/dashboard/simpleitk_common.cmake#L364

So my basic logic is that after the main build if there are no build errors ( and many not test failures ), build the dist target, and upload the packages. The complication is that the common dashboard script if for the "SuperBuild" level of SimpleITK , while the dist target is the the SimpleITK sub-project. So this is what I have been trying that fails on windows:


macro ( dashboard_hook_end )
  message( "build_number_errors: ${build_number_errors}" )

  # build the distribution target to make the packages to upload
  ctest_build( BUILD "${CTEST_BINARY_DIRECTORY}/SimpleITK-build" TARGET dist )

  if ( ${build_number_errors} EQUAL "0" )
    message ( "dashboard_git_branch: ${dashboard_git_branch}" )
    file ( GLOB PY_EGG "${CTEST_DASHBOARD_ROOT}/SimpleITK-build/SimpleITK-build/Wrapping/dist/*.egg" )
    file ( GLOB ZIPS "${CTEST_DASHBOARD_ROOT}/SimpleITK-build/SimpleITK-build/Wrapping/dist/*.zip" )
     ...
     # upload some files
     ...
    endforeach()

  else()
    message( "Build failure, not uploading!" )
  endif()
endmacro()

I have hacked around this for a while trying various things, and haven't gotten any where. I saw an error message at one point indicating that this additional build was trying to use the SuperBuild MSVC project. It's been rather difficult as the output of these hook doesn't make to cdash. 

I have spent too much time on this and hope to get some help, to know the best ways to do this type of thing.

Thanks,
Brad


More information about the Insight-developers mailing list