-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '278-improve-ctest-s-git-commands' (#278, TRIL-260)
Build/Test Cases Summary Enabled Packages: Enabled all Packages 0) MPI_DEBUG => passed: passed=341,notpassed=0 (0.87 min) 1) SERIAL_RELEASE => passed: passed=341,notpassed=0 (0.93 min) Other local commits for this build/test group: 76e958d, 3507ab4, 49d9c81, 2541677, 5e1677e
- Loading branch information
Showing
27 changed files
with
1,504 additions
and
358 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
# 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") | ||
|
||
# | ||
# Define a caller for the TriBITS Project | ||
# | ||
|
||
MACRO(TRIBITS_PROJ_CTEST_DRIVER) | ||
SET_DEFAULT(TriBITS_REPOSITORY_LOCATION_DEFAULT | ||
"https://github.com/TriBITSPub/TriBITS.git") | ||
SET_DEFAULT(TriBITS_REPOSITORY_LOCATION_NIGHTLY_DEFAULT | ||
"${TriBITS_REPOSITORY_LOCATION_DEFAULT}") | ||
PRINT_VAR(TriBITS_REPOSITORY_LOCATION_DEFAULT) | ||
TRIBITS_CTEST_DRIVER() | ||
ENDMACRO() |
31 changes: 31 additions & 0 deletions
31
cmake/ctest/generic_gcc/ctest_genertic_gcc_serial_debug.cmake
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
INCLUDE("${CMAKE_CURRENT_LIST_DIR}/../TribitsProjCTestDriver.cmake") | ||
|
||
# | ||
# Set the options specific to this build case | ||
# | ||
|
||
SET(COMM_TYPE SERIAL) | ||
SET(BUILD_TYPE DEBUG) | ||
SET(BUILD_DIR_NAME GCC_${COMM_TYPE}_${BUILD_TYPE}) | ||
SET(CTEST_TEST_TIMEOUT 60) | ||
|
||
SET_DEFAULT_AND_FROM_ENV( CTEST_BUILD_FLAGS "-j8 -k" ) | ||
|
||
SET_DEFAULT_AND_FROM_ENV( CTEST_PARALLEL_LEVEL "8" ) | ||
|
||
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_TRACE_ADD_TEST=ON" | ||
) | ||
|
||
SET(CTEST_TEST_TYPE Nightly) | ||
|
||
# | ||
# Run the CTest driver and submit to CDash | ||
# | ||
|
||
TRIBITS_PROJ_CTEST_DRIVER() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,42 @@ | ||
TRIBITS_ADD_ADVANCED_TEST( CTestDriverUnitTests | ||
OVERALL_WORKING_DIRECTORY TEST_NAME | ||
TEST_0 CMND ${CMAKE_COMMAND} | ||
ARGS | ||
-DPROJECT_NAME=${PROJECT_NAME} | ||
-D${PROJECT_NAME}_TRIBITS_DIR=${${PROJECT_NAME}_TRIBITS_DIR} | ||
-P "${CMAKE_CURRENT_SOURCE_DIR}/CTestDriverUnitTests.cmake" | ||
PASS_REGULAR_EXPRESSION_ALL | ||
"Final UnitTests Result: num_run = 2" | ||
"Final UnitTests Result: PASSED" | ||
) | ||
|
||
|
||
TRIBITS_ADD_ADVANCED_TEST( TribitsGetCTestTestXmlDir | ||
OVERALL_WORKING_DIRECTORY TEST_NAME | ||
|
||
TEST_0 CMND ${CMAKE_COMMAND} | ||
ARGS | ||
-DPROJECT_NAME=${PROJECT_NAME} | ||
-D${PROJECT_NAME}_TRIBITS_DIR=${${PROJECT_NAME}_TRIBITS_DIR} | ||
-DCTEST_BUILD_DIR="${CMAKE_CURRENT_LIST_DIR}/data/dummy_build_dir" | ||
-P "${${PROJECT_NAME}_TRIBITS_DIR}/ctest_driver/TribitsGetCTestTestXmlDir.cmake" | ||
PASS_REGULAR_EXPRESSION_ALL | ||
"${CMAKE_CURRENT_LIST_DIR}/data/dummy_build_dir/Testing/20101015-1112" | ||
) | ||
|
||
|
||
ADD_SUBDIRECTORY(MockCTestDriver) | ||
|
||
|
||
IF (CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux") | ||
ADD_SUBDIRECTORY(TribitsExampleProject) | ||
ENDIF() | ||
|
||
SET(${PROJECT_NAME}_ENABLE_REAL_GIT_CLONE_TESTS OFF CACHE BOOL | ||
"If TRUE, then perform tests that do real clones of repos from GitHub.") | ||
|
||
IF (CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux" AND | ||
${PROJECT_NAME}_ENABLE_REAL_GIT_CLONE_TESTS | ||
) | ||
ADD_SUBDIRECTORY(TribitsExampleMetaProject) | ||
ENDIF() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
# @HEADER | ||
# ************************************************************************ | ||
# | ||
# TriBITS: Tribal Build, Integrate, and Test System | ||
# Copyright 2013 Sandia Corporation | ||
# | ||
# Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, | ||
# the U.S. Government retains certain rights in this software. | ||
# | ||
# Redistribution and use in source and binary forms, with or without | ||
# modification, are permitted provided that the following conditions are | ||
# met: | ||
# | ||
# 1. Redistributions of source code must retain the above copyright | ||
# notice, this list of conditions and the following disclaimer. | ||
# | ||
# 2. Redistributions in binary form must reproduce the above copyright | ||
# notice, this list of conditions and the following disclaimer in the | ||
# documentation and/or other materials provided with the distribution. | ||
# | ||
# 3. Neither the name of the Corporation nor the names of the | ||
# contributors may be used to endorse or promote products derived from | ||
# this software without specific prior written permission. | ||
# | ||
# THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY | ||
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE | ||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | ||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | ||
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | ||
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | ||
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
# | ||
# ************************************************************************ | ||
# @HEADER | ||
|
||
MESSAGE("PROJECT_NAME = ${PROJECT_NAME}") | ||
MESSAGE("${PROJECT_NAME}_TRIBITS_DIR = ${${PROJECT_NAME}_TRIBITS_DIR}") | ||
|
||
SET( CMAKE_MODULE_PATH | ||
"${${PROJECT_NAME}_TRIBITS_DIR}/core/utils" | ||
"${${PROJECT_NAME}_TRIBITS_DIR}/core/package_arch" | ||
"${${PROJECT_NAME}_TRIBITS_DIR}/ctest_driver" | ||
) | ||
|
||
INCLUDE(GlobalSet) | ||
INCLUDE(TribitsReadTagFile) | ||
INCLUDE(UnitTestHelpers) | ||
|
||
|
||
FUNCTION(UNITTEST_READ_CTEST_TAG_FILE) | ||
|
||
MESSAGE("\n***") | ||
MESSAGE("*** Testing tribits_read_ctest_tag_file()") | ||
MESSAGE("***\n") | ||
|
||
SET(TAG_FILE_IN "${CMAKE_CURRENT_LIST_DIR}/data/dummy_build_dir/Testing/TAG") | ||
|
||
TRIBITS_READ_CTEST_TAG_FILE(${TAG_FILE_IN} BUILD_START_TIME_OUT CDASH_TRACK_OUT) | ||
|
||
UNITTEST_COMPARE_CONST(BUILD_START_TIME_OUT | ||
"20101015-1112") | ||
|
||
UNITTEST_COMPARE_CONST(CDASH_TRACK_OUT | ||
"My CDash Track") # NOTE: Spaces are important to test here! | ||
|
||
ENDFUNCTION() | ||
|
||
# | ||
# Execute the unit tests | ||
# | ||
|
||
# Assume that all unit tests will pass by default | ||
GLOBAL_SET(UNITTEST_OVERALL_PASS TRUE) | ||
GLOBAL_SET(UNITTEST_OVERALL_NUMPASSED 0) | ||
GLOBAL_SET(UNITTEST_OVERALL_NUMRUN 0) | ||
|
||
# Run the unit test functions | ||
UNITTEST_READ_CTEST_TAG_FILE() | ||
|
||
MESSAGE("\n***") | ||
MESSAGE("*** Determine final result of all unit tests") | ||
MESSAGE("***\n") | ||
|
||
# Pass in the number of expected tests that must pass! | ||
UNITTEST_FINAL_RESULT(2) |
Oops, something went wrong.