# Setting up CTest Slaves If you want to contribute a test-slave, just create a file called hosts/<HOSTNAME>.ctest - have a look at the existing host files. Then setup your crontab as follows: 50 */4 * * * CTEST_SUBMIT_TYPE="Experimental" /home/autobuilder/uscxml/test/ctest/run-tests.cron 0 2 * * * CTEST_SUBMIT_TYPE="Nightly" /home/autobuilder/uscxml/test/ctest/run-tests.cron */2 * * * * CTEST_SUBMIT_TYPE="Continuous" /home/autobuilder/uscxml/test/ctest/run-tests.cron Note: Be aware that run-tests.cron is under version control and might get updated from git with potentially surprising content. Copy the whole ctest directory someplace safe if you are concerned and make sure to specify USCXML_SOURCE_DIR=/uscxml/checkout/here in the crontab line. Note: We will build in /tmp, make sure there is enough room for all three build directories. Warning: run-tests.cron will pull the current GIT head. Use a dedicated source checkout for testing if this is a problem. # How it works run-tests.cron will setup the environment to call your host-specific test file with ctest. If you do not provide a value for USCXML_SOURCE_DIR it will assume that you want to work with the source containing the script itself. When your host-specific test file is called, you can assume the following facts: * You are the only running ctest instance invoked by run-tests.cron * There is a path to the ctest executable in $ENV{CTEST} * The current working directory is the ctest directory. * The chosen submit type is available as $ENV{CTEST_SUBMIT_TYPE} * The path to the umundo sources is available as $ENV{UMUNDO_SOURCE_DIR} As a host-specific test file, you are expected to prepare test-builds by setting the following variables and call include("common.ctest.inc") for every build you prepared.
VariableComment
CTEST_SITE The name of this build-slave for reporting in the dashboard. Should be the same for all submitted test-builds
CTEST_CMAKE_GENERATOR The generator to use with cmake (e.g. "Unix Makefiles")
CTEST_BUILD_CONFIGURATION "Debug", "Release" ..
CTEST_TOOLCHAIN Path to a cmake toolchain file for cross compiling.
CTEST_BUILD_NAME Name of the particular build you are about to submit (e.g. "darwin-x86_64 llvm bonjour").
CTEST_BUILD_OPTIONS Parameters to be passed to cmake when preparing the build. These will most likely come from one of the tests/*.ctest files.
## Example from the centos6x64-vii build-slave: set(CTEST_CMAKE_GENERATOR "Unix Makefiles") set(CTEST_SITE "centos6x64-vii") set(CTEST_BUILD_CONFIGURATION "Debug") # test with avahi include("tests/avahi.ctest") set(CTEST_BUILD_NAME "linux-x86_64 gcc avahi") include("common.ctest.inc") # test for embedded bonjour include("tests/bonjourEmbedded.ctest") set(CTEST_BUILD_NAME "linux-x86_64 gcc bonjour embedded") include("common.ctest.inc") # test android cross-compile with embedded bonjour include("tests/bonjourEmbedded.ctest") set(CTEST_BUILD_NAME "linux-x86_64-android gcc bonjour embedded") set(CTEST_TOOLCHAIN "$ENV{UMUNDO_SOURCE_DIR}/contrib/cmake/CrossCompile-Android.cmake") include("common.ctest.inc")