3 # This file configures a project to use the Dart testing/dashboard process.
4 # It is broken into 3 sections.
6 # Section #1: Locate programs on the client and determine site and build name
7 # Section #2: Configure or copy Tcl scripts from the source tree to build tree
8 # Section #3: Custom targets for performing dashboard builds.
11 OPTION(BUILD_TESTING "Build the testing tree." "On")
14 INCLUDE(${CMAKE_ROOT}/Modules/FindDart.cmake)
20 # CMake commands that will not vary from project to project. Locates programs
21 # on the client and configure site name and build name.
24 # the project must have a DartConfig.cmake file
25 INCLUDE(${PROJECT_SOURCE_DIR}/DartConfig.cmake)
27 # make program just needs to use CMAKE_MAKE_PROGRAM which is required
28 # to be defined by cmake
29 SET(MAKEPROGRAM ${CMAKE_MAKE_PROGRAM})
30 OPTION(VERBOSE_BUILD "Show the actual output of the build, or if off show a . for each 1024 bytes." "OFF")
32 FIND_PROGRAM(CVSCOMMAND cvs )
33 SET(CVS_UPDATE_OPTIONS "-d -A -P" CACHE STRING "Options passed to the cvs update command.")
35 SET(DART_TESTING_TIMEOUT 1500 CACHE STRING "Time alloted for a test before Dart will kill the test.")
37 FIND_PROGRAM(COMPRESSIONCOMMAND NAMES gzip compress zip
38 DOC "Path to program used to compress files for transfer to the dart server")
39 FIND_PROGRAM(GUNZIPCOMMAND gunzip DOC "Path to gunzip executable")
40 FIND_PROGRAM(JAVACOMMAND java DOC "Path to java command, used by the Dart server to create html.")
41 FIND_PROGRAM(PURIFYCOMMAND purify
42 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Rational Software\\Purify\\Setup;InstallFolder]"
43 DOC "Path to Rational purify command, used for memory error detection."
45 FIND_PROGRAM(SCPCOMMAND scp DOC "Path to scp command, used by some Dart clients for submitting results to a Dart server (when not using ftp for submissions)")
47 # find a tcl shell command
48 INCLUDE(${CMAKE_ROOT}/Modules/FindTclsh.cmake)
54 # set the build command
55 BUILD_COMMAND(MAKECOMMAND ${MAKEPROGRAM} )
57 SET (DELIVER_CONTINUOUS_EMAIL "Off" CACHE BOOL "Should Dart server send email when build errors are found in Continuous builds?")
72 DELIVER_CONTINUOUS_EMAIL
78 # Make necessary directories and configure testing scripts
81 # make directories in the binary tree
82 MAKE_DIRECTORY(${PROJECT_BINARY_DIR}/Testing/HTML/TestingResults/Dashboard)
83 MAKE_DIRECTORY(${PROJECT_BINARY_DIR}/Testing/HTML/TestingResults/Sites/${SITE}/${BUILDNAME})
87 ${DART_ROOT}/Source/Client/Utility.conf.in
88 ${PROJECT_BINARY_DIR}/DartConfiguration.tcl )
93 # Custom targets to perform dashboard builds and submissions.
94 # These should NOT need to be modified from project to project.
99 ADD_CUSTOM_TARGET(Experimental
100 ${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Experimental Start Build Test)
101 ADD_CUSTOM_TARGET(ExperimentalSubmit
102 ${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Experimental Submit)
104 # for non IDE based builds nmake and make
105 # add all these extra targets
106 IF(${CMAKE_BUILD_TOOL} MATCH make)
107 # Make targets for Experimental builds
108 ADD_CUSTOM_TARGET(ExperimentalStart
109 ${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Experimental Start)
110 ADD_CUSTOM_TARGET(ExperimentalBuild
111 ${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Experimental Start Build)
112 ADD_CUSTOM_TARGET(ExperimentalTest
113 ${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Experimental Test)
114 ADD_CUSTOM_TARGET(ExperimentalCoverage
115 ${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Experimental Coverage)
116 ADD_CUSTOM_TARGET(ExperimentalDashboardStart
117 ${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Experimental DashboardStart)
118 ADD_CUSTOM_TARGET(ExperimentalDashboardEnd
119 ${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Experimental DashboardEnd)
122 ADD_CUSTOM_TARGET(Continuous
123 ${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Continuous Start Update Build Test Submit)
124 ADD_CUSTOM_TARGET(ContinuousStart
125 ${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Continuous Start)
126 ADD_CUSTOM_TARGET(ContinuousUpdate
127 ${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Continuous Update)
128 ADD_CUSTOM_TARGET(ContinuousBuild
129 ${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Continuous Build)
130 ADD_CUSTOM_TARGET(ContinuousTest
131 ${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Continuous Test)
132 ADD_CUSTOM_TARGET(ContinuousCoverage
133 ${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Continuous Coverage)
134 ADD_CUSTOM_TARGET(ContinuousSubmit
135 ${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Continuous Submit)
138 ADD_CUSTOM_TARGET(Nightly
139 ${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Nightly Start Update Build Test Submit)
140 ADD_CUSTOM_TARGET(NightlyStart
141 ${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Nightly Start)
142 ADD_CUSTOM_TARGET(NightlyUpdate
143 ${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Nightly Update)
144 ADD_CUSTOM_TARGET(NightlyBuild
145 ${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Nightly Build)
146 ADD_CUSTOM_TARGET(NightlyTest
147 ${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Nightly Test)
148 ADD_CUSTOM_TARGET(NightlyCoverage
149 ${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Nightly Coverage)
150 ADD_CUSTOM_TARGET(NightlySubmit
151 ${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Nightly Submit)
152 ADD_CUSTOM_TARGET(NightlyDashboardStart
153 ${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Nightly DashboardStart)
154 ADD_CUSTOM_TARGET(NightlyDashboardEnd
155 ${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Nightly DashboardEnd)
159 MESSAGE("Could not find TCL_TCLSH, disabling testing." "Error")