From: mquinson Date: Tue, 22 Dec 2009 22:41:23 +0000 (+0000) Subject: Only one file to configure ctest X-Git-Tag: SVN~775 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/ed30a72f0b6a3cbbcc351ef1c0c000e1544e8bbb?hp=1264af3dad7a52f14a17b451e18c0a2c061adea6 Only one file to configure ctest git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@6951 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/Makefile.am b/Makefile.am index 2983dab2af..83699091b4 100644 --- a/Makefile.am +++ b/Makefile.am @@ -16,8 +16,7 @@ SG_EXTRA_DIST = bootstrap COPYING INSTALL NEWS README README.IEEE TODO AUTHORS C checkall \ buildtools/Cmake/CMakeLists.txt buildtools/Cmake/chdir_run.sh \ buildtools/Cmake/build.sh buildtools/Cmake/test_java.sh \ - buildtools/Cmake/CTestList.txt buildtools/Cmake/CTestConfig.txt \ - buildtools/Cmake/CTestCustom.ctest + buildtools/Cmake/CTestList.txt buildtools/Cmake/CTestCustom.ctest # GRAMINE_CUT_END SUBDIRS= include src tools $(SG_SUBDIRS) diff --git a/buildtools/Cmake/CMakeLists.txt b/buildtools/Cmake/CMakeLists.txt index 5c753bee8d..b842c4bf98 100644 --- a/buildtools/Cmake/CMakeLists.txt +++ b/buildtools/Cmake/CMakeLists.txt @@ -19,14 +19,13 @@ ELSE(SIZEOF_INT EQUAL 4) SET(ARCH_64_BITS 1) ENDIF(SIZEOF_INT EQUAL 4) -INCLUDE(CTestConfig.txt) ### Enable tests ENABLE_TESTING() INCLUDE(CTest) INCLUDE(Dart) - +INCLUDE(CTestCustom.ctest) INCLUDE(CTestList.txt) # Install the CTest configuration in the build dir diff --git a/buildtools/Cmake/CTestConfig.txt b/buildtools/Cmake/CTestConfig.txt deleted file mode 100644 index 5ce6e5776c..0000000000 --- a/buildtools/Cmake/CTestConfig.txt +++ /dev/null @@ -1,48 +0,0 @@ -# Dart server to submit results (used by client) - -# Configure Ctest -SET (UPDATE_TYPE "svn") -SET (CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE 100000) -SET (CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE 100000) - - -#Get the hostname of current machine : -find_program(HOSTNAME_CMD NAMES hostname) -exec_program(${HOSTNAME_CMD} OUTPUT_VARIABLE HOSTNAME) -set(SITE "${HOSTNAME}") -MARK_AS_ADVANCED(HOSTNAME_CMD) - -#Get the system information of current machine -find_program(UNAME NAMES uname) -macro(getuname name flag) -exec_program("${UNAME}" ARGS "${flag}" OUTPUT_VARIABLE "${name}") -endmacro(getuname) -MARK_AS_ADVANCED(UNAME) - -STRING(TOLOWER ${CMAKE_SYSTEM_NAME} system-NAME) -if(${system-NAME} STREQUAL "darwin") -SET(DISTRIB2 "OSX") -else(${system-NAME} STREQUAL "darwin") - -#Try to get the distrib -find_program(CAT NAMES cat) -exec_program("${CAT}" ARGS " /etc/issue" OUTPUT_VARIABLE DISTRIB) -MARK_AS_ADVANCED(CAT) -STRING(REPLACE "\\n \\l" "" DISTRIB2 ${DISTRIB}) -endif(${system-NAME} STREQUAL "darwin") - -getuname(osname -s) -getuname(node -n) -getuname(osrel -r) -getuname(cpu -m) - -SET (BUILDNAME "${osname}-${DISTRIB2}-${cpu}") -SET (SITE "${node}") -SET (CTEST_PROJECT_NAME "Simgrid") -SET (CTEST_DROP_METHOD "http") -SET (CTEST_DROP_SITE "cdash.inria.fr/CDash") -SET (CTEST_DROP_LOCATION "/submit.php?project=Simgrid") -SET (CTEST_DROP_SITE_CDASH TRUE) -SET (CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE "30000") -SET (CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE "30000") -SET (CTEST_FULL_OUTPUT true) \ No newline at end of file diff --git a/buildtools/Cmake/CTestCustom.ctest b/buildtools/Cmake/CTestCustom.ctest index d6b3ca24d0..ff8ce79556 100644 --- a/buildtools/Cmake/CTestCustom.ctest +++ b/buildtools/Cmake/CTestCustom.ctest @@ -1,6 +1,44 @@ # Configure CTest. For details, see: # http://www.cmake.org/Wiki/CMake_Testing_With_CTest#Customizing_CTest +SET (UPDATE_TYPE "svn") SET (CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE "3000000") SET (CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE "3000000") +#Get the hostname of current machine : +find_program(HOSTNAME_CMD NAMES hostname) +exec_program(${HOSTNAME_CMD} OUTPUT_VARIABLE HOSTNAME) +set(SITE "${HOSTNAME}") +MARK_AS_ADVANCED(HOSTNAME_CMD) + +#Get the system information of current machine +find_program(UNAME NAMES uname) +macro(getuname name flag) +exec_program("${UNAME}" ARGS "${flag}" OUTPUT_VARIABLE "${name}") +endmacro(getuname) +MARK_AS_ADVANCED(UNAME) + +STRING(TOLOWER ${CMAKE_SYSTEM_NAME} system-NAME) +if(${system-NAME} STREQUAL "darwin") +SET(DISTRIB2 "OSX") +else(${system-NAME} STREQUAL "darwin") + +#Try to get the distrib +find_program(CAT NAMES cat) +exec_program("${CAT}" ARGS " /etc/issue" OUTPUT_VARIABLE DISTRIB) +MARK_AS_ADVANCED(CAT) +STRING(REPLACE "\\n \\l" "" DISTRIB2 ${DISTRIB}) +endif(${system-NAME} STREQUAL "darwin") + +getuname(osname -s) +getuname(node -n) +getuname(osrel -r) +getuname(cpu -m) + +SET (BUILDNAME "${osname}-${DISTRIB2}-${cpu}") +SET (SITE "${node}") +SET (CTEST_PROJECT_NAME "Simgrid") +SET (CTEST_DROP_METHOD "http") +SET (CTEST_DROP_SITE "cdash.inria.fr/CDash") +SET (CTEST_DROP_LOCATION "/submit.php?project=Simgrid") +SET (CTEST_DROP_SITE_CDASH TRUE) \ No newline at end of file diff --git a/buildtools/Cmake/Cmake/CTestConfig.txt b/buildtools/Cmake/Cmake/CTestConfig.txt deleted file mode 100644 index b28b04f643..0000000000 --- a/buildtools/Cmake/Cmake/CTestConfig.txt +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/buildtools/Cmake/Cmake/cmake_install.cmake b/buildtools/Cmake/Cmake/cmake_install.cmake deleted file mode 100644 index fbb4988732..0000000000 --- a/buildtools/Cmake/Cmake/cmake_install.cmake +++ /dev/null @@ -1,44 +0,0 @@ -# Install script for directory: /home/navarrop/Developments/simgrid/Cmake - -# Set the install prefix -IF(NOT DEFINED CMAKE_INSTALL_PREFIX) - SET(CMAKE_INSTALL_PREFIX "/usr/local") -ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX) -STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") - -# Set the install configuration name. -IF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) - IF(BUILD_TYPE) - STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" "" - CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") - ELSE(BUILD_TYPE) - SET(CMAKE_INSTALL_CONFIG_NAME "") - ENDIF(BUILD_TYPE) - MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") -ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) - -# Set the component getting installed. -IF(NOT CMAKE_INSTALL_COMPONENT) - IF(COMPONENT) - MESSAGE(STATUS "Install component: \"${COMPONENT}\"") - SET(CMAKE_INSTALL_COMPONENT "${COMPONENT}") - ELSE(COMPONENT) - SET(CMAKE_INSTALL_COMPONENT) - ENDIF(COMPONENT) -ENDIF(NOT CMAKE_INSTALL_COMPONENT) - -# Install shared libraries without execute permission? -IF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) - SET(CMAKE_INSTALL_SO_NO_EXE "1") -ENDIF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) - -IF(CMAKE_INSTALL_COMPONENT) - SET(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt") -ELSE(CMAKE_INSTALL_COMPONENT) - SET(CMAKE_INSTALL_MANIFEST "install_manifest.txt") -ENDIF(CMAKE_INSTALL_COMPONENT) - -FILE(WRITE "/home/navarrop/Developments/simgrid/Cmake/${CMAKE_INSTALL_MANIFEST}" "") -FOREACH(file ${CMAKE_INSTALL_MANIFEST_FILES}) - FILE(APPEND "/home/navarrop/Developments/simgrid/Cmake/${CMAKE_INSTALL_MANIFEST}" "${file}\n") -ENDFOREACH(file)