Fixes for sub-project submissions. Subprojects can now be submitted by running the...
authorjjose <jjose@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 31 Aug 2010 10:28:31 +0000 (10:28 +0000)
committerjjose <jjose@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 31 Aug 2010 10:28:31 +0000 (10:28 +0000)
command : ctest -S continuous-build.cmake in any directory.

CMakeLists.txt
cmake/modules/ALICEMacros.cmake
test/continuous-build.cmake

index 9f187a5..63195d0 100644 (file)
@@ -137,7 +137,66 @@ option (TFLUKA "Build TFluka" OFF)
 option (THYDJET "Build THydjet" OFF)
 option (SHUTTLE "Build SHUTTLE" OFF)
 
-       
+
+add_custom_target(STEER-all)
+add_custom_target(PHOS-all)    
+add_custom_target(TRD-all) 
+add_custom_target(TPC-all)
+add_custom_target(ZDC-all) 
+add_custom_target(MUON-all) 
+add_custom_target(PMD-all) 
+add_custom_target(FMD-all)
+add_custom_target(TOF-all) 
+add_custom_target(ITS-all) 
+add_custom_target(ACORDE-all) 
+add_custom_target(HMPID-all) 
+add_custom_target(T0-all) 
+add_custom_target(BCM-all) 
+add_custom_target(STRUCT-all) 
+add_custom_target(EVGEN-all) 
+add_custom_target(RALICE-all) 
+add_custom_target(VZERO-all) 
+add_custom_target(THijing-all)
+add_custom_target(THbtp-all) 
+add_custom_target(EMCAL-all) 
+add_custom_target(THerwig-all) 
+add_custom_target(TEPEMGEN-all) 
+add_custom_target(FASTSIM-all) 
+add_custom_target(TPHIC-all) 
+add_custom_target(RAW-all) 
+add_custom_target(MONITOR-all) 
+add_custom_target(ANALYSIS-all) 
+add_custom_target(JETAN-all)
+add_custom_target(HLT-all) 
+add_custom_target(LHC-all) 
+add_custom_target(ESDCheck-all) 
+add_custom_target(STAT-all) 
+add_custom_target(TTherminator-all) 
+add_custom_target(CORRFW-all) 
+add_custom_target(DPMJET-all) 
+add_custom_target(TDPMjet-all) 
+add_custom_target(PWG0-all) 
+add_custom_target(PWG1-all) 
+add_custom_target(PWG2-all) 
+add_custom_target(PWG3-all) 
+add_custom_target(PWG4-all)
+add_custom_target(TRIGGER-all) 
+add_custom_target(TUHKMgen-all) 
+add_custom_target(EPOS-all) 
+add_custom_target(PYTHIA8-all) 
+add_custom_target(EVE-all) 
+add_custom_target(TFluka-all)
+add_custom_target(THydjet-all)
+add_custom_target(SHUTTLE-all)
+add_custom_target(LHAPDF-all) 
+add_custom_target(HIJING-all) 
+add_custom_target(MICROCERN-all) 
+add_custom_target(HERWIG-all) 
+add_custom_target(PYTHIA6-all)
+add_custom_target(ALIROOT-all)
+
+
+
 # Recurse into the given subdirectories.  This does not actually
 # cause another cmake executable to run.  The same process will walk through
 # the project's entire directory structure.
index 603d13e..f274fa2 100644 (file)
@@ -104,7 +104,7 @@ Function (AddLibrary LIB SRCS DHDRS)
   Endif(ARGV3)
 
   CheckViols(${LIB} "${SRCS}")
-
+  add_dependencies("${label}-all" ${LIB})
 EndFunction (AddLibrary)
 #_______________________________________________________________________________
 Function (AddHLTLibrary LIB SRCS DHDRS)
@@ -173,7 +173,7 @@ Function (AddHLTLibrary LIB SRCS DHDRS)
   Endif(ARGV3)
 
   CheckViols(${LIB} "${SRCS}")
-
+  add_dependencies("${label}-all" ${LIB})
 EndFunction (AddHLTLibrary)
 
 #_______________________________________________________________________________
@@ -218,7 +218,7 @@ Function (AddExecutable BIN SRCS LIBS)
   EndIf(ALICE_STATIC_BUILD)
 
   CheckViols(${BIN} "${SRCS}")
-
+  add_dependencies("${label}-all" ${BIN})
 EndFunction (AddExecutable)
 
 #_______________________________________________________________________________
index 73e5ac3..5e3cb40 100644 (file)
@@ -45,9 +45,16 @@ set(CTEST_TEST_TIMEOUT 0)
 #Default drop site
 set(CTEST_DROP_METHOD "http")
 set(CTEST_DROP_SITE "alirootbuildcmake.cern.ch")
-set(CTEST_DROP_LOCATION "/~johny/submit.php?project=AliRoot")
+set(CTEST_DROP_LOCATION "/submit.php?project=AliRoot")
 set(CTEST_DROP_SITE_CDASH TRUE)
 
+#Ctest custom settings
+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_USE_LAUNCHERS ON)
+set(BUILD_JOBS 1)
+
 set(OLDREV 0)
 set(NEWREV 0)
 set(CYCLE 0)
@@ -66,7 +73,6 @@ set(CTEST_DASHBOARD_ROOT    "$ENV{HOME}/Dashboards")
 #  set(CTEST_CHECKOUT_COMMAND "${CTEST_SVN_COMMAND} co ${ALICE_REPO} $ENV{ALICE_ROOT}")
 set(CTEST_UPDATE_COMMAND "${CTEST_SVN_COMMAND}")
 set(CTEST_CMAKE_COMMAND "\"${CMAKE_EXECUTABLE_NAME}\" -D Continuous")
-
 #CMake Generator
 set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
 
@@ -80,7 +86,7 @@ while (${CTEST_ELAPSED_TIME} LESS 36000)
       
   #Build only if new revision of source is available
   while(${OLDREV} EQUAL ${NEWREV} AND ${CYCLE} GREATER 0)
-    message("Updating source")
+    message("Checking for updates...")
     message("Current revision : ${OLDREV}")
     ctest_update(BUILD "${CTEST_SOURCE_DIRECTORY}")
     execute_process(COMMAND svn info ${ALICE_ROOT} OUTPUT_VARIABLE _svn_out)
@@ -93,22 +99,46 @@ while (${CTEST_ELAPSED_TIME} LESS 36000)
     endif(${OLDREV} EQUAL ${NEWREV})
   endwhile()
   ctest_submit (PARTS Update)
+  
+  #Keeping track of builds
   set(OLDREV ${NEWREV})
   math(EXPR CYCLE "${CYCLE} + 1")
   message("Build #${CYCLE} ")
   message("Revision : ${OLDREV}")
   set (START_TIME ${CTEST_ELAPSED_TIME})    
   math(EXPR CLEAR "${CYCLE}%${CLEARCYCLE}")
-  
+
+  #Get CTest configuration
+  include("${CTEST_SOURCE_DIRECTORY}/CTestConfig.cmake")
+
+
   #Clear build directory every CLEARCYCLE build
   if(${CLEAR} EQUAL 0)
     message("Clearing build directory")
     ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY})
   endif(${CLEAR} EQUAL 0) 
+
   message(STATUS "Building source")
-  ctest_build(BUILD "${CTEST_BINARY_DIRECTORY}")
-  ctest_submit(PARTS Build)
+  foreach(subproject ${CTEST_PROJECT_SUBPROJECTS})
+    set_property(GLOBAL PROPERTY SubProject ${subproject})
+    set_property(GLOBAL PROPERTY Label ${subproject})
+    #Configure
+    ctest_configure(BUILD "${CTEST_BINARY_DIRECTORY}")
+    ctest_submit(PARTS Configure)
+    set(CTEST_BUILD_TARGET "${subproject}-all")
+    set(CTEST_BUILD_COMMAND "${MAKE} -i -j${BUILD_JOBS} ${CTEST_BUILD_TARGET}") 
+    ctest_build(BUILD "${CTEST_BINARY_DIRECTORY}" APPEND)
+    ctest_submit(PARTS Build)
+  endforeach(subproject)
+
+  message("Building all")
+  set_property(GLOBAL PROPERTY SubProject)
+  set_property(GLOBAL PROPERTY Label)
+  set(CTEST_BUILD_TARGET "all")
+  ctest_build(BUILD "${CTEST_BINARY_DIRECTORY}" APPEND)
+  ctest_submit(PARTS BUILD)
   #Test every other build
+
   math(EXPR TEST "${CYCLE}%${TESTCYCLE}")
   if(${TEST} EQUAL 0)
     message(STATUS "Running tests")
@@ -116,7 +146,6 @@ while (${CTEST_ELAPSED_TIME} LESS 36000)
   endif(${TEST} EQUAL 0)
   ctest_submit ()
   message("Build ${CYCLE} completed")
-  ctest_sleep(300)
 endwhile()