Boost logo

Boost Interest :

Subject: Re: [Boost-cmake] Labels for known failures
From: Michael Jackson (mike.jackson_at_[hidden])
Date: 2009-05-18 12:18:10


On May 18, 2009, at 12:08 PM, Brad King wrote:

> troy d. straszheim wrote:
>> Question #1: How do the settings in the script you posted relate
>> to the settings found in $CMAKE_SOURCE_DIR/CTestConfig.cmake? Can
>> they be combined?
>
> The settings in the source tree are project-wide and have CDash
> submission
> information. These are shared by all submitters.
>
> The settings in the ctest scripts are specific to the individual
> clients.
> They control what compiler gets used, what options get built, etc.
>
>> #2: What is the recommended way to handle these cross-platform
>> bits? If you just execute 'ctest -D Nightly' in a configured
>> directory, you don't need to touch that stuff... since the
>> initial cmake step appears to seamlessly figure out what your
>> generator, make command, and update commands are, the intention was
>> to configure_file these settings over to the binary directory so
>> that the tester's job is:
>> 1. checkout source
>> 2. run cmake with -DBUILD_REGRESSION_TESTS=ON
>> 3. possibly customize a few (simple) variables in a file that was
>> generated in step 2 (but not ones involving implementation details
>> of cmake/ctest like CTEST_CMAKE_GENERATOR)
>> 4. run ctest manually, in a loop, or via cron/Task Scheduler
>
> This can work, but it is a lot of manual effort for a tester. Also,
> it is sometimes nice to just wipe the build tree to make sure things
> work from a clean state. In that case each tester would have to re-do
> these steps.
>
> OTOH the script method will work even if the tester wipes out the
> source
> tree and build tree. The next time the tests run the script will
> recreate
> them.
>
>> But I'm open to the idea that this doesn't make sense for some
>> reason. Your script does make it easier to see all of the
>> configuration in one place (very important). So we would maintain
>> one of those scripts per platform?
>
> The vxl project has one central script, and the per-machine details
> are
> configured by a small helper script written by each submitter. The
> helper script selects the compiler and sets the environment on each
> machine. The latter part cannot be maintained by any one developer
> because it is specific to each tester's machine.
>
> -Brad

Not sure if this is a help but with VTK/ParaView/CMake I do the
following:

Create a shell script file with the following contents:

#!/bin/bash

export KITWARE_DASHBOARD="/Users/Shared/Kitware-CVS/DashBoards/GCC"

# Generate the Notes File
notesfile="/tmp/CMakeDashBoardNotes-GCC.txt"

echo " ####################### CMAKE DASHBOARD NOTES
#############################" > ${notesfile}

echo "Notes file for CMake Nightly Dashboard. This Dashboard is being
generated" >> ${notesfile}
echo "on a MacBook Pro Core 2 Duo, 2.66 GHz, 2GB." >> ${notesfile}
echo "" >> ${notesfile}
echo "Questions about this Dashboard should be directed to imikejackson_at_[hidden]
" >> ${notesfile}
echo "" >> ${notesfile}
echo "--------- OS X Version Information --------" >> ${notesfile}
echo `sw_vers` >> ${notesfile}
echo "" >> ${notesfile}
echo "--------- GCC C++ Compiler Version Information --------" >> $
{notesfile}
echo `gcc --version` >> ${notesfile}
echo "" >> ${notesfile}
echo "---------------- Ctest Script file
----------------------------------" >> ${notesfile}
cat ${KITWARE_DASHBOARD}/CMakeDashBoard.cmake >> ${notesfile}

ctest -S ${KITWARE_DASHBOARD}/CMakeDashBoard.cmake
# -------------------- EOF -------------------------------------

Then Create another file called CMakeDashBoard.cmake with the
following contents:

###################################################################
# This dashboard is maintained by Mike Jackson
# For any comments please contact imikejackson_at_[hidden]
#
# This machine is:
# Intel Core 2 Duo (2.66 GHz, 1 CPU, 2 cores)
# can run the following architectures: ppc, i386
# nVidia 8600m OpenGL Engine
#
# Mac OS X 10.5.6
# Xcode 3.1 tool chain
###################################################################
SET (CTEST_SOURCE_DIRECTORY "/Users/Shared/Kitware-CVS/CMake")
SET (CTEST_BINARY_DIRECTORY "/Users/Shared/Kitware-CVS/CMake/GCC")

SET (CTEST_CVS_COMMAND "/usr/bin/cvs")
SET (CTEST_CVS_CHECKOUT "${CTEST_CVS_COMMAND} -d :pserver:anonymous_at_[hidden]
:/cvsroot/CMake co -d \"${CTEST_SOURCE_DIRECTORY}\" CMake")

# which ctest command to use for running the dashboard
SET (CTEST_COMMAND
   "/Users/Shared/Toolkits/CMake-2.6.2/ctest -D Nightly -A \"/tmp/
CMakeDashBoardNotes-GCC.txt\" -O /Library/Logs/CMakeDashBoard-GCC.log"
   )

# what cmake command to use for configuring this dashboard
SET (CTEST_CMAKE_COMMAND
   "/Users/Shared/Toolkits/CMake-2.6.2/cmake"
   )

####################################################################
# The values in this section are optional you can either
# have them or leave them commented out
####################################################################

# should ctest wipe the binary tree before running
SET (CTEST_START_WITH_EMPTY_BINARY_DIRECTORY TRUE)

# this is the initial cache to use for the binary tree, be careful to
escape
# any quotes inside of this string if you use it
SET (CTEST_INITIAL_CACHE "
SITE:STRING=Shepard.Bluequartz.net
BUILDNAME:STRING=Mac10.5.6-i386-GCC-Rel
CMAKE_OSX_ARCHITECTURES:STRING=i386;ppc
CMAKE_OSX_SYSROOT:STRING=/Developer/SDKs/MacOSX10.5.sdk
CMAKE_GENERATOR:INTERNAL=Unix Makefiles
CMAKE_BUILD_TYPE:STRING=Release
MAKECOMMAND:STRING=/usr/bin/make -j2
CVS_UPDATE_OPTIONS:STRING=-d -P -A
DART_TESTING_TIMEOUT:STRING=1500
CMAKE_INSTALL_PREFIX:PATH=${CTEST_BINARY_DIRECTORY}/InstallTest/Root
BUILD_DOCUMENTATION:BOOL=0
BUILD_EXAMPLES:BOOL=0
BUILD_SHARED_LIBS:BOOL=1
BUILD_TESTING:BOOL=1
CVSCOMMAND:FILEPATH=/usr/bin/cvs
BUILD_QtDialog:BOOL=1
QT_QMAKE_EXECUTABLE:PATH=/Users/Shared/OpenSource/Qt-4.4.3-UBDylib/bin/
qmake
")

# set some extra environment variables
SET (RR_WARNINGS_COMMON "-Wall -Wextra -Wunused -Wpointer-arith -
Winvalid-pch -Wcast-align -Wdisabled-optimization")
SET (RR_WARNINGS_C "${RR_WARNINGS_COMMON} -Wno-deprecated-declarations
-Wno-uninitialized")
SET (RR_WARNINGS_CXX "${RR_WARNINGS_COMMON} -Woverloaded-virtual -
Wshadow -Wwrite-strings -Wstrict-null-sentinel")
SET (RR_DEBUG_COMMON "-gdwarf-2 -fstack-protector")
SET (RR_DEBUG_C "${RR_DEBUG_COMMON}")
SET (RR_DEBUG_CXX "${RR_DEBUG_COMMON} -D_GLIBCXX_DEBUG -
D_GLIBCXX_DEBUG_PEDANTIC")

# set any extra envionment varibles here
SET (CTEST_ENVIRONMENT
   "MACOSX_DEPLOYMENT_TARGET=10.4"
   "CMAKE_OSX_ARCHITECTURES=i386;ppc"
   "CMAKE_OSX_SYSROOT=/Developer/SDKs/MacOSX10.5.sdk"
)

#------------------ EOF ------------------------------------------

  So I can have a cron task just run the first shell script and I can
submit a dashboard with all the options that I want. Again, Not sure
if that helps explain anything or not. Just posting as an example.

Mike Jackson


Boost-cmake list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk