Add files needed for experimental, continueus and nightly builds
[u/mrichter/AliRoot.git] / AliRoot_test.cmake
CommitLineData
ac23a950 1 ################################################################################
2 # Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH #
3 # #
4 # This software is distributed under the terms of the #
5 # GNU Lesser General Public Licence version 3 (LGPL) version 3, #
6 # copied verbatim in the file "LICENSE" #
7 ################################################################################
8SET (CTEST_SOURCE_DIRECTORY $ENV{SOURCEDIR})
9SET (CTEST_BINARY_DIRECTORY $ENV{BUILDDIR})
10SET (CTEST_ROOTSYS_DIRECTORY $ENV{ROOTSYS})
11SET (CTEST_SITE $ENV{SITE})
12SET (CTEST_BUILD_NAME $ENV{LABEL})
13SET (CTEST_CMAKE_GENERATOR "Unix Makefiles")
14SET (CTEST_PROJECT_NAME "ALIROOT")
15
16Find_program(CTEST_GIT_COMMAND NAMES git)
17Set(CTEST_UPDATE_COMMAND "${CTEST_GIT_COMMAND}")
18
19#If($ENV{ctest_model} MATCHES Continuous)
20# Set(CTEST_SVN_UPDATE_OPTIONS "$ENV{REVISION}")
21#EndIf($ENV{ctest_model} MATCHES Continuous)
22
23SET (BUILD_COMMAND "make")
24SET (CTEST_BUILD_COMMAND "${BUILD_COMMAND} -j$ENV{number_of_processors}")
25
26If($ENV{ctest_model} MATCHES Nightly)
27
28Set (CTEST_CONFIGURE_COMMAND " \"${CMAKE_EXECUTABLE_NAME}\" \"-DCMAKE_BUILD_TYPE=NIGHTLY\" \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_SOURCE_DIRECTORY}\" \"-DROOTSYS=${CTEST_ROOTSYS_DIRECTORY}" ")
29
30 # get the information about conflicting or localy modified files
31 # from svn, extract the relavant information about the file name
32 # and put the result in the output variable
33# execute_process(COMMAND svn stat -u
34# COMMAND grep ^[CM]
35# COMMAND cut -c21-
36# OUTPUT_VARIABLE FILELIST
37# )
38
39 # create out of the output a cmake list. This step is done to convert the
40 # stream into seperated filenames.
41 # The trick is to exchange an "\n" by an ";" which is the separartor in
42 # a list created by cmake
43# STRING(REGEX REPLACE "\n" ";" _result "${FILELIST}")
44
45# FOREACH(_file ${_result})
46# STRING(STRIP "${_file}" _file1)
47# SET (CTEST_NOTES_FILES ${CTEST_NOTES_FILES} "${CTEST_SOURCE_DIRECTORY}/${_file1}")
48# ENDFOREACH(_file ${_result})
49
50 CTEST_EMPTY_BINARY_DIRECTORY(${CTEST_BINARY_DIRECTORY})
51
52endif($ENV{ctest_model} MATCHES Nightly)
53
54configure_file(${CTEST_SOURCE_DIRECTORY}/CTestCustom.cmake
55 ${CTEST_BINARY_DIRECTORY}/CTestCustom.cmake
56 )
57ctest_read_custom_files("${CTEST_BINARY_DIRECTORY}")
58
59CTEST_START ($ENV{ctest_model})
60CTEST_UPDATE (SOURCE "${CTEST_SOURCE_DIRECTORY}")
61CTEST_CONFIGURE (BUILD "${CTEST_BINARY_DIRECTORY}")
62CTEST_BUILD (BUILD "${CTEST_BINARY_DIRECTORY}")
63CTEST_TEST (BUILD "${CTEST_BINARY_DIRECTORY}" PARALLEL_LEVEL $ENV{number_of_processors})
64CTEST_SUBMIT ()
65