2001-06-11 23:28:59 +04:00
# Dart.cmake
#
# This file configures a project to use the Dart testing/dashboard process.
# It is broken into 3 sections.
#
# 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.
#
#
OPTION ( BUILD_TESTING "Build the testing tree." "On" )
IF ( BUILD_TESTING )
2001-06-18 21:16:47 +04:00
INCLUDE ( ${ CMAKE_ROOT } /Modules/FindDart.cmake )
IF ( DART_ROOT )
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.
#
2001-06-18 21:16:47 +04:00
# the project must have a DartConfig.cmake file
INCLUDE ( ${ PROJECT_SOURCE_DIR } /DartConfig.cmake )
2001-11-16 01:11:26 +03:00
# make program just needs to use CMAKE_MAKE_PROGRAM which is required
# to be defined by cmake
SET ( MAKEPROGRAM ${ CMAKE_MAKE_PROGRAM } )
2002-01-22 22:15:15 +03:00
2001-06-11 23:28:59 +04:00
FIND_PROGRAM ( CVSCOMMAND cvs )
2002-01-22 22:15:15 +03:00
SET ( CVS_UPDATE_OPTIONS "-d -A -P" CACHE STRING "Options passed to the cvs update command." )
SET ( DART_TESTING_TIMEOUT 1500 CACHE STRING "Time alloted for a test before Dart will kill the test." )
2001-11-27 02:28:27 +03:00
FIND_PROGRAM ( COMPRESSIONCOMMAND NAMES gzip compress zip
D O C " P a t h t o p r o g r a m u s e d t o c o m p r e s s f i l e s f o r t r a n s f e r t o t h e d a r t s e r v e r " )
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." )
FIND_PROGRAM ( PURIFYCOMMAND purify DOC "Path to Rational purify command, used for memory error detection." )
2002-01-22 22:15:15 +03:00
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)" )
2001-06-11 23:28:59 +04:00
# find a tcl shell command
2001-12-06 19:52:52 +03:00
INCLUDE ( ${ CMAKE_ROOT } /Modules/FindTclsh.cmake )
2001-12-04 18:54:16 +03:00
2001-06-11 23:28:59 +04:00
FIND_PROGRAM ( HOSTNAME hostname /usr/bsd /usr/sbin /usr/bin /bin /sbin )
FIND_PROGRAM ( NSLOOKUP nslookup /usr/bin /usr/sbin /usr/local/bin )
# set the site name
SITE_NAME ( SITE )
# set the build name
BUILD_NAME ( BUILDNAME )
# set the build command
BUILD_COMMAND ( MAKECOMMAND ${ MAKEPROGRAM } )
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 (
S I T E
B U I L D N A M E
M A K E C O M M A N D
H O S T N A M E
N S L O O K U P
J A V A C O M M A N D
P U R I F Y C O M M A N D
G U N Z I P C O M M A N D
C O M P R E S S I O N C O M M A N D
C V S C O M M A N D
2002-01-22 22:15:15 +03:00
C V S _ U P D A T E _ O P T I O N S
D A R T _ T E S T I N G _ T I M E O U T
S C P C O M M A N D
2002-01-15 23:29:31 +03:00
D E L I V E R _ C O N T I N U O U S _ E M A I L
2001-11-27 23:20:18 +03:00
)
2001-06-11 23:28:59 +04:00
#
# Section #2:
#
# Make necessary directories and configure testing scripts
#
# make directories in the binary tree
2001-06-12 03:14:31 +04:00
MAKE_DIRECTORY ( ${ PROJECT_BINARY_DIR } /Testing/HTML/TestingResults/Dashboard )
2001-06-11 23:28:59 +04:00
MAKE_DIRECTORY ( ${ PROJECT_BINARY_DIR } /Testing/HTML/TestingResults/Sites/ ${ SITE } / ${ BUILDNAME } )
# configure files
CONFIGURE_FILE (
2001-06-18 21:16:47 +04:00
$ { D A R T _ R O O T } / S o u r c e / C l i e n t / U t i l i t y . c o n f . i n
$ { P R O J E C T _ B I N A R Y _ D I R } / D a r t C o n f i g u r a t i o n . t c l )
2001-06-11 23:28:59 +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
2001-09-10 23:11:43 +04:00
IF ( TCL_TCLSH )
2001-09-11 22:43:25 +04:00
ADD_CUSTOM_TARGET ( Experimental
$ { T C L _ T C L S H } $ { D A R T _ R O O T } / S o u r c e / C l i e n t / D a s h b o a r d M a n a g e r . t c l $ { P R O J E C T _ B I N A R Y _ D I R } / D a r t C o n f i g u r a t i o n . t c l E x p e r i m e n t a l S t a r t B u i l d T e s t )
2001-07-10 19:56:26 +04:00
ADD_CUSTOM_TARGET ( ExperimentalSubmit
2001-09-10 23:11:43 +04:00
$ { T C L _ T C L S H } $ { D A R T _ R O O T } / S o u r c e / C l i e n t / D a s h b o a r d M a n a g e r . t c l $ { P R O J E C T _ B I N A R Y _ D I R } / D a r t C o n f i g u r a t i o n . t c l E x p e r i m e n t a l S u b m i t )
2001-09-13 22:45:32 +04:00
IF ( UNIX )
2001-11-02 23:26:15 +03:00
# Make targets for Experimental builds
2001-11-15 22:54:26 +03:00
ADD_CUSTOM_TARGET ( ExperimentalStart
$ { T C L _ T C L S H } $ { D A R T _ R O O T } / S o u r c e / C l i e n t / D a s h b o a r d M a n a g e r . t c l $ { P R O J E C T _ B I N A R Y _ D I R } / D a r t C o n f i g u r a t i o n . t c l E x p e r i m e n t a l S t a r t )
2001-11-02 23:26:15 +03:00
ADD_CUSTOM_TARGET ( ExperimentalBuild
$ { T C L _ T C L S H } $ { D A R T _ R O O T } / S o u r c e / C l i e n t / D a s h b o a r d M a n a g e r . t c l $ { P R O J E C T _ B I N A R Y _ D I R } / D a r t C o n f i g u r a t i o n . t c l E x p e r i m e n t a l S t a r t B u i l d )
ADD_CUSTOM_TARGET ( ExperimentalTest
$ { T C L _ T C L S H } $ { D A R T _ R O O T } / S o u r c e / C l i e n t / D a s h b o a r d M a n a g e r . t c l $ { P R O J E C T _ B I N A R Y _ D I R } / D a r t C o n f i g u r a t i o n . t c l E x p e r i m e n t a l T e s t )
ADD_CUSTOM_TARGET ( ExperimentalCoverage
$ { T C L _ T C L S H } $ { D A R T _ R O O T } / S o u r c e / C l i e n t / D a s h b o a r d M a n a g e r . t c l $ { P R O J E C T _ B I N A R Y _ D I R } / D a r t C o n f i g u r a t i o n . t c l E x p e r i m e n t a l C o v e r a g e )
2001-11-25 02:47:48 +03:00
ADD_CUSTOM_TARGET ( ExperimentalDashboardStart
$ { T C L _ T C L S H } $ { D A R T _ R O O T } / S o u r c e / C l i e n t / D a s h b o a r d M a n a g e r . t c l $ { P R O J E C T _ B I N A R Y _ D I R } / D a r t C o n f i g u r a t i o n . t c l E x p e r i m e n t a l D a s h b o a r d S t a r t )
ADD_CUSTOM_TARGET ( ExperimentalDashboardEnd
$ { T C L _ T C L S H } $ { D A R T _ R O O T } / S o u r c e / C l i e n t / D a s h b o a r d M a n a g e r . t c l $ { P R O J E C T _ B I N A R Y _ D I R } / D a r t C o n f i g u r a t i o n . t c l E x p e r i m e n t a l D a s h b o a r d E n d )
2001-11-02 23:26:15 +03:00
2001-11-15 22:54:26 +03:00
# Continuous
ADD_CUSTOM_TARGET ( Continuous
$ { T C L _ T C L S H } $ { D A R T _ R O O T } / S o u r c e / C l i e n t / D a s h b o a r d M a n a g e r . t c l $ { P R O J E C T _ B I N A R Y _ D I R } / D a r t C o n f i g u r a t i o n . t c l C o n t i n u o u s S t a r t U p d a t e B u i l d T e s t S u b m i t )
ADD_CUSTOM_TARGET ( ContinuousStart
$ { T C L _ T C L S H } $ { D A R T _ R O O T } / S o u r c e / C l i e n t / D a s h b o a r d M a n a g e r . t c l $ { P R O J E C T _ B I N A R Y _ D I R } / D a r t C o n f i g u r a t i o n . t c l C o n t i n u o u s S t a r t )
ADD_CUSTOM_TARGET ( ContinuousUpdate
$ { T C L _ T C L S H } $ { D A R T _ R O O T } / S o u r c e / C l i e n t / D a s h b o a r d M a n a g e r . t c l $ { P R O J E C T _ B I N A R Y _ D I R } / D a r t C o n f i g u r a t i o n . t c l C o n t i n u o u s U p d a t e )
ADD_CUSTOM_TARGET ( ContinuousBuild
$ { T C L _ T C L S H } $ { D A R T _ R O O T } / S o u r c e / C l i e n t / D a s h b o a r d M a n a g e r . t c l $ { P R O J E C T _ B I N A R Y _ D I R } / D a r t C o n f i g u r a t i o n . t c l C o n t i n u o u s B u i l d )
ADD_CUSTOM_TARGET ( ContinuousTest
$ { T C L _ T C L S H } $ { D A R T _ R O O T } / S o u r c e / C l i e n t / D a s h b o a r d M a n a g e r . t c l $ { P R O J E C T _ B I N A R Y _ D I R } / D a r t C o n f i g u r a t i o n . t c l C o n t i n u o u s T e s t )
ADD_CUSTOM_TARGET ( ContinuousCoverage
$ { T C L _ T C L S H } $ { D A R T _ R O O T } / S o u r c e / C l i e n t / D a s h b o a r d M a n a g e r . t c l $ { P R O J E C T _ B I N A R Y _ D I R } / D a r t C o n f i g u r a t i o n . t c l C o n t i n u o u s C o v e r a g e )
ADD_CUSTOM_TARGET ( ContinuousSubmit
$ { T C L _ T C L S H } $ { D A R T _ R O O T } / S o u r c e / C l i e n t / D a s h b o a r d M a n a g e r . t c l $ { P R O J E C T _ B I N A R Y _ D I R } / D a r t C o n f i g u r a t i o n . t c l C o n t i n u o u s S u b m i t )
2001-11-02 23:26:15 +03:00
# Nightly
2001-09-13 22:45:32 +04:00
ADD_CUSTOM_TARGET ( Nightly
2001-11-15 22:54:26 +03:00
$ { T C L _ T C L S H } $ { D A R T _ R O O T } / S o u r c e / C l i e n t / D a s h b o a r d M a n a g e r . t c l $ { P R O J E C T _ B I N A R Y _ D I R } / D a r t C o n f i g u r a t i o n . t c l N i g h t l y S t a r t U p d a t e B u i l d T e s t S u b m i t )
ADD_CUSTOM_TARGET ( NightlyStart
$ { T C L _ T C L S H } $ { D A R T _ R O O T } / S o u r c e / C l i e n t / D a s h b o a r d M a n a g e r . t c l $ { P R O J E C T _ B I N A R Y _ D I R } / D a r t C o n f i g u r a t i o n . t c l N i g h t l y S t a r t )
ADD_CUSTOM_TARGET ( NightlyUpdate
$ { T C L _ T C L S H } $ { D A R T _ R O O T } / S o u r c e / C l i e n t / D a s h b o a r d M a n a g e r . t c l $ { P R O J E C T _ B I N A R Y _ D I R } / D a r t C o n f i g u r a t i o n . t c l N i g h t l y U p d a t e )
2001-09-13 22:45:32 +04:00
ADD_CUSTOM_TARGET ( NightlyBuild
2001-11-15 22:54:26 +03:00
$ { T C L _ T C L S H } $ { D A R T _ R O O T } / S o u r c e / C l i e n t / D a s h b o a r d M a n a g e r . t c l $ { P R O J E C T _ B I N A R Y _ D I R } / D a r t C o n f i g u r a t i o n . t c l N i g h t l y B u i l d )
2001-09-13 22:45:32 +04:00
ADD_CUSTOM_TARGET ( NightlyTest
$ { T C L _ T C L S H } $ { D A R T _ R O O T } / S o u r c e / C l i e n t / D a s h b o a r d M a n a g e r . t c l $ { P R O J E C T _ B I N A R Y _ D I R } / D a r t C o n f i g u r a t i o n . t c l N i g h t l y T e s t )
2001-09-17 20:07:24 +04:00
ADD_CUSTOM_TARGET ( NightlyCoverage
2001-09-27 00:23:56 +04:00
$ { T C L _ T C L S H } $ { D A R T _ R O O T } / S o u r c e / C l i e n t / D a s h b o a r d M a n a g e r . t c l $ { P R O J E C T _ B I N A R Y _ D I R } / D a r t C o n f i g u r a t i o n . t c l N i g h t l y C o v e r a g e )
2001-09-13 22:45:32 +04:00
ADD_CUSTOM_TARGET ( NightlySubmit
$ { T C L _ T C L S H } $ { D A R T _ R O O T } / S o u r c e / C l i e n t / D a s h b o a r d M a n a g e r . t c l $ { P R O J E C T _ B I N A R Y _ D I R } / D a r t C o n f i g u r a t i o n . t c l N i g h t l y S u b m i t )
ADD_CUSTOM_TARGET ( NightlyDashboardStart
$ { T C L _ T C L S H } $ { D A R T _ R O O T } / S o u r c e / C l i e n t / D a s h b o a r d M a n a g e r . t c l $ { P R O J E C T _ B I N A R Y _ D I R } / D a r t C o n f i g u r a t i o n . t c l N i g h t l y D a s h b o a r d S t a r t )
ADD_CUSTOM_TARGET ( NightlyDashboardEnd
$ { T C L _ T C L S H } $ { D A R T _ R O O T } / S o u r c e / C l i e n t / D a s h b o a r d M a n a g e r . t c l $ { P R O J E C T _ B I N A R Y _ D I R } / D a r t C o n f i g u r a t i o n . t c l N i g h t l y D a s h b o a r d E n d )
ENDIF ( UNIX )
2001-09-10 23:11:43 +04:00
ELSE ( TCL_TCLSH )
MESSAGE ( "Could not find TCL_TCLSH, disabling testing." "Error" )
ENDIF ( TCL_TCLSH )
2001-07-18 18:17:17 +04:00
ENABLE_TESTING ( )
2001-06-11 23:28:59 +04:00
2001-06-18 21:16:47 +04:00
ENDIF ( DART_ROOT )
2001-06-11 23:28:59 +04:00
ENDIF ( BUILD_TESTING )
#
# End of Dart.cmake
#