Add files needed for experimental, continueus and nightly builds
authormalturan <mohammad.al-turany@cern.ch>
Wed, 4 Feb 2015 09:21:01 +0000 (10:21 +0100)
committerhristov <Peter.Hristov@cern.ch>
Wed, 4 Feb 2015 13:17:30 +0000 (14:17 +0100)
AliRoot_test.cmake [new file with mode: 0644]
CTestConfig.cmake
CTestCustom.cmake [new file with mode: 0644]
Dart.sh [new file with mode: 0755]

diff --git a/AliRoot_test.cmake b/AliRoot_test.cmake
new file mode 100644 (file)
index 0000000..683c8a3
--- /dev/null
@@ -0,0 +1,65 @@
+ ################################################################################
+ #    Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH    #
+ #                                                                              #
+ #              This software is distributed under the terms of the             # 
+ #         GNU Lesser General Public Licence version 3 (LGPL) version 3,        #  
+ #                  copied verbatim in the file "LICENSE"                       #
+ ################################################################################
+SET (CTEST_SOURCE_DIRECTORY $ENV{SOURCEDIR})
+SET (CTEST_BINARY_DIRECTORY $ENV{BUILDDIR})
+SET (CTEST_ROOTSYS_DIRECTORY $ENV{ROOTSYS})
+SET (CTEST_SITE $ENV{SITE})
+SET (CTEST_BUILD_NAME $ENV{LABEL})
+SET (CTEST_CMAKE_GENERATOR "Unix Makefiles")
+SET (CTEST_PROJECT_NAME "ALIROOT")
+
+Find_program(CTEST_GIT_COMMAND NAMES git)
+Set(CTEST_UPDATE_COMMAND "${CTEST_GIT_COMMAND}")
+
+#If($ENV{ctest_model} MATCHES Continuous)
+#  Set(CTEST_SVN_UPDATE_OPTIONS "$ENV{REVISION}")
+#EndIf($ENV{ctest_model} MATCHES Continuous)
+
+SET (BUILD_COMMAND "make")
+SET (CTEST_BUILD_COMMAND "${BUILD_COMMAND} -j$ENV{number_of_processors}")
+
+If($ENV{ctest_model} MATCHES Nightly)
+
+Set (CTEST_CONFIGURE_COMMAND " \"${CMAKE_EXECUTABLE_NAME}\" \"-DCMAKE_BUILD_TYPE=NIGHTLY\" \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_SOURCE_DIRECTORY}\" \"-DROOTSYS=${CTEST_ROOTSYS_DIRECTORY}"  ")
+
+  # get the information about conflicting or localy modified files
+  # from svn, extract the relavant information about the file name
+  # and put the result in the output variable
+#  execute_process(COMMAND svn stat -u  
+#                  COMMAND grep ^[CM]
+#                  COMMAND cut -c21- 
+#                  OUTPUT_VARIABLE FILELIST
+#                  )
+
+  # create out of the output a cmake list. This step is done to convert the
+  # stream into seperated filenames.
+  # The trick is to exchange an "\n" by an ";" which is the separartor in
+  # a list created by cmake 
+#  STRING(REGEX REPLACE "\n" ";" _result "${FILELIST}")
+
+#  FOREACH(_file ${_result})
+#    STRING(STRIP "${_file}" _file1)
+#    SET (CTEST_NOTES_FILES ${CTEST_NOTES_FILES} "${CTEST_SOURCE_DIRECTORY}/${_file1}")
+#  ENDFOREACH(_file ${_result})
+
+  CTEST_EMPTY_BINARY_DIRECTORY(${CTEST_BINARY_DIRECTORY})
+
+endif($ENV{ctest_model} MATCHES Nightly)
+
+configure_file(${CTEST_SOURCE_DIRECTORY}/CTestCustom.cmake
+               ${CTEST_BINARY_DIRECTORY}/CTestCustom.cmake
+              )
+ctest_read_custom_files("${CTEST_BINARY_DIRECTORY}")
+
+CTEST_START ($ENV{ctest_model})
+CTEST_UPDATE (SOURCE "${CTEST_SOURCE_DIRECTORY}")
+CTEST_CONFIGURE (BUILD "${CTEST_BINARY_DIRECTORY}")
+CTEST_BUILD (BUILD "${CTEST_BINARY_DIRECTORY}")
+CTEST_TEST (BUILD "${CTEST_BINARY_DIRECTORY}" PARALLEL_LEVEL $ENV{number_of_processors})
+CTEST_SUBMIT ()
index 6055849..c0b5277 100644 (file)
@@ -1,21 +1,18 @@
+ ################################################################################
+ #    Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH    #
+ #                                                                              #
+ #              This software is distributed under the terms of the             # 
+ #         GNU Lesser General Public Licence version 3 (LGPL) version 3,        #  
+ #                  copied verbatim in the file "LICENSE"                       #
+ ################################################################################
+# Dashboard is opened for submissions for a 24 hour period starting at
+# the specified NIGHLY_START_TIME. Time is specified in 24 hour format.
 set(CTEST_PROJECT_NAME "AliRoot")
-set(CTEST_NIGHTLY_START_TIME "00:00:00 EST")
+set(CTEST_NIGHTLY_START_TIME "00:00:00 CEST")
+
 set(CTEST_DROP_METHOD "http")
-set(CTEST_DROP_SITE "alirootbuildcmake.cern.ch")
-set(CTEST_DROP_LOCATION "/submit.php?project=AliRoot")
+set(CTEST_DROP_SITE "cdash.gsi.de")
+set(CTEST_DROP_LOCATION "/CDash/submit.php?project=AliceO2")
 set(CTEST_DROP_SITE_CDASH TRUE)
-set(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_ERRORS "1000")
-set(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS "1000")
-set(CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE "5000")
-set(CTEST_PROJECT_SUBPROJECTS STEER PHOS TRD TPC ZDC MUON PMD FMD TOF ITS
-      AD ACORDE HMPID T0 BCM STRUCT EVGEN RALICE VZERO 
-      THijing THbtp EMCAL 
-      THerwig TEPEMGEN FASTSIM TPHIC RAW MONITOR ANALYSIS 
-      JETAN HLT LHC ESDCheck STAT TTherminator CORRFW DPMJET TDPMjet 
-      PWG0 PWGPP PWG2 PWG3 PWG4 TRIGGER
-      TUHKMgen EPOS PYTHIA8 EVE TFluka
-      THydjet SHUTTLE PYTHIA6
-      LHAPDF HIJING MICROCERN HERWIG
-      ALIROOT
-)
 
+set(CTEST_TESTING_TIMEOUT 60)
diff --git a/CTestCustom.cmake b/CTestCustom.cmake
new file mode 100644 (file)
index 0000000..969e6d0
--- /dev/null
@@ -0,0 +1,137 @@
+ ################################################################################
+ #    Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH    #
+ #                                                                              #
+ #              This software is distributed under the terms of the             # 
+ #         GNU Lesser General Public Licence version 3 (LGPL) version 3,        #  
+ #                  copied verbatim in the file "LICENSE"                       #
+ ################################################################################
+# -*- mode: cmake -*-
+
+#message(" -- Read CTestCustom.cmake --")
+
+# -----------------------------------------------------------
+# -- Number of warnings to display
+# -----------------------------------------------------------
+
+set(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS "500" )
+
+# -----------------------------------------------------------
+# -- Number of errors to display
+# -----------------------------------------------------------
+
+set(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_ERRORS   "50" )
+
+# -----------------------------------------------------------
+# -- Warning execptions
+# -----------------------------------------------------------
+
+set(CTEST_CUSTOM_WARNING_EXCEPTION
+       ${CTEST_CUSTOM_WARNING_EXCEPTION}
+
+       # -- doxygen warnings
+#      "of command \@param is not found in the argument list of" 
+#      "for \\link command"
+#      "for \\ref command"
+#      "\\class statement"
+#      "\\file statement"
+#      "are not documented:"
+#      "Skipping documentation"
+#      "has a brief description"
+
+       # -- CLHEP and Pluto warnings
+        "/include/CLHEP/"
+        "PDataBase.h"
+       "PMesh.h" 
+        "PParticle.h"
+        "PStaticData.h"
+        "PUtils.h"
+        "include/pluto/"
+
+        # -- warnings from ubuntu systems which are a little to much
+        # -- probably defined warn-unused-result. ignoring the result
+        # -- of fgets is common practice. A work around would be to
+        # -- store the return value in a dummy variable
+        "ignoring return value of 'char* fgets(char*, int, FILE*)'"
+        "ignoring return value of 'char* fscanf(char*, int, FILE*)'"
+
+        # -- boost warnings
+        "/include/boost/exception/exception.hpp:"
+        "/include/boost/smart_ptr/detail/sp_convertible.hpp:"
+        "/include/boost/smart_ptr/shared_ptr.hpp:"  
+        "/include/boost/"
+
+        # -- Root warnings when installed in installation dir
+        "/include/root/"
+        # -- Root warnings which should not show up in the test setup
+        "/include/G__ci.h:"
+        "/include/TAttImage.h:"
+        "/include/TBuffer.h:"
+        "/include/TCollectionProxyInfo.h"
+        "/include/TCut.h:"
+        "/include/TChainElement.h:"
+        "/include/TEveBoxSet.h:"
+        "/include/TEveTrackPropagator.h:"
+        "/include/TEveTrackPropagator.h:"
+        "/include/TEveVector.h:"
+        "/include/TFcnAdapter.h:"
+        "/include/TFitterMinuit.h:"
+        "/include/TGeoMatrix.h:"
+        "/include/TGeoPainter.h:"
+        "/include/TList.h:"
+        "/include/TMap.h:"
+        "/include/TMatrixT.h:"
+        "/include/TMatrixTSym.h:"
+        "/include/TMemberInspector.h:"
+        "/include/TObjArray.h:"
+        "/include/TRefArray.h:"
+        "/include/TString.h:"
+        "/include/Minuit2/BasicFunctionGradient.h:"
+        "/include/Minuit2/MnUserParameterState.h:"
+        "/include/Minuit2/StackAllocator.h:"
+        "/include/TMVA/ClassInfo.h:"
+        "/include/TMVA/Config.h:"
+        "/include/TMVA/Configurable.h:"
+        "/include/TMVA/DataInputHandler.h:"
+        "/include/TMVA/DataSet.h:"
+        "/include/TMVA/DataSetInfo.h:"
+        "/include/TMVA/DataSetManager.h:"
+        "/include/TMVA/Event.h:"
+        "/include/TMVA/Factory.h:"
+        "/include/TMVA/KDEKernel.h:"
+        "/include/TMVA/Option.h:"
+        "/include/TMVA/PDF.h:"
+        "/include/TMVA/Reader.h:"
+        "/include/TMVA/Types.h:"
+
+        # -- Geant3 warnings
+        "TGeant3/TGeant3.h:"
+        "TGeant3/TGeant3TGeo.h:"
+
+        # -- Errors which are filtered for the time being
+        # -- MbsAPI is only a copy from elsewhere so don't know what to do
+       "MbsAPI"
+        "/MbsAPI/f_evcli.c"
+        "FairTSBufferFunctional.*std::binary_function"
+  )
+
+# -----------------------------------------------------------
+# -- Warning addon's
+# -----------------------------------------------------------
+set(CTEST_CUSTOM_WARNING_MATCH ${CTEST_CUSTOM_WARNING_MATCH}
+       )
+
+Set (CTEST_CUSTOM_COVERAGE_EXCLUDE
+     ".*Dict.h"
+     ".*Dict.cxx"
+     ".*GTest.*"
+    )
+
+# -----------------------------------------------------------
+# -- Error execptions
+# -- Get rid of boost warnings which are misinterpreted as errors
+# -----------------------------------------------------------
+
+Set(CTEST_CUSTOM_ERROR_EXCEPTION
+       ${CTEST_CUSTOM_ERROR_EXCEPTION}
+        "/include/boost/"
+)
\ No newline at end of file
diff --git a/Dart.sh b/Dart.sh
new file mode 100755 (executable)
index 0000000..670d773
--- /dev/null
+++ b/Dart.sh
@@ -0,0 +1,112 @@
+#!/bin/bash
+
+
+function print_example(){
+echo "##################################################################"
+echo "# To set the required parameters as source and the build         #"
+echo "# directory for ctest, the linux flavour and the SIMPATH         #"
+echo "# put the export commands below to a separate file which is read #"
+echo "# during execution and which is defined on the command line.     #"
+echo "# Set all parameters according to your needs.                    #"
+echo "# LINUX_FLAVOUR should be set to the distribution you are using  #"
+echo "# eg Debian, SuSe etc.                                           #"
+echo "# An additional varibale NCPU can overwrite the default number   #"
+echo "# of parallel processes used to compile the project.             #"
+echo "# This can be usefull if one can use a distributed build system  #"
+echo "# like icecream.                                                 #"
+echo "# For example                                                    #"
+echo "#!/bin/bash                                                      #"
+echo "#export LINUX_FLAVOUR=Ubuntu14.x                                 #"
+echo "#export ROOTSYS=Path_to_ROOTSYS                                  #"
+echo "#export ALFAPATH=<path_to_installation_of_external_packages>     #"
+echo "#export BUILDDIR=/tmp/AliceO2/build_cdash                        #"
+echo "#export SOURCEDIR=~/AliceO2                                      #"
+echo "#export NCPU=8                                                   #"
+echo "##################################################################"
+}
+
+if [ "$#" -lt "2" ]; then
+  echo ""
+  echo "-- Error -- Please start script with two parameters"
+  echo "-- Error -- The first parameter is the ctest model."
+  echo "-- Error -- Possible arguments are Nightly and Experimental ."
+  echo "-- Error -- The second parameter is the file containg the"
+  echo "-- Error -- Information about the setup at the client" 
+  echo "-- Error -- installation (see example below)."
+  echo ""
+  print_example
+  exit 1
+fi
+
+# test if a ctest model is either Experimantal or Nightly
+if [ "$1" == "Experimental" -o "$1" == "Nightly" -o "$1" == "Continuous" ]; then
+  echo ""
+else
+  echo "-- Error -- This ctest model is not supported."
+  echo "-- Error -- Possible arguments are Nightly, Experimental or Continuous."
+  exit 1
+fi 
+
+# test if the input file exists and execute it
+if [ -e "$2" ];then
+  source $2
+else
+  echo "-- Error -- Input file does not exist."
+  echo "-- Error -- Please choose existing input file."
+  exit 1  
+fi
+
+# set the ctest model to command line parameter
+export ctest_model=$1
+
+# test for architecture
+arch=$(uname -s | tr '[A-Z]' '[a-z]')
+chip=$(uname -m | tr '[A-Z]' '[a-z]')
+
+# extract information about the system and the machine and set
+# environment variables used by ctest
+SYSTEM=$arch-$chip
+if test -z $CXX ; then
+  COMPILER=gcc;
+  GCC_VERSION=$(gcc -dumpversion)
+else
+  COMPILER=$CXX;
+  GCC_VERSION=$($CXX -dumpversion)
+fi
+
+export LABEL1=${LINUX_FLAVOUR}-$SYSTEM-$COMPILER$GCC_VERSION-aliroot_$GIT_BRANCH
+export LABEL=$(echo $LABEL1 | sed -e 's#/#_#g')
+
+# get the number of processors
+# and information about the host
+if [ "$arch" = "linux" ];
+then
+  if [ "$NCPU" != "" ];
+  then
+    export number_of_processors=$NCPU
+  else 
+    export number_of_processors=$(cat /proc/cpuinfo | grep processor | wc -l)
+  fi
+  export SITE=$(hostname -f)
+elif [ "$arch" = "darwin" ];
+then
+  if [ "$NCPU" != "" ];
+  then
+    export number_of_processors=$NCPU
+  else 
+    export number_of_processors=$(sysctl -n hw.ncpu)
+  fi
+  export SITE=$(hostname -s)
+fi
+
+echo "************************"
+date
+echo "LABEL: " $LABEL
+echo "SITE: " $SITE
+echo "Model: " ${ctest_model}
+echo "Nr. of processes: " $number_of_processors
+echo "************************"
+
+cd $SOURCEDIR
+
+ctest -S $SOURCEDIR/AliRoot_test.cmake -V --VV