Skip to content

Commit

Permalink
Merge branch 'tribits-cdash-submit-87'
Browse files Browse the repository at this point in the history
Build/Test Cases Summary
Enabled Packages:
Enabled all Packages
0) MPI_DEBUG => passed: passed=215,notpassed=0 (0.31 min)
1) SERIAL_RELEASE => passed: passed=215,notpassed=0 (0.28 min)
Other local commits for this build/test group: bc66575, d8ca6ff, 50d8cdf
  • Loading branch information
bartlettroscoe committed Oct 27, 2016
2 parents 4303bea + bc66575 commit 78f7220
Show file tree
Hide file tree
Showing 7 changed files with 142 additions and 6 deletions.
4 changes: 1 addition & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ before_install:
install:
- mkdir build
- cd build/
- cmake -DCMAKE_BUILD_TYPE:STRING=DEBUG -DTriBITS_ENABLE_Fortran:BOOL=ON -DTriBITS_HOSTNAME=travis-ci-server-linux ../
- make

script:
- ctest -VV
- ctest -V -S ../cmake/ctest/travisci/ctest_trusty_serial_debug.cmake
15 changes: 15 additions & 0 deletions CTestConfig.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
INCLUDE(SetDefaultAndFromEnv)

SET(CTEST_NIGHTLY_START_TIME "04:00:00 UTC") # 10 PM MDT or 9 PM MST

IF (NOT DEFINED CTEST_DROP_METHOD)
SET_DEFAULT_AND_FROM_ENV(CTEST_DROP_METHOD "http")
ENDIF()

IF (CTEST_DROP_METHOD STREQUAL "http")
SET_DEFAULT_AND_FROM_ENV(CTEST_DROP_SITE "my.cdash.org")
SET_DEFAULT_AND_FROM_ENV(CTEST_PROJECT_NAME "VERA")
SET_DEFAULT_AND_FROM_ENV(CTEST_DROP_LOCATION "/submit.php?project=TriBITS")
SET_DEFAULT_AND_FROM_ENV(CTEST_TRIGGER_SITE "")
SET_DEFAULT_AND_FROM_ENV(CTEST_DROP_SITE_CDASH TRUE)
ENDIF()
2 changes: 2 additions & 0 deletions ProjectName.cmake
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
SET(PROJECT_NAME TriBITS)
SET(${PROJECT_NAME}_USES_PYTHON TRUE)
SET(MPI_EXEC_DEFAULT_NUMPROCS 1)
SET(${PROJECT_NAME}_SKIP_EXTRAREPOS_FILE TRUE)
2 changes: 1 addition & 1 deletion cmake/Dependencies.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
TRIBITS_PACKAGE_DEFINE_DEPENDENCIES(
TEST_OPTIONAL_TPLS MPI
REGRESSION_EMAIL_LIST [email protected]
REGRESSION_EMAIL_LIST [email protected]
)
43 changes: 43 additions & 0 deletions cmake/ctest/travisci/ctest_trusty_serial_debug.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#
# Set the locations of things for this project
#

SET(TRIBITS_PROJECT_ROOT "${CMAKE_CURRENT_LIST_DIR}/../../..")
SET(TriBITS_TRIBITS_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../tribits")

#
# Include the TriBITS file to get other modules included
#

INCLUDE("${CMAKE_CURRENT_LIST_DIR}/../../../tribits/ctest_driver/TribitsCTestDriverCore.cmake")

#
# Set the options specific to this build case
#

SET(COMM_TYPE SERIAL)
SET(BUILD_TYPE DEBUG)
SET(BUILD_DIR_NAME ${COMM_TYPE}_${BUILD_TYPE}_TravisCI)
#SET(CTEST_TEST_TIMEOUT 900)

SET_DEFAULT_AND_FROM_ENV( CTEST_BUILD_FLAGS "-j1 -i" )

SET_DEFAULT_AND_FROM_ENV( CTEST_PARALLEL_LEVEL "1" )

SET( EXTRA_CONFIGURE_OPTIONS
"-DBUILD_SHARED_LIBS:BOOL=ON"
"-DCMAKE_BUILD_TYPE=DEBUG"
"-DCMAKE_C_COMPILER=gcc"
"-DCMAKE_CXX_COMPILER=g++"
"-DCMAKE_Fortran_COMPILER=gfortran"
"-DTriBITS_ENABLE_Fortran=ON"
"-DTriBITS_HOSTNAME=travis-ci-server-linux"
)

SET(CTEST_TEST_TYPE Continuous)

#
# Run the CTest driver and submit to CDash
#

TRIBITS_CTEST_DRIVER()
68 changes: 66 additions & 2 deletions tribits/ctest_driver/TribitsCTestDriverCore.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,22 @@ IF (NOT ${PROJECT_NAME}_TRIBITS_DIR)
ENDIF()
MESSAGE("${PROJECT_NAME}_TRIBITS_DIR = ${${PROJECT_NAME}_TRIBITS_DIR}")

#
# Set default for CTEST_SOURCE_DIRECTORY
#
IF ("${CTEST_SOURCE_DIRECTORY}" STREQUAL "")
MESSAGE("Set default for CTEST_SOURCE_DIRECTORY to TRIBITS_PROJECT_ROOT='TRIBITS_PROJECT_ROOT='${TRIBITS_PROJECT_ROOT}'")
SET(CTEST_SOURCE_DIRECTORY ${TRIBITS_PROJECT_ROOT})
ENDIF()

#
# Set default for CTEST_BINARY_DIRECTORY
#
IF ("${CTEST_BINARY_DIRECTORY}" STREQUAL "")
MESSAGE("Set defualt for CTEST_BINARY_DIRECTORY to $PWD/BUILD='$ENV{PWD}/BUILD'")
SET(CTEST_BINARY_DIRECTORY $ENV{PWD}/BUILD)
ENDIF()

#
# Set CMAKE_MODULE_PATH
#
Expand All @@ -128,6 +144,7 @@ TRIBITS_ASESRT_MINIMUM_CMAKE_VERSION()
INCLUDE(TribitsCMakePolicies)

INCLUDE(PrintVar)
INCLUDE(MultilineSet)
INCLUDE(SetDefaultAndFromEnv)
INCLUDE(AssertDefined)
INCLUDE(AppendSet)
Expand Down Expand Up @@ -363,7 +380,7 @@ ENDFUNCTION()

MACRO(TRIBITS_SETUP_EXTRAREPOS)

IF( EXISTS "${${PROJECT_NAME}_EXTRAREPOS_FILE}" )
IF (EXISTS "${${PROJECT_NAME}_EXTRAREPOS_FILE}" )
# Repos many not already exist because we have not cloned them yet!
SET(${PROJECT_NAME}_CHECK_EXTRAREPOS_EXIST FALSE)
TRIBITS_GET_AND_PROCESS_EXTRA_REPOSITORIES_LISTS()
Expand Down Expand Up @@ -1100,8 +1117,14 @@ FUNCTION(TRIBITS_CTEST_DRIVER)
# even been checked out yet! Unless, of course, we are unit testing
# in which case we will use whatever has been passed in.

IF (${PROJECT_NAME}_SKIP_EXTRAREPOS_FILE)
SET(${PROJECT_NAME}_EXTRAREPOS_FILE_DEFAULT)
ELSE()
SET(${PROJECT_NAME}_EXTRAREPOS_FILE_DEFAULT
"${TRIBITS_PROJECT_ROOT}/cmake/${${PROJECT_NAME}_EXTRA_EXTERNAL_REPOS_FILE_NAME}")
ENDIF()
SET_DEFAULT_AND_FROM_ENV(${PROJECT_NAME}_EXTRAREPOS_FILE
"${TRIBITS_PROJECT_ROOT}/cmake/${${PROJECT_NAME}_EXTRA_EXTERNAL_REPOS_FILE_NAME}")
"${${PROJECT_NAME}_EXTRAREPOS_FILE_DEFAULT}")

# Select the set of extra external repos to add in packages.
# These are the same types as CTEST_TEST_TYPE (e.g. 'Continuous' and
Expand Down Expand Up @@ -1251,6 +1274,19 @@ FUNCTION(TRIBITS_CTEST_DRIVER)
ENDIF()
ENDIF()

#
# Write a few variables to the global level to make cmake happy.
#
# If these don't get set in the base CTest script scope, CTest returns an
# error!
#

SET(CTEST_SOURCE_DIRECTORY ${CTEST_SOURCE_DIRECTORY} CACHE INTERNAL "")
SET(CTEST_BINARY_DIRECTORY ${CTEST_BINARY_DIRECTORY} CACHE INTERNAL "")
IF ("${CTEST_COMMAND}" STREQUAL "")
SET(CTEST_COMMAND ctest)
ENDIF()
SET(CTEST_COMMAND ${CTEST_COMMAND} CACHE INTERNAL "")

#
# Empty out the binary directory
Expand Down Expand Up @@ -1829,4 +1865,32 @@ FUNCTION(TRIBITS_CTEST_DRIVER)

REPORT_QUEUED_ERRORS()

STRING(REPLACE "submit.php"
"index.php" CDASH_PROJECT_LOCATION
"${CTEST_DROP_LOCATION}")
MULTILINE_SET( SEE_CDASH_LINK_STR
"\nSee results for:\n"
" Site: ${CTEST_SITE}\n"
" Build Name: ${CTEST_BUILD_NAME}\n"
"at:\n"
" http://${CTEST_DROP_SITE}${CDASH_PROJECT_LOCATION}&display=project\n"
)
# ToDo: Above: We would love to provide the buildID to point to the exact
# URL but CTest does not currently give that to you.

IF ("${${PROJECT_NAME}_FAILED_PACKAGES}" STREQUAL "")
MESSAGE(
"${SEE_CDASH_LINK_STR}\n"
"TRIBITS_CTEST_DRIVER: OVERALL: ALL PASSSED\n")
ELSE()
MESSAGE(FATAL_ERROR
"${SEE_CDASH_LINK_STR}\n"
"TRIBITS_CTEST_DRIVER: OVERALL: ALL FAILED\n")
# NOTE: FATAL_ERROR is needed so that the ctest -S script returns != 0
# Also, it is critical to dislplay the "See results" in this
# MESSAGE(FATAL_ERROR ...) command in order for it to be printed last.
# Otherwise, if you run with ctest -V -S, then the ouptut from
# CTEST_TEST() will be printed last.
ENDIF()

ENDFUNCTION()
14 changes: 14 additions & 0 deletions tribits/doc/developers_guide/TribitsDevelopersGuide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7892,6 +7892,20 @@ These options are described below.
date/time for regular tests added with `TRIBITS_ADD_TEST()`_ (which uses a
raw command with ``ADD_TEST()``).

.. _${PROJECT_NAME}_SKIP_EXTRAREPOS_FILE:

**${PROJECT_NAME}_SKIP_EXTRAREPOS_FILE**

The cache variable ``${PROJECT_NAME}_SKIP_EXTRAREPOS_FILE`` is set in the
`<projectDir>/ProjectName.cmake`_ file as::

SET(${PROJECT_NAME}_SKIP_EXTRAREPOS_FILE TRUE)

for projects that don't have a
`<projectDir>/cmake/ExtraRepositoriesList.cmake`_ file. This variable needs
to be set when using the CTest driver script and does not need to be set for
the basic configure and build process.

.. _${PROJECT_NAME}_TEST_CATEGORIES:
.. _${PROJECT_NAME}_TEST_CATEGORIES_DEFAULT:

Expand Down

0 comments on commit 78f7220

Please sign in to comment.