2007-05-15 18:23:40 +04:00
|
|
|
# - Configure a project for testing with CTest or old Dart Tcl Client
|
|
|
|
# This file is the backwards-compatibility version of the CTest module.
|
|
|
|
# It supports using the old Dart 1 Tcl client for driving dashboard
|
|
|
|
# submissions as well as testing with CTest. This module should be included
|
|
|
|
# in the CMakeLists.txt file at the top of a project. Typical usage:
|
|
|
|
# INCLUDE(Dart)
|
|
|
|
# IF(BUILD_TESTING)
|
|
|
|
# # ... testing related CMake code ...
|
|
|
|
# ENDIF(BUILD_TESTING)
|
|
|
|
# The BUILD_TESTING option is created by the Dart module to determine
|
|
|
|
# whether testing support should be enabled. The default is ON.
|
|
|
|
|
2001-06-11 23:28:59 +04:00
|
|
|
# This file configures a project to use the Dart testing/dashboard process.
|
|
|
|
# It is broken into 3 sections.
|
2007-05-15 18:23:40 +04:00
|
|
|
#
|
2005-12-14 21:51:08 +03:00
|
|
|
# Section #1: Locate programs on the client and determine site and build name
|
|
|
|
# Section #2: Configure or copy Tcl scripts from the source tree to build tree
|
|
|
|
# Section #3: Custom targets for performing dashboard builds.
|
2001-06-11 23:28:59 +04:00
|
|
|
#
|
|
|
|
#
|
2005-08-03 21:19:22 +04:00
|
|
|
OPTION(BUILD_TESTING "Build the testing tree." ON)
|
2001-06-11 23:28:59 +04:00
|
|
|
|
|
|
|
IF(BUILD_TESTING)
|
2005-08-03 21:19:22 +04:00
|
|
|
FIND_PACKAGE(Dart)
|
2001-06-18 21:16:47 +04:00
|
|
|
|
2001-06-11 23:28:59 +04:00
|
|
|
#
|
|
|
|
# Section #1:
|
|
|
|
#
|
|
|
|
# CMake commands that will not vary from project to project. Locates programs
|
|
|
|
# on the client and configure site name and build name.
|
|
|
|
#
|
|
|
|
|
2005-08-03 21:19:22 +04:00
|
|
|
SET(RUN_FROM_DART 1)
|
|
|
|
INCLUDE(CTest)
|
|
|
|
SET(RUN_FROM_DART)
|
2003-02-21 01:38:16 +03:00
|
|
|
|
2005-08-03 21:19:22 +04:00
|
|
|
FIND_PROGRAM(COMPRESSIONCOMMAND NAMES gzip compress zip
|
|
|
|
DOC "Path to program used to compress files for transfer to the dart server")
|
|
|
|
FIND_PROGRAM(GUNZIPCOMMAND gunzip DOC "Path to gunzip executable")
|
|
|
|
FIND_PROGRAM(JAVACOMMAND java DOC "Path to java command, used by the Dart server to create html.")
|
2003-05-02 21:57:25 +04:00
|
|
|
OPTION(DART_VERBOSE_BUILD "Show the actual output of the build, or if off show a . for each 1024 bytes."
|
|
|
|
OFF)
|
2003-03-03 17:32:45 +03:00
|
|
|
OPTION(DART_BUILD_ERROR_REPORT_LIMIT "Limit of reported errors, -1 reports all." -1 )
|
|
|
|
OPTION(DART_BUILD_WARNING_REPORT_LIMIT "Limit of reported warnings, -1 reports all." -1 )
|
|
|
|
|
|
|
|
SET(VERBOSE_BUILD ${DART_VERBOSE_BUILD})
|
|
|
|
SET(BUILD_ERROR_REPORT_LIMIT ${DART_BUILD_ERROR_REPORT_LIMIT})
|
|
|
|
SET(BUILD_WARNING_REPORT_LIMIT ${DART_BUILD_WARNING_REPORT_LIMIT})
|
2002-01-15 23:29:31 +03:00
|
|
|
SET (DELIVER_CONTINUOUS_EMAIL "Off" CACHE BOOL "Should Dart server send email when build errors are found in Continuous builds?")
|
|
|
|
|
2001-11-27 23:20:18 +03:00
|
|
|
MARK_AS_ADVANCED(
|
|
|
|
COMPRESSIONCOMMAND
|
2003-12-17 17:42:52 +03:00
|
|
|
DART_BUILD_ERROR_REPORT_LIMIT
|
|
|
|
DART_BUILD_WARNING_REPORT_LIMIT
|
2002-01-22 22:15:15 +03:00
|
|
|
DART_TESTING_TIMEOUT
|
2003-12-17 17:42:52 +03:00
|
|
|
DART_VERBOSE_BUILD
|
2002-01-15 23:29:31 +03:00
|
|
|
DELIVER_CONTINUOUS_EMAIL
|
2003-12-17 17:42:52 +03:00
|
|
|
GUNZIPCOMMAND
|
|
|
|
JAVACOMMAND
|
2003-05-02 21:57:25 +04:00
|
|
|
)
|
2001-11-27 23:20:18 +03:00
|
|
|
|
2005-01-28 21:20:53 +03:00
|
|
|
SET(HAVE_DART)
|
|
|
|
IF(EXISTS "${DART_ROOT}/Source/Client/Dart.conf.in")
|
|
|
|
SET(HAVE_DART 1)
|
|
|
|
ENDIF(EXISTS "${DART_ROOT}/Source/Client/Dart.conf.in")
|
|
|
|
|
2001-06-11 23:28:59 +04:00
|
|
|
#
|
|
|
|
# Section #2:
|
|
|
|
#
|
|
|
|
# Make necessary directories and configure testing scripts
|
|
|
|
#
|
2004-10-13 02:29:04 +04:00
|
|
|
# find a tcl shell command
|
2005-01-28 21:20:53 +03:00
|
|
|
IF(HAVE_DART)
|
2005-08-03 21:19:22 +04:00
|
|
|
FIND_PACKAGE(Tclsh)
|
2005-01-28 21:20:53 +03:00
|
|
|
ENDIF(HAVE_DART)
|
2004-10-13 02:29:04 +04:00
|
|
|
|
2001-06-11 23:28:59 +04:00
|
|
|
|
2005-01-28 21:20:53 +03:00
|
|
|
IF (HAVE_DART AND TCL_TCLSH)
|
2003-05-02 21:57:25 +04:00
|
|
|
# make directories in the binary tree
|
2005-08-03 21:19:22 +04:00
|
|
|
FILE(MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/Testing/HTML/TestingResults/Dashboard"
|
|
|
|
"${PROJECT_BINARY_DIR}/Testing/HTML/TestingResults/Sites/${SITE}/${BUILDNAME}")
|
2001-06-11 23:28:59 +04:00
|
|
|
|
2003-05-02 21:57:25 +04:00
|
|
|
# configure files
|
|
|
|
CONFIGURE_FILE(
|
2005-08-03 21:19:22 +04:00
|
|
|
"${DART_ROOT}/Source/Client/Dart.conf.in"
|
|
|
|
"${PROJECT_BINARY_DIR}/DartConfiguration.tcl" )
|
2001-06-11 23:28:59 +04:00
|
|
|
|
2003-05-02 21:57:25 +04:00
|
|
|
#
|
|
|
|
# Section 3:
|
|
|
|
#
|
|
|
|
# Custom targets to perform dashboard builds and submissions.
|
|
|
|
# These should NOT need to be modified from project to project.
|
|
|
|
#
|
|
|
|
|
|
|
|
# add testing targets
|
2004-10-13 02:29:04 +04:00
|
|
|
SET(DART_EXPERIMENTAL_NAME Experimental)
|
|
|
|
IF(DART_EXPERIMENTAL_USE_PROJECT_NAME)
|
|
|
|
SET(DART_EXPERIMENTAL_NAME "${DART_EXPERIMENTAL_NAME}${PROJECT_NAME}")
|
|
|
|
ENDIF(DART_EXPERIMENTAL_USE_PROJECT_NAME)
|
|
|
|
ADD_CUSTOM_TARGET(${DART_EXPERIMENTAL_NAME}
|
|
|
|
${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Experimental Start Update Configure Build Test)
|
|
|
|
ADD_CUSTOM_TARGET(${DART_EXPERIMENTAL_NAME}Submit
|
|
|
|
${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Experimental Submit)
|
|
|
|
|
|
|
|
# for non IDE based builds nmake and make
|
|
|
|
# add all these extra targets
|
|
|
|
IF(${CMAKE_MAKE_PROGRAM} MATCHES make)
|
|
|
|
# Make targets for Experimental builds
|
|
|
|
ADD_CUSTOM_TARGET(ExperimentalStart
|
|
|
|
${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Experimental Start)
|
|
|
|
ADD_CUSTOM_TARGET(ExperimentalUpdate
|
|
|
|
${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Experimental Start Update)
|
|
|
|
ADD_CUSTOM_TARGET(ExperimentalConfigure
|
|
|
|
${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Experimental Start Configure)
|
|
|
|
ADD_CUSTOM_TARGET(ExperimentalBuild
|
|
|
|
${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Experimental Start Build)
|
|
|
|
ADD_CUSTOM_TARGET(ExperimentalTest
|
|
|
|
${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Experimental Test)
|
|
|
|
ADD_CUSTOM_TARGET(ExperimentalCoverage
|
|
|
|
${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Experimental Coverage)
|
|
|
|
ADD_CUSTOM_TARGET(ExperimentalDashboardStart
|
|
|
|
${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Experimental DashboardStart)
|
|
|
|
ADD_CUSTOM_TARGET(ExperimentalDashboardEnd
|
|
|
|
${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Experimental DashboardEnd)
|
|
|
|
|
|
|
|
# Continuous
|
|
|
|
ADD_CUSTOM_TARGET(Continuous
|
|
|
|
${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Continuous Start Update Configure Build Test Submit)
|
|
|
|
ADD_CUSTOM_TARGET(ContinuousStart
|
|
|
|
${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Continuous Start)
|
|
|
|
ADD_CUSTOM_TARGET(ContinuousUpdate
|
|
|
|
${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Continuous Update)
|
|
|
|
ADD_CUSTOM_TARGET(ContinuousConfigure
|
|
|
|
${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Continuous Configure)
|
|
|
|
ADD_CUSTOM_TARGET(ContinuousBuild
|
|
|
|
${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Continuous Build)
|
|
|
|
ADD_CUSTOM_TARGET(ContinuousTest
|
|
|
|
${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Continuous Test)
|
|
|
|
ADD_CUSTOM_TARGET(ContinuousCoverage
|
|
|
|
${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Continuous Coverage)
|
|
|
|
ADD_CUSTOM_TARGET(ContinuousSubmit
|
|
|
|
${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Continuous Submit)
|
|
|
|
|
|
|
|
# Nightly
|
|
|
|
ADD_CUSTOM_TARGET(Nightly
|
|
|
|
${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Nightly Start Update Configure Build Test Submit)
|
|
|
|
ADD_CUSTOM_TARGET(NightlyStart
|
|
|
|
${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Nightly Start)
|
|
|
|
ADD_CUSTOM_TARGET(NightlyUpdate
|
|
|
|
${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Nightly Update)
|
|
|
|
ADD_CUSTOM_TARGET(NightlyConfigure
|
|
|
|
${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Nightly Configure)
|
|
|
|
ADD_CUSTOM_TARGET(NightlyBuild
|
|
|
|
${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Nightly Build)
|
|
|
|
ADD_CUSTOM_TARGET(NightlyTest
|
|
|
|
${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Nightly Test)
|
|
|
|
ADD_CUSTOM_TARGET(NightlyCoverage
|
|
|
|
${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Nightly Coverage)
|
|
|
|
ADD_CUSTOM_TARGET(NightlySubmit
|
|
|
|
${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Nightly Submit)
|
|
|
|
ADD_CUSTOM_TARGET(NightlyDashboardStart
|
|
|
|
${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Nightly DashboardStart)
|
|
|
|
ADD_CUSTOM_TARGET(NightlyDashboardEnd
|
|
|
|
${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Nightly DashboardEnd)
|
|
|
|
ENDIF (${CMAKE_MAKE_PROGRAM} MATCHES make)
|
|
|
|
|
2005-01-28 21:20:53 +03:00
|
|
|
ELSE(HAVE_DART AND TCL_TCLSH)
|
2005-08-03 21:19:22 +04:00
|
|
|
SET(RUN_FROM_CTEST_OR_DART 1)
|
|
|
|
INCLUDE(CTestTargets)
|
|
|
|
SET(RUN_FROM_CTEST_OR_DART)
|
2005-01-28 21:20:53 +03:00
|
|
|
ENDIF (HAVE_DART AND TCL_TCLSH)
|
2001-06-11 23:28:59 +04:00
|
|
|
ENDIF(BUILD_TESTING)
|
|
|
|
|
|
|
|
#
|
|
|
|
# End of Dart.cmake
|
|
|
|
#
|
2003-05-02 21:57:25 +04:00
|
|
|
|