diff --git a/CMakeLists.txt b/CMakeLists.txt
index 860085b43..7b5175223 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -13,6 +13,7 @@ IF (NOT TRIBITS_PROCESSING_PACKAGE)
SET(${PROJECT_NAME}_TRIBITS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/tribits" CACHE PATH "")
INCLUDE("${${PROJECT_NAME}_TRIBITS_DIR}/TriBITS.cmake")
SET(${PROJECT_NAME}_ENABLE_TESTS ON CACHE BOOL "Enable tests by default.")
+ INCLUDE("${CMAKE_CURRENT_SOURCE_DIR}/cmake/AssertSameVersionFile.cmake")
TRIBITS_PROJECT_ENABLE_ALL()
ELSE()
# This CMakeLists.txt file is being processed as the TriBITS package file.
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 000000000..aa864d34a
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,75 @@
+# Contributing to TriBITS
+
+**Contents:**
+* [Requirements for every change to TriBITS](#requirements)
+* [Preferred process for suggesting and making changes to TriBITS](#process):
+ * [Process Outline](#process_outline)
+ * [Process Details](#process_details)
+
+Contributions to TriBITS are welcomed. However, there are some [requirements](#requirements) that every contribution needs to follow before it can be integrated into the main development branch of TriBITS and there is a [recommended process](#process) for suggesting and submitted proposed changes.
+
+**NOTE:** All contributions that are submitted are assumed to be given under the **[3-clause BSD-like TriBITS License](https://github.com/TriBITSPub/TriBITS/blob/master/tribits/Copyright.txt).**
+
+
+
+## Requirements for every change to TriBITS
+
+1. **Automated Tests:** Any change in behavior or new behavior needs to be accompanied with automated tests to define and protect these changes. If automated tests are not possible or too difficult, this can be discussed in the Github Issue or Pull-Request (see below).
+2. **GitHub Issue:** All non-trivial changes should have a [GitHub Issue created](#process_create_issue) for them and all associated commits should list the GitHub Issue ID in the commit logs.
+3. **Documentation:** Any new feature or change in the behavior of an existing feature must be fully documented before it is accepted. This documentation is generally added to one or more of the following places:
+ * Implementation `*.cmake` file itself (formatted with restructuredText and pulled out automatically into the TriBITS Developers Guide, see existing examples)
+ * `TribitsDevelopersGuide.rst` document (under `tribits/doc/developers_guide/`)
+ * `TribitsBuildReferenceBody.rst` document (under `tribits/doc/build_ref/`)
+
+
+
+## Preferred process for suggesting and making changes to TriBITS
+
+
+
+### Process Outline
+
+The steps in the preferred process for making changes to TriBITS are:
+
+1. [Create GitHub Issue](#process_create_issue) (communicate about the requirements and design)
+2. [Create Pull-Request](#process_create_pull_request) (each commit references the GitHub Issue ID)
+3. [Perform Code Review](#process_code_review) (perhaps adding new commits to address issues)
+4. [Accept Pull-Request](#process_accept_pull_request) (merge/rebase and push the branch to 'master')
+
+The details are given in the next section.
+
+
+
+### Process Details
+
+The following roles are mentioned on the process descriptions:
+* **TriBITS Maintainer**: Individual with push rights to the main TriBITS repo (i.e. Ross Bartlett). Must review all issues and suggested changes and accept pull-requests.
+* **TriBITS Developer**: Someone who knows how to built TriBITS as a project with its tests, add tests, make acceptable changes, create pull-requests, etc. but can't directly push to the main TriBITS github 'master' branch (see the role of [TriBITS System Developer](https://tribits.org/doc/TribitsDevelopersGuide.html#tribits-developer-and-user-roles)). This might be the Issue Reporter.
+* **Issue Reporter**: A person who first reports an issue with TriBITS and would like some type of change to happen (i.e. to fix a defect, implement a new feature, etc.). This might be a TriBITS Developer.
+
+With those definitions in place, the recommended/preferred process for contributing to TriBITS is:
+
+
+
+1. **Create GitHub Issue:** The Issue Reporter should submit a [GitHub Issue](https://github.com/TriBITSPub/TriBITS/issues) proposing the change (see [Kanban Process](https://github.com/TriBITSPub/TriBITS/wiki/Kanban-Process-for-Issue-Tracking) used to manage TriBITS Issues). That way, a conversation can be started to make sure the right contribution is made and to avoid wasted effort in case a suggested change can't be accepted for some reason. **If the TriBITS Maintainer decides that the proposed change is not appropriate, then the Issue may be closed after the justification is added to a comment.** Also, the TriBITS Maintainer may offer to implement the changes themselves or ask another TriBITS Developer to do so if that is most appropriate. However, regardless of who actually makes the proposed changes, the following steps should is still be followed.
+
+
+
+2. **Create Pull-Request:** After the proposed change is approved in the GitHub Issue by the TriBITS Maintainer, then the TriBITS Developer (who might be the Issue Reporter or the TriBITS Maintainer) should create a Pull-Request performing the following steps:
+ * **create a topic/feature branch** in their forked TriBITS repo (use descriptive branch name with issue ID, e.g. `some-great-feature-123`) ,
+ * **create commits with logs referencing the Issue ID** (e.g. `fix that thing (#123)`),
+ * **issue a [pull-request](https://help.github.com/articles/using-pull-requests/) (i.e. PR)**.
+ * The changes in the PR will automatically be tested using [Travis CI](https://travis-ci.org/TriBITSPub/TriBITS). Also, the PR allows for a well managed code review (comments for each line of the change, for example). The pull request should then reference the original GitHub Issue in a comment to link the PR to the original Issue. (NOTE: A partial set of changes is just fine in the PR, just enough to start the code review process.)
+ * NOTE: The TriBITS Maintainers should be given push access to the topic-branch used to create the PR. That way, the contributors, TriBITS Developers and the TriBITS Maintainer can all push new commits to that branch in a more collaborative way and have the PR Issue get updated automatically.
+
+
+
+3. **Perform Code Review:** A code review process is performed by the TriBITS Maintainer and continued changes are made by the TriBITS Developer and comments are added to the new PR or the original Issue (whatever makes sense but usually comments specific to changes should be added to the PR while more general comments not specific to the PR should go into the associated GitHub Issue). New updates to the branch can be pushed by the TriBITS Developer as changes are made to address issues with the changes. (And if the topic branch is pushed to the main GitHub repo, then multiple developers can push commits as well.)
+
+
+
+4. **Accept Pull-Request:** The TriBITS maintainer will then either accept the PR (by rebasing and merging the branch to main development branch) or will state what further issues must be resolved before the change can be incorporated.
+
+**NOTE:** Very simple changes can be attached to a GitHub Issue which are generated using `git format-patch` but the above process involving pull requests is preferred. But **generally raw patches will not be accepted** due to the added difficulty for the TriBITS Maintainer to review the changes and to eventually apply them to the TriBITS 'master' branch itself. Also, using git commits sent either through a branch in a pull-request or through `git format-patch` will record the author's contribution and give them credit for the change.
+
+**NOTE:** The above process is just a suggested process. What is important are the [requirements](#requirements) listed above.
diff --git a/README.DIRECTORY_CONTENTS.rst b/README.DIRECTORY_CONTENTS.rst
index d1a92570a..fdfe2dded 100644
--- a/README.DIRECTORY_CONTENTS.rst
+++ b/README.DIRECTORY_CONTENTS.rst
@@ -5,7 +5,7 @@ This base directory for TriBITS acts as a TriBITS Project, a TriBITS
Repository, and a TriBITS Package. As such, it contains the standard files
that are found in a TriBITS Project, Repository, and Package::
- ProjectName.cmake # PROJECT_NAME=TriITS
+ ProjectName.cmake # PROJECT_NAME=TriBITS
CMakeLists.txt # PROJECT_NAME = PACKAGE_NAME = TriBITS
PackagesList.cmake # Lists just "TriBITS . PT"
TPLsList.cmake # Lists only MPI
diff --git a/README.rst b/README.rst
index 9b397f37a..f84d3afc1 100644
--- a/README.rst
+++ b/README.rst
@@ -57,30 +57,30 @@ To set up to develop on TriBITS:
$ make
$ ctest -j12
- NOTES:
+NOTES:
- * If you don't have a working and compatible Fortran compiler, then pass
- ``-DTriBITS_ENABLE_Fortran=OFF`` into the ``do-configure`` script as::
+* If you don't have a working and compatible Fortran compiler, then pass
+ ``-DTriBITS_ENABLE_Fortran=OFF`` into the ``do-configure`` script as::
- $ ./do-configure -DTriBITS_ENABLE_Fortran=OFF
+ $ ./do-configure -DTriBITS_ENABLE_Fortran=OFF
- * On Mac OSX systems, one has to manually set the path the the TriBITS
- project base dir TRIBITS_BASE_DIR such as with::
+* On Mac OSX systems, one has to manually set the path the the TriBITS
+ project base dir TRIBITS_BASE_DIR such as with::
- $ env TRIBITS_BASE_DIR=.. ./do-configure [other options]
+ $ env TRIBITS_BASE_DIR=.. ./do-configure [other options]
- * Use as many processes as you have with ``ctest`` (``-j12`` is just used as
- an example).
+* Use as many processes as you have with ``ctest`` (``-j12`` is just used as
+ an example).
- * All of the tests should pass on your machine before beginning any
- development work. If there are any failures, then please `report them`_.
- To help show the failures you are seeing, do::
+* All of the tests should pass on your machine before beginning any
+ development work. If there are any failures, then please `report them`_.
+ To help show the failures you are seeing, do::
- $ ./do-configure -DCTEST_PARALLEL_LEVEL=12
- $ make dashboard
+ $ ./do-configure -DCTEST_PARALLEL_LEVEL=12
+ $ make dashboard
- and then provide the link to the CDash results in the TriBITS Issue when
- you report them.
+ and then provide the link to the CDash results in the TriBITS Issue when
+ you report them.
Any change (refactoring) of TriBITS (minimally) requires that the automated
test suite run with ``ctest`` pass 100%. To add new features (in most cases)
diff --git a/Version.cmake b/Version.cmake
deleted file mode 120000
index 9d915d58e..000000000
--- a/Version.cmake
+++ /dev/null
@@ -1 +0,0 @@
-tribits/Version.cmake
\ No newline at end of file
diff --git a/Version.cmake b/Version.cmake
new file mode 100644
index 000000000..8e9d96324
--- /dev/null
+++ b/Version.cmake
@@ -0,0 +1,9 @@
+IF ("${REPOSITORY_NAME}" STREQUAL "")
+ SET(REPOSITORY_NAME TriBITS)
+ENDIF()
+
+SET(${REPOSITORY_NAME}_VERSION 0.9)
+SET(${REPOSITORY_NAME}_MAJOR_VERSION 00)
+SET(${REPOSITORY_NAME}_MAJOR_MINOR_VERSION 000900)
+SET(${REPOSITORY_NAME}_VERSION_STRING "0.9 (Dev)")
+SET(${REPOSITORY_NAME}_ENABLE_DEVELOPMENT_MODE_DEFAULT ON) # Change to 'OFF' for a release
diff --git a/cmake/AssertSameVersionFile.cmake b/cmake/AssertSameVersionFile.cmake
new file mode 100644
index 000000000..d6df150c5
--- /dev/null
+++ b/cmake/AssertSameVersionFile.cmake
@@ -0,0 +1,13 @@
+# Make sure the base Version.cmake file is the same as the copy in
+# tribits/Version.cmake We can't use a symlink because this breaks TriBITS on
+# Windows (See TriBITSPub/TriBITS#129). Later, this will be replaced with a
+# configured Version.cmake file so this will not be an issue.
+SET(BASE_VERSION_CMAKE_FILE "${CMAKE_CURRENT_SOURCE_DIR}/Version.cmake")
+SET(TRIBITS_VERSION_CMAKE_FILE "${CMAKE_CURRENT_SOURCE_DIR}/tribits/Version.cmake")
+FILE(READ "${BASE_VERSION_CMAKE_FILE}" BASE_VERSION_CMAKE_STR)
+FILE(READ "${TRIBITS_VERSION_CMAKE_FILE}" TRIBITS_VERSION_CMAKE_STR)
+IF (NOT BASE_VERSION_CMAKE_STR STREQUAL TRIBITS_VERSION_CMAKE_STR)
+ MESSAGE(FATAL_ERROR
+ "ERROR: '${BASE_VERSION_CMAKE_FILE}' and '${TRIBITS_VERSION_CMAKE_FILE}' are"
+ " different (see TriBITSPub/TriBITS#129)!")
+ENDIF()
diff --git a/cmake/ctest/travisci/ctest_trusty_serial_debug.cmake b/cmake/ctest/travisci/ctest_trusty_serial_debug.cmake
index 3632543a8..0ec03c2e7 100644
--- a/cmake/ctest/travisci/ctest_trusty_serial_debug.cmake
+++ b/cmake/ctest/travisci/ctest_trusty_serial_debug.cmake
@@ -18,6 +18,7 @@ INCLUDE("${CMAKE_CURRENT_LIST_DIR}/../../../tribits/ctest_driver/TribitsCTestDri
SET(COMM_TYPE SERIAL)
SET(BUILD_TYPE DEBUG)
SET(BUILD_DIR_NAME ${COMM_TYPE}_${BUILD_TYPE}_TravisCI)
+SET(CTEST_SITE TravisCI)
#SET(CTEST_TEST_TIMEOUT 900)
SET_DEFAULT_AND_FROM_ENV( CTEST_BUILD_FLAGS "-j1 -i" )
diff --git a/dev_testing/crf450/checkin-test-crf450.sh b/dev_testing/crf450/checkin-test-crf450-cmake-2.8.11.sh
similarity index 54%
rename from dev_testing/crf450/checkin-test-crf450.sh
rename to dev_testing/crf450/checkin-test-crf450-cmake-2.8.11.sh
index 7fa934458..fec9dbd42 100755
--- a/dev_testing/crf450/checkin-test-crf450.sh
+++ b/dev_testing/crf450/checkin-test-crf450-cmake-2.8.11.sh
@@ -1,14 +1,6 @@
#!/bin/bash
-# Used to test TriBITS on any the machine crf450 using the VERA Dev Env
-#
-# This script requires that the VERA dev env be loaded by sourcing the script:
-#
-# . /home/vera_env/gcc-4.8.3/load_dev_env.[sh,csh]
-#
-# You can source this script either in your shell startup script
-# (e.g. .bash_profile) or you can source it manually whenever you need to set
-# up to build VERA software.
+# Used to test TriBITS on crf450 using the VERA Dev Env using CMake 2.8.11
#
# You can link this script into any location and it will work out of the box.
#
@@ -22,11 +14,9 @@ fi
TRIBITS_BASE_DIR_ABS=$(readlink -f $TRIBITS_BASE_DIR)
#echo "TRIBITS_BASE_DIR_ABS = $TRIBITS_BASE_DIR_ABS"
-# Check to make sure that the env has been loaded correctly
-if [ "$LOADED_TRIBITS_DEV_ENV" != "gcc-4.8.3" ] ; then
- echo "Error, must source /home/vera_env/gcc-4.8.3/load_dev_env.[sh,csh] before running checkin-test-vera.sh!"
- exit 1
-fi
+# Load the env:
+source /home/vera_env/gcc-4.8.3/load_dev_env.sh
+export PATH=/home/vera_env/common_tools/cmake-2.8.11/bin:$PATH
# Create local defaults file if one does not exist
_LOCAL_CHECKIN_TEST_DEFAULTS=local-checkin-test-defaults.py
@@ -41,9 +31,6 @@ defaults = [
" > $_LOCAL_CHECKIN_TEST_DEFAULTS
fi
-# Use CMake 2.8.11 to test since that is the min version we are enforcing!
-export PATH=/home/vera_dev/common_tools/cmake-2.8.11/bin:$PATH
-
$TRIBITS_BASE_DIR_ABS/checkin-test.py \
--extra-cmake-options="-DPYTHON_EXECUTABLE=/usr/bin/python2.6" \
--ctest-timeout=180 \
diff --git a/dev_testing/crf450/checkin-test-crf450-cmake-3.6.2.sh b/dev_testing/crf450/checkin-test-crf450-cmake-3.6.2.sh
new file mode 100755
index 000000000..9b517246e
--- /dev/null
+++ b/dev_testing/crf450/checkin-test-crf450-cmake-3.6.2.sh
@@ -0,0 +1,47 @@
+#!/bin/bash
+
+# Used to test TriBITS on crf450 using the VERA Dev Env with CMake 3.6.2.
+#
+# You can link this script into any location and it will work out of the box.
+#
+
+if [ "$TRIBITS_BASE_DIR" == "" ] ; then
+ _ABS_FILE_PATH=`readlink -f $0`
+ _SCRIPT_DIR=`dirname $_ABS_FILE_PATH`
+ TRIBITS_BASE_DIR=$_SCRIPT_DIR/../..
+fi
+
+TRIBITS_BASE_DIR_ABS=$(readlink -f $TRIBITS_BASE_DIR)
+#echo "TRIBITS_BASE_DIR_ABS = $TRIBITS_BASE_DIR_ABS"
+
+# Load the env:
+source /home/vera_env/gcc-4.8.3/load_dev_env.sh
+export PATH=/home/vera_env/common_tools/cmake-3.6.2/bin:$PATH
+
+# Create extra builds run by this script
+
+echo "
+-DTPL_ENABLE_MPI:BOOL=ON
+-DCMAKE_BUILD_TYPE:STRING=DEBUG
+-DTriBITS_ENABLE_DEBUG:BOOL=ON
+-DTriBITS_ENABLE_Fortran:BOOL=ON
+" > MPI_DEBUG_CMAKE-3.6.2.config
+
+echo "
+-DTPL_ENABLE_MPI:BOOL=OFF
+-DCMAKE_BUILD_TYPE:STRING=RELEASE
+-DTriBITS_ENABLE_DEBUG:BOOL=OFF
+-DCMAKE_C_COMPILER=gcc
+-DCMAKE_CXX_COMPILER=g++
+-DCMAKE_Fortran_COMPILER=gfortran
+" > SERIAL_RELEASE_CMAKE-3.6.2.config
+
+# Run checkin-test.py
+
+$TRIBITS_BASE_DIR_ABS/checkin-test.py \
+--extra-cmake-options="-DPYTHON_EXECUTABLE=/usr/bin/python2.6" \
+--default-builds= \
+--st-extra-builds=MPI_DEBUG_CMAKE-3.6.2,SERIAL_RELEASE_CMAKE-3.6.2 \
+--ctest-timeout=180 \
+--skip-case-no-email \
+"$@"
diff --git a/dev_testing/crf450/checkin-test-crf450-do-all-push.sh b/dev_testing/crf450/checkin-test-crf450-do-all-push.sh
new file mode 100755
index 000000000..b42779db7
--- /dev/null
+++ b/dev_testing/crf450/checkin-test-crf450-do-all-push.sh
@@ -0,0 +1,81 @@
+#!/bin/bash
+#
+# Used to test and push TriBITS on crf450 using the VERA Dev Env with CMake
+# 3.8.11 and CMake 3.6.2.
+#
+# Unlike regular checkin-tset.py drivers, this script is hard-coded with
+# --do-all --push and does not accept any other arguments. To use this, you
+# need to also symlink in the scripts checkin-test-crf450-cmake-2.8.11.sh
+# checkin-test-crf450-cmake-3.6.2.sh then run as:
+#
+# $ ./checkin-test-crf450-cmake-3.6.2.sh
+#
+# WARNING: This does the --push as well so make sure you want to do that!
+#
+# You can skip the push by running with:
+#
+# $ env CHECKIN_TEST_CRF450_SKIP_PUSH=1 ./checkin-test-crf450-cmake-3.6.2.sh
+#
+# You can also just do a local test with:
+#
+# $ env CHECKIN_TEST_CRF450_SKIP_PUSH=1 \
+# CHECKIN_TEST_CRF450_LOCAL_DO_ALL=1 \
+# ./checkin-test-crf450-cmake-3.6.2.sh
+#
+# This script does not send out any email except for the final checkin-test.py
+# --push command.
+#
+# NOTE: This script is NOT run with 'bash -e' so failures in the individual
+# checkin-test calls are ignored until the final checkin-test.py script is
+# called. But that final checkin-test.py script will not push unless all of
+# the listed builds all passed.
+#
+
+if [ "$TRIBITS_BASE_DIR" == "" ] ; then
+ _ABS_FILE_PATH=`readlink -f $0`
+ _SCRIPT_DIR=`dirname $_ABS_FILE_PATH`
+ TRIBITS_BASE_DIR=$_SCRIPT_DIR/../..
+fi
+
+TRIBITS_BASE_DIR_ABS=$(readlink -f $TRIBITS_BASE_DIR)
+#echo "TRIBITS_BASE_DIR_ABS = $TRIBITS_BASE_DIR_ABS"
+
+if [ "$CHECKIN_TEST_CRF450_LOCAL_DO_ALL" == "1" ] ; then
+ CHECKIN_TEST_1_DO_ALL_ARG=--local-do-all
+ CHECKIN_TEST_2_ALLOW_NO_PULL_ARG=--allow-no-pull
+else
+ CHECKIN_TEST_1_DO_ALL_ARG=--do-all
+ CHECKIN_TEST_2_ALLOW_NO_PULL_ARG=
+fi
+
+if [ "$CHECKIN_TEST_CRF450_SKIP_PUSH" == "1" ] ; then
+ CHECKIN_TEST_PUSH_ARG=
+else
+ CHECKIN_TEST_PUSH_ARG=--push
+fi
+
+echo
+echo "***"
+echo "*** A) Running checkin-test-crf450-cmake-2.8.11.sh $CHECKIN_TEST_1_DO_ALL_ARG --send-email-to= ..."
+echo "***"
+echo
+
+./checkin-test-crf450-cmake-2.8.11.sh $CHECKIN_TEST_1_DO_ALL_ARG --send-email-to=
+
+echo
+echo "***"
+echo "*** B) Running checkin-test-crf450-cmake-3.6.2.sh $CHECKIN_TEST_2_ALLOW_NO_PULL_ARG --configure --build --test --send-email-to= ..."
+echo "***"
+echo
+
+./checkin-test-crf450-cmake-3.6.2.sh $CHECKIN_TEST_2_ALLOW_NO_PULL_ARG --configure --build --test --send-email-to=
+
+echo
+echo "***"
+echo "*** C) Running checkin-test.py [all the builds] --no-rebase $CHECKIN_TEST_PUSH_ARG ..."
+echo "***"
+echo
+
+$TRIBITS_BASE_DIR_ABS/checkin-test.py \
+--st-extra-builds=MPI_DEBUG_CMAKE-3.6.2,SERIAL_RELEASE_CMAKE-3.6.2 \
+--no-rebase $CHECKIN_TEST_PUSH_ARG
diff --git a/test/ci_support/CDashSubprojectDependencies.gold.xml b/test/ci_support/CDashSubprojectDependencies.gold.xml
index d7579fd00..ec8bf4892 100644
--- a/test/ci_support/CDashSubprojectDependencies.gold.xml
+++ b/test/ci_support/CDashSubprojectDependencies.gold.xml
@@ -1,120 +1,144 @@
+ cmake
+ packages/teuchos
+ packages/rtop
+ packages/epetra
+ packages/zoltan
+ packages/shards
+ packages/triutils
+ packages/tpetra
+ packages/epetraext
+ packages/stokhos
+ packages/sacado
+ packages/thyra
+ packages/isorropia
+ packages/aztecoo
+ packages/galeri
+ packages/amesos
+ packages/intrepid
+ packages/ifpack
+ packages/ml
+ packages/belos
+ packages/stratimikos
+ packages/rbgen
+ packages/phalanx
+ packages/panzer
diff --git a/test/ci_support/CMakeLists.txt b/test/ci_support/CMakeLists.txt
index 63ae951ba..36c5d9189 100644
--- a/test/ci_support/CMakeLists.txt
+++ b/test/ci_support/CMakeLists.txt
@@ -85,22 +85,43 @@ TRIBITS_ADD_ADVANCED_TEST( XmlHtmlCDashOutputTest
)
+TRIBITS_ADD_ADVANCED_TEST( TribitsPackageFilePathUtils_UnitTests
+ OVERALL_WORKING_DIRECTORY TEST_NAME
+ OVERALL_NUM_MPI_PROCS 1
+ TEST_0 CMND ${PYTHON_EXECUTABLE}
+ ARGS ${CMAKE_CURRENT_SOURCE_DIR}/TribitsPackageFilePathUtils_UnitTests.py -v
+ PASS_REGULAR_EXPRESSION "OK"
+ )
+
+
+TRIBITS_ADD_ADVANCED_TEST( TribitsPackageTestNameUtils_UnitTests
+ OVERALL_WORKING_DIRECTORY TEST_NAME
+ OVERALL_NUM_MPI_PROCS 1
+ TEST_0 CMND ${PYTHON_EXECUTABLE}
+ ARGS ${CMAKE_CURRENT_SOURCE_DIR}/TribitsPackageTestNameUtils_UnitTests.py -v
+ PASS_REGULAR_EXPRESSION "OK"
+ )
+
+
+TRIBITS_ADD_ADVANCED_TEST( get_tribits_packages_from_last_tests_failed_1
+ OVERALL_WORKING_DIRECTORY TEST_NAME
+ OVERALL_NUM_MPI_PROCS 1
+ TEST_0
+ MESSAGE "Run checkin-test.py script to make sure it finds base dir"
+ CMND ${PYTHON_EXECUTABLE}
+ ARGS
+ -E "${${PROJECT_NAME}_TRIBITS_DIR}/ci_support/get-tribits-packages-from-last-tests-failed.py"
+ --deps-xml-file="${CMAKE_CURRENT_SOURCE_DIR}/TrilinosPackageDependencies.gold.xml"
+ --last-tests-failed-file="${CMAKE_CURRENT_SOURCE_DIR}/LastTestsFailed.1.log"
+ PASS_REGULAR_EXPRESSION_ALL
+ "^Thyra[;]Teuchos\n"
+ )
+
+
#
# Test checkin-test.py script
#
-
-ASSERT_DEFINED(${PROJECT_NAME}_ENABLE_DEVELOPMENT_MODE)
-IF (${PROJECT_NAME}_ENABLE_DEVELOPMENT_MODE)
- TRIBITS_ADD_ADVANCED_TEST( TribitsPackageFilePathUtils_UnitTests
- OVERALL_WORKING_DIRECTORY TEST_NAME
- OVERALL_NUM_MPI_PROCS 1
- TEST_0 CMND ${PYTHON_EXECUTABLE}
- ARGS ${CMAKE_CURRENT_SOURCE_DIR}/TribitsPackageFilePathUtils_UnitTests.py -v
- PASS_REGULAR_EXPRESSION "OK"
- )
-ENDIF()
-
TRIBITS_ADD_ADVANCED_TEST( clone_extra_repos_UnitTests
OVERALL_WORKING_DIRECTORY TEST_NAME
OVERALL_NUM_MPI_PROCS 1
@@ -163,3 +184,48 @@ TRIBITS_ADD_ADVANCED_TEST( CDashQueryPassFail_UnitTests
ARGS ${CMAKE_CURRENT_SOURCE_DIR}/CDashQueryPassFail_UnitTests.py -v
PASS_REGULAR_EXPRESSION "OK"
)
+
+#
+# TribitsExampleProject checkin-test.py tests
+#
+
+
+TRIBITS_ADD_ADVANCED_TEST( TribitsExampleProject_checkin_test
+ OVERALL_WORKING_DIRECTORY TEST_NAME
+ OVERALL_NUM_MPI_PROCS 1
+
+ TEST_0
+ MESSAGE "Copy TribitsExampleProject so we can snapshot TriBITS into it"
+ CMND cp
+ ARGS -r ${${PROJECT_NAME}_TRIBITS_DIR}/examples/TribitsExampleProject
+ TribitsExampleProject
+ # NOTE: Had to use 'cp -r' instead of 'cmake -E copy_directory' because
+ # the latter failed for a development version of CMake. But since the
+ # checkin-test.py scrpt will really only run on Linux/Unix systems, using
+ # 'cp -r' is not a testing portability problem.
+
+ TEST_1
+ MESSAGE "Copy tribits dir into TribitsExampleProject/cmake/"
+ CMND cp
+ ARGS -r ${${PROJECT_NAME}_TRIBITS_DIR}
+ TribitsExampleProject/cmake/tribits
+
+ TEST_2
+ MESSAGE "Run checkin-test.py script to make sure it finds base dir"
+ CMND ${PYTHON_EXECUTABLE}
+ ARGS -E TribitsExampleProject/cmake/tribits/ci_support/checkin-test.py
+ --enable-all-packages=on --send-email-to= --send-email-to-on-push= --allow-no-pull
+ PASS_REGULAR_EXPRESSION_ALL
+ "src-dir=.*/TriBITS_TribitsExampleProject_checkin_test/TribitsExampleProject/cmake/tribits/ci_support/[.][.]/[.][.]/[.][.]"
+ "0[)] MPI_DEBUG => No configure, build, or test for MPI_DEBUG was requested! => Not ready to push! [(]-1.00 min[)]"
+ "1[)] SERIAL_RELEASE => No configure, build, or test for SERIAL_RELEASE was requested! => Not ready to push! [(]-1.00 min[)]"
+ # NOTE: That above test proves that the checkin-test.py script can find
+ # the base directory when run as
+ # /cmake/tribis/ci_support/checkin-test.py
+
+ )
+
+
+# NOTE: The fact that all testing and pushing for the checkin-test.py script
+# is using the symlinked TriBITS/checkin-test.py tests and protects that use
+# case.
diff --git a/test/ci_support/CheckinTest_UnitTests.py b/test/ci_support/CheckinTest_UnitTests.py
index c17cf8a73..d53d731d6 100644
--- a/test/ci_support/CheckinTest_UnitTests.py
+++ b/test/ci_support/CheckinTest_UnitTests.py
@@ -1624,7 +1624,7 @@ def checkin_test_run_case(testObject, testName, optionsStr, cmndInterceptsStr, \
# C) Set up the command intercept file
baseCmndInterceptsStr = \
- "FT: .*checkin-test-impl\.py.*\n" \
+ "FT: .*checkin-test\.py.*\n" \
"FT: .*cmake .*TribitsGetExtraReposForCheckinTest.cmake.*\n" \
"FT: date\n" \
"FT: rm [a-zA-Z0-9_/\.]+\n" \
@@ -3693,6 +3693,31 @@ def test_set_test_categories(self):
)
+ def test_relative_src_dir(self):
+
+ testName = "relative_src_dir"
+ testDir = os.path.join(os.getcwd(), g_checkin_test_tests_dir, testName)
+ relativePathToSrc = os.path.relpath(mockProjectBaseDir, testDir)
+ #print "relativePathToSrc = " + relativePathToSrc
+
+ checkin_test_configure_test(
+ \
+ self,
+ \
+ testName,
+ \
+ "--src-dir="+relativePathToSrc+" --default-builds=MPI_DEBUG",
+ \
+ [
+ ("MPI_DEBUG/do-configure.base",
+ mockProjectBaseDir \
+ ),
+ ],
+ extraPassRegexStr = \
+ "src-dir=."+relativePathToSrc+".\n"
+ )
+
+
def test_auto_enable(self):
checkin_test_configure_enables_test(
\
diff --git a/test/ci_support/ExtraReposList.cmake b/test/ci_support/ExtraReposList.cmake
deleted file mode 120000
index deb5ea20e..000000000
--- a/test/ci_support/ExtraReposList.cmake
+++ /dev/null
@@ -1 +0,0 @@
-../../tribits/doc/developers_guide/ExtraReposList.cmake
\ No newline at end of file
diff --git a/test/ci_support/ExtraReposList.cmake b/test/ci_support/ExtraReposList.cmake
new file mode 100644
index 000000000..b88907985
--- /dev/null
+++ b/test/ci_support/ExtraReposList.cmake
@@ -0,0 +1,7 @@
+TRIBITS_PROJECT_DEFINE_EXTRA_REPOSITORIES(
+ ExtraRepo1 "" GIT someurl.com:/ExtraRepo1 "" Continuous
+ ExtraRepo2 packages/SomePackage/Blah GIT someurl2.com:/ExtraRepo2
+ NOPACKAGES Nightly
+ ExtraRepo3 "" HG someurl3.com:/ExtraRepo3 "" Continuous
+ ExtraRepo4 "" SVN someurl4.com:/ExtraRepo4 "" Nightly
+ )
diff --git a/test/ci_support/LastTestsFailed.1.log b/test/ci_support/LastTestsFailed.1.log
new file mode 100644
index 000000000..93c2fc4ff
--- /dev/null
+++ b/test/ci_support/LastTestsFailed.1.log
@@ -0,0 +1,4 @@
+5:ThyraCoreLibs_SomeTest2
+20:Teuchos_SomeTest1
+7:Thyra_SomeTest3
+20:Teuchos_SomeTest4
diff --git a/test/ci_support/TribitsPackageTestNameUtils_UnitTests.py b/test/ci_support/TribitsPackageTestNameUtils_UnitTests.py
new file mode 100644
index 000000000..bd8975f6d
--- /dev/null
+++ b/test/ci_support/TribitsPackageTestNameUtils_UnitTests.py
@@ -0,0 +1,181 @@
+# @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
+
+#########################################################
+# Unit testing code for TribitsPackageTestNameUtils.py #
+#########################################################
+
+import os
+import sys
+
+ciSupportDir = os.path.abspath(
+ os.path.join(
+ os.path.dirname(os.path.abspath(__file__)),
+ "../..", "tribits/ci_support"
+ )
+ )
+sys.path = [ciSupportDir] + sys.path
+
+from TribitsPackageTestNameUtils import *
+import unittest
+
+testingTrilinosDepsXmlInFile = getScriptBaseDir()+"/TrilinosPackageDependencies.gold.xml"
+trilinosDependencies = getProjectDependenciesFromXmlFile(testingTrilinosDepsXmlInFile)
+
+#print "\ntrilinosDependencies:\n", trilinosDependencies
+
+
+class test_getPackageNameFromTestName(unittest.TestCase):
+
+
+ def test_Teuchos_SomeTest1(self):
+ self.assertEqual(
+ getPackageNameFromTestName( trilinosDependencies, 'Teuchos_SomeTest1' ),
+ 'Teuchos' )
+
+
+ def test_Thyra_SomeTest1(self):
+ self.assertEqual(
+ getPackageNameFromTestName( trilinosDependencies, 'Thyra_SomeTest1' ),
+ 'Thyra' )
+
+
+ def test_ThyraCoreLibs_SomeTest2(self):
+ self.assertEqual(
+ getPackageNameFromTestName( trilinosDependencies, 'ThyraCoreLibs_SomeTest2' ),
+ 'Thyra' )
+
+
+ def test_ThyraEpetra_SomeTest3(self):
+ self.assertEqual(
+ getPackageNameFromTestName( trilinosDependencies, 'ThyraEpetra_SomeTest3' ),
+ 'Thyra' )
+
+
+ def test_EpetraExt_SomeTest4(self):
+ self.assertEqual(
+ getPackageNameFromTestName( trilinosDependencies, 'EpetraExt_SomeTest4' ),
+ 'EpetraExt' )
+
+
+class test_getTestNameFromLastTestsFailedLine(unittest.TestCase):
+
+
+ def test_Teuchos_SomeTest1(self):
+ self.assertEqual(
+ getTestNameFromLastTestsFailedLine( trilinosDependencies, '1:Teuchos_SomeTest1' ),
+ 'Teuchos_SomeTest1' )
+
+
+ def test_ThyraCoreLib_TestName2(self):
+ self.assertEqual(
+ getTestNameFromLastTestsFailedLine( trilinosDependencies, '50:ThyraCoreLib_TestName2' ),
+ 'ThyraCoreLib_TestName2' )
+
+
+class test_getPackageNamesFromLastTestsFailedLines(unittest.TestCase):
+
+
+ def test_FileList_Empty(self):
+ self.assertEqual(
+ getPackageNamesFromLastTestsFailedLines(
+ trilinosDependencies,
+ [],
+ ),
+ [] )
+
+
+ def test_FileList_1(self):
+ self.assertEqual(
+ getPackageNamesFromLastTestsFailedLines(
+ trilinosDependencies,
+ [
+ '20:Teuchos_SomeTest1',
+ ] \
+ ),
+ ['Teuchos'] )
+
+
+ def test_FileList_2(self):
+ self.assertEqual(
+ getPackageNamesFromLastTestsFailedLines(
+ trilinosDependencies,
+ [
+ '5:ThyraCoreLibs_SomeTest2',
+ '20:Teuchos_SomeTest1',
+ ] \
+ ),
+ ['Thyra', 'Teuchos'] )
+
+
+ def test_FileList_3_duplicate(self):
+ self.assertEqual(
+ getPackageNamesFromLastTestsFailedLines(
+ trilinosDependencies,
+ [
+ '5:ThyraCoreLibs_SomeTest2',
+ '20:Teuchos_SomeTest1',
+ '7:Thyra_SomeTest3',
+ ] \
+ ),
+ ['Thyra', 'Teuchos'] )
+
+
+ def test_FileList_4_duplicate(self):
+ self.assertEqual(
+ getPackageNamesFromLastTestsFailedLines(
+ trilinosDependencies,
+ [
+ '5:ThyraCoreLibs_SomeTest2',
+ '20:Teuchos_SomeTest1',
+ '7:Thyra_SomeTest3',
+ '20:Teuchos_SomeTest4',
+ ] \
+ ),
+ ['Thyra', 'Teuchos'] )
+
+
+def suite():
+ suite = unittest.TestSuite()
+ suite.addTest(unittest.makeSuite(testTrilinosPackageFilePathUtils))
+ return suite
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/test/ci_support/TrilinosPackageDependencies.extraRepoOnePackage.gold.xml b/test/ci_support/TrilinosPackageDependencies.extraRepoOnePackage.gold.xml
index ba72249e6..476f8c18f 100644
--- a/test/ci_support/TrilinosPackageDependencies.extraRepoOnePackage.gold.xml
+++ b/test/ci_support/TrilinosPackageDependencies.extraRepoOnePackage.gold.xml
@@ -1,4 +1,4 @@
-
+
diff --git a/test/ci_support/TrilinosPackageDependencies.gold.xml b/test/ci_support/TrilinosPackageDependencies.gold.xml
index 647fe5cfd..6db9c6c42 100644
--- a/test/ci_support/TrilinosPackageDependencies.gold.xml
+++ b/test/ci_support/TrilinosPackageDependencies.gold.xml
@@ -1,4 +1,4 @@
-
+
diff --git a/test/ci_support/TrilinosPackageDependencies.preCopyrightTrilinos.extraTrilinosRepo.gold.xml b/test/ci_support/TrilinosPackageDependencies.preCopyrightTrilinos.extraTrilinosRepo.gold.xml
index 0b691edc7..1274b61b8 100644
--- a/test/ci_support/TrilinosPackageDependencies.preCopyrightTrilinos.extraTrilinosRepo.gold.xml
+++ b/test/ci_support/TrilinosPackageDependencies.preCopyrightTrilinos.extraTrilinosRepo.gold.xml
@@ -1,4 +1,4 @@
-
+
diff --git a/test/ci_support/TrilinosPackageDependencies.preCopyrightTrilinos.gold.xml b/test/ci_support/TrilinosPackageDependencies.preCopyrightTrilinos.gold.xml
index e4f30a02c..23daadc3b 100644
--- a/test/ci_support/TrilinosPackageDependencies.preCopyrightTrilinos.gold.xml
+++ b/test/ci_support/TrilinosPackageDependencies.preCopyrightTrilinos.gold.xml
@@ -1,4 +1,4 @@
-
+
diff --git a/test/ci_support/TrilinosPackageDependencies.preRepoOnePackage.preCopyrightTrilinos.gold.xml b/test/ci_support/TrilinosPackageDependencies.preRepoOnePackage.preCopyrightTrilinos.gold.xml
index 5e5a9ecf4..61bf49312 100644
--- a/test/ci_support/TrilinosPackageDependencies.preRepoOnePackage.preCopyrightTrilinos.gold.xml
+++ b/test/ci_support/TrilinosPackageDependencies.preRepoOnePackage.preCopyrightTrilinos.gold.xml
@@ -1,4 +1,4 @@
-
+
diff --git a/test/core/CMakeLists.txt b/test/core/CMakeLists.txt
index 272534521..ca65a1df5 100644
--- a/test/core/CMakeLists.txt
+++ b/test/core/CMakeLists.txt
@@ -49,7 +49,7 @@ TRIBITS_ADD_ADVANCED_TEST( TestingFunctionMacro_UnitTests
-D${PROJECT_NAME}_TRIBITS_DIR=${${PROJECT_NAME}_TRIBITS_DIR}
-P "${CMAKE_CURRENT_SOURCE_DIR}/TestingFunctionMacro_UnitTests.cmake"
PASS_REGULAR_EXPRESSION_ALL
- "Final UnitTests Result: num_run = 492"
+ "Final UnitTests Result: num_run = 499"
"Final UnitTests Result: PASSED"
)
@@ -102,7 +102,7 @@ TRIBITS_ADD_ADVANCED_TEST( TribitsAdjustPackageEnables_UnitTests
-DCMAKE_CURRENT_LIST_DIR=${CMAKE_CURRENT_SOURCE_DIR}
-P "${CMAKE_CURRENT_SOURCE_DIR}/TribitsAdjustPackageEnables_UnitTests.cmake"
PASS_REGULAR_EXPRESSION_ALL
- "Final UnitTests Result: num_run = 198"
+ "Final UnitTests Result: num_run = 203"
"Final UnitTests Result: PASSED"
)
diff --git a/test/core/CTestScriptsUnitTests/CMakeLists.txt b/test/core/CTestScriptsUnitTests/CMakeLists.txt
index d4d18c0fd..a003ab09e 100644
--- a/test/core/CTestScriptsUnitTests/CMakeLists.txt
+++ b/test/core/CTestScriptsUnitTests/CMakeLists.txt
@@ -503,26 +503,78 @@ TRIBITS_ADD_ADVANCED_TEST(
# TAAT() ALWAYS_FAIL_ON_NONZERO_RETURN
+TRIBITS_ADD_ADVANCED_TEST(
+ CTestScripts_TAAT_always_fail_on_nonzero_return
+ TEST_0 EXEC GenericDriver
+ ALWAYS_FAIL_ON_NONZERO_RETURN
+ ARGS "This test passed!" 1
+ WILL_FAIL
+ OVERALL_NUM_MPI_PROCS 1
+ )
+ # Above, ALWAYS_FAIL_ON_NONZERO_RETURN is listed belore ARGS so that the
+ # parsing will error out if it is not defined.
+
TRIBITS_ADD_ADVANCED_TEST(
CTestScripts_TAAT_pass_regular_expression_always_fail_on_nonzero_return
TEST_0 EXEC GenericDriver
+ ALWAYS_FAIL_ON_NONZERO_RETURN
ARGS "This test passed!" 1
PASS_REGULAR_EXPRESSION "This test passed"
- ALWAYS_FAIL_ON_NONZERO_RETURN
WILL_FAIL
OVERALL_NUM_MPI_PROCS 1
)
- # Comment out WILL_FAIL and you will see th test fails because
- # ALWAYS_FAIL_ON_NONZERO_RETURN is speicfied.
+ # Without the behavior of ALWAYS_FAIL_ON_NONZERO_RETURN, this test will fail
+ # because the PASS_REGULAR_EXPRESSION match will pass.
TRIBITS_ADD_ADVANCED_TEST(
CTestScripts_TAAT_pass_regular_expression_all_always_fail_on_nonzero_return
TEST_0 EXEC GenericDriver
+ ALWAYS_FAIL_ON_NONZERO_RETURN
ARGS "This test passed!" 1
PASS_REGULAR_EXPRESSION_ALL "This test" "This test passed"
- ALWAYS_FAIL_ON_NONZERO_RETURN
WILL_FAIL
OVERALL_NUM_MPI_PROCS 1
)
- # Comment out WILL_FAIL and you will see th test fails because
- # ALWAYS_FAIL_ON_NONZERO_RETURN is speicfied.
+ # Without the behavior of ALWAYS_FAIL_ON_NONZERO_RETURN, this test will fail
+ # because the PASS_REGULAR_EXPRESSION match will pass.
+
+# TAAT() ALWAYS_FAIL_ON_ZERO_RETURN
+
+TRIBITS_ADD_ADVANCED_TEST(
+ CTestScripts_TAAT_always_fail_on_zero_return
+ TEST_0 EXEC GenericDriver
+ ALWAYS_FAIL_ON_ZERO_RETURN
+ ARGS "This test failed but returned 0 when it should have returned nonzero!" 0
+ WILL_FAIL
+ OVERALL_NUM_MPI_PROCS 1
+ )
+ # Above, ALWAYS_FAIL_ON_ZERO_RETURN is listed belore ARGS so that the
+ # parsing will error out if it is not defined. Also, without the behavior
+ # of ALWAYS_FAIL_ON_ZERO_RETURN, this test will fail since the default
+ # pass/fail is return value of 0 which is negated with WILL_FAIL.
+
+TRIBITS_ADD_ADVANCED_TEST(
+ CTestScripts_TAAT_pass_regular_expression_always_fail_on_zero_return
+ TEST_0 EXEC GenericDriver
+ ALWAYS_FAIL_ON_ZERO_RETURN
+ ARGS "This test failed but should have returned a nonzero return code!" 0
+ PASS_REGULAR_EXPRESSION "This test failed"
+ WILL_FAIL
+ OVERALL_NUM_MPI_PROCS 1
+ )
+ # Above: Without the behavior of ALWAYS_FAIL_ON_NONZERO_RETURN, this test
+ # will fail because the PASS_REGULAR_EXPRESSION match will pass and
+ # WILL_FAIL will negate that.
+
+TRIBITS_ADD_ADVANCED_TEST(
+ CTestScripts_TAAT_pass_regular_expression_all_always_fail_on_zero_return
+ TEST_0 EXEC GenericDriver
+ ALWAYS_FAIL_ON_ZERO_RETURN
+ ARGS "This test failed but should have returned a nonzero return code!" 0
+ PASS_REGULAR_EXPRESSION_ALL "This test" "This test failed"
+ WILL_FAIL
+ OVERALL_NUM_MPI_PROCS 1
+ )
+ # Above: Without the behavior of ALWAYS_FAIL_ON_NONZERO_RETURN, this test
+ # will fail because the PASS_REGULAR_EXPRESSION_ALL match will pass and
+ # WILL_FAIL will negate that.
diff --git a/test/core/DependencyUnitTests/CMakeLists.txt b/test/core/DependencyUnitTests/CMakeLists.txt
index 011c67d43..548dc4c22 100644
--- a/test/core/DependencyUnitTests/CMakeLists.txt
+++ b/test/core/DependencyUnitTests/CMakeLists.txt
@@ -56,13 +56,15 @@ SET(MOCK_TRILINOS_DIR
FUNCTION(CREATE_DEPENDENCY_XML_DUMP_TEST_CASE TEST_NAME)
- PARSE_ARGUMENTS(
+ CMAKE_PARSE_ARGUMENTS(
#prefix
PARSE
- #lists
- "ARGS;PASS_REGULAR_EXPRESSION_ALL;COMPARE_XML_FILE"
#options
""
+ #one_value_keywords
+ ""
+ #mulit_value_keywords
+ "ARGS;PASS_REGULAR_EXPRESSION_ALL;COMPARE_XML_FILE"
${ARGN}
)
@@ -192,13 +194,15 @@ SET(REDUCED_MOCK_TRILINOS_OUTPUT_DIR
FUNCTION(CREATE_REDUCED_DEPENDENCY_HANDLING_TEST_CASE TEST_NAME)
- PARSE_ARGUMENTS(
+ CMAKE_PARSE_ARGUMENTS(
#prefix
PARSE
- #lists
- "ARGS;PASS_REGULAR_EXPRESSION_ALL"
#options
""
+ #one_value_keywords
+ ""
+ #multi_value_keywords
+ "ARGS;PASS_REGULAR_EXPRESSION_ALL"
${ARGN}
)
@@ -464,7 +468,7 @@ CREATE_REDUCED_DEPENDENCY_HANDLING_TEST_CASE(
CREATE_REDUCED_DEPENDENCY_HANDLING_TEST_CASE(
- EnableAllPackages_SS_TestRequiredTpl_DisableAMD
+ EnableAllPackages_ST_TestRequiredTpl_DisableAMD
ARGS
-DSHOW_TEST_REQUIRED_TPL_DEP=ON
-DTrilinos_ENABLE_ALL_PACKAGES=ON
@@ -483,7 +487,7 @@ CREATE_REDUCED_DEPENDENCY_HANDLING_TEST_CASE(
CREATE_REDUCED_DEPENDENCY_HANDLING_TEST_CASE(
- EnableAllPackages_SS_TestRequiredPackage_DisableTriutils
+ EnableAllPackages_ST_TestRequiredPackage_DisableTriutils
ARGS
-DSHOW_TEST_REQUIRED_PACKAGE_DEP=ON
-DTrilinos_ENABLE_ALL_PACKAGES=ON
@@ -502,6 +506,43 @@ CREATE_REDUCED_DEPENDENCY_HANDLING_TEST_CASE(
)
+CREATE_REDUCED_DEPENDENCY_HANDLING_TEST_CASE(
+ EnableAllPackages_ST_EpetraExtEnableTriutilsOff
+ ARGS
+ -DTrilinos_ENABLE_ALL_PACKAGES=ON
+ -DTrilinos_ENABLE_SECONDARY_TESTED_CODE=ON
+ -DTrilinos_ENABLE_TESTS=ON
+ -DEpetraExt_ENABLE_Triutils=OFF
+ PASS_REGULAR_EXPRESSION_ALL
+ "-- NOTE: EpetraExt_ENABLE_Triutils=OFF is already set so not enabling even though Trilinos_ENABLE_Triutils=ON is set!"
+ )
+
+
+CREATE_REDUCED_DEPENDENCY_HANDLING_TEST_CASE(
+ EnableAllPackages_ST_EpetraExtEnableTriutilsOn
+ ARGS
+ -DTrilinos_ENABLE_ALL_PACKAGES=ON
+ -DTrilinos_ENABLE_SECONDARY_TESTED_CODE=ON
+ -DTrilinos_ENABLE_TESTS=ON
+ -DEpetraExt_ENABLE_Triutils=ON
+ PASS_REGULAR_EXPRESSION_ALL
+ "-- NOTE: EpetraExt_ENABLE_Triutils=ON is already set!"
+ )
+
+
+CREATE_REDUCED_DEPENDENCY_HANDLING_TEST_CASE(
+ ST_EnableEpetraExt_DisableTriutils_EpetraExtEnableTriutilsOn
+ ARGS
+ -DTrilinos_ENABLE_SECONDARY_TESTED_CODE=ON
+ -DTrilinos_ENABLE_TESTS=ON
+ -DTrilinos_ENABLE_EpetraExt=ON
+ -DTrilinos_ENABLE_Triutils=OFF
+ -DEpetraExt_ENABLE_Triutils=ON
+ PASS_REGULAR_EXPRESSION_ALL
+ "-- NOTE: Setting EpetraExt_ENABLE_Triutils=OFF which was ON because EpetraExt has an optional library dependence on disabled package Triutils"
+ )
+
+
#####################################################################
#
# Unit tests for dependency handling for full set of packages
@@ -511,13 +552,15 @@ CREATE_REDUCED_DEPENDENCY_HANDLING_TEST_CASE(
FUNCTION(CREATE_DEPENDENCY_HANDLING_TEST_CASE TEST_NAME)
- PARSE_ARGUMENTS(
+ CMAKE_PARSE_ARGUMENTS(
#prefix
PARSE
- #lists
- "ARGS;PASS_REGULAR_EXPRESSION_ALL"
#options
""
+ #one_value_keywords
+ ""
+ #multi_value_keywords
+ "ARGS;PASS_REGULAR_EXPRESSION_ALL"
${ARGN}
)
@@ -829,6 +872,25 @@ CREATE_DEPENDENCY_HANDLING_TEST_CASE(
)
+CREATE_DEPENDENCY_HANDLING_TEST_CASE(
+ EnableAllPackages_EnableBoost_TeuchosEnableBoostOff
+ ARGS -DTrilinos_ENABLE_ALL_PACKAGES:BOOL=ON -DTPL_ENABLE_Boost:BOOL=ON
+ -DTeuchos_ENABLE_Boost=OFF
+ PASS_REGULAR_EXPRESSION_ALL
+ "Enabling all optional package TPL support _ENABLE_ not currently disabled for enabled TPLs"
+ "-- NOTE: Teuchos_ENABLE_Boost=OFF is already set so not enabling even though TPL_ENABLE_Boost=ON is set!"
+ )
+
+
+CREATE_DEPENDENCY_HANDLING_TEST_CASE(
+ EnableAllPackages_EnableBoost_TeuchosEnableBoostOn
+ ARGS -DTrilinos_ENABLE_ALL_PACKAGES:BOOL=ON -DTPL_ENABLE_Boost:BOOL=ON
+ -DTeuchos_ENABLE_Boost=ON
+ PASS_REGULAR_EXPRESSION_ALL
+ "-- NOTE: Teuchos_ENABLE_Boost=ON is already set!"
+ )
+
+
CREATE_DEPENDENCY_HANDLING_TEST_CASE(
EnableZoltan_ZoltanEnableParMETIS
ARGS -DTrilinos_ENABLE_Zoltan=ON -DZoltan_ENABLE_ParMETIS=ON
@@ -909,28 +971,6 @@ CREATE_DEPENDENCY_HANDLING_TEST_CASE(
)
-# Deprecated ${PROJECT_NAME}_ENABLE_SECONDARY_STABLE_CODE!
-CREATE_DEPENDENCY_HANDLING_TEST_CASE(
- EnableAllPackages_EnableSecondaryStableCode_EnableAllOptionalPackges_BackwardCompatible
- ARGS -DTrilinos_ENABLE_ALL_PACKAGES=ON -DTrilinos_ENABLE_SECONDARY_STABLE_CODE=ON
- PASS_REGULAR_EXPRESSION_ALL
- "WARNING: Set var Trilinos_ENABLE_SECONDARY_STABLE_CODE is deprecated! Use Trilinos_ENABLE_SECONDARY_TESTED_CODE instead!"
- "Final set of enabled packages: TrilinosFramework Teuchos RTOp Epetra Zoltan Shards Triutils Tpetra EpetraExt Sacado Thyra Isorropia AztecOO Galeri Amesos Intrepid Ifpack ML Belos Stratimikos RBGen Phalanx 22"
- "Final set of enabled TPLs: BLAS LAPACK Boost DUMMY 4"
- )
-
-
-# Test that deprecated Trilinos_ENABLE_SECONDARY_STABLE_CODE is not set when
-# Trilinos_ENABLE_SECONDARY_TESTED_CODE is also being set.
-CREATE_DEPENDENCY_HANDLING_TEST_CASE(
- EnableAllPackages_EnableSecondaryTestedCode_EnableSecondaryStableCode_EnableAllOptionalPackges
- ARGS -DTrilinos_ENABLE_ALL_PACKAGES=ON -DTrilinos_ENABLE_SECONDARY_TESTED_CODE=ON
- -DTrilinos_ENABLE_SECONDARY_STABLE_CODE=ON
- PASS_REGULAR_EXPRESSION_ALL
- "WARNING: Set deprecated Trilinos_ENABLE_SECONDARY_STABLE_CODE and"
- )
-
-
CREATE_DEPENDENCY_HANDLING_TEST_CASE(
EnableStratimikos_EnableAllOptionalPackages_BadSystem1
ARGS -DTrilinos_ENABLE_Stratimikos=ON
@@ -1124,12 +1164,14 @@ CREATE_DEPENDENCY_HANDLING_TEST_CASE(
-DSHOW_INVALID_PACKAGE_NAME_ERROR=ON
-DTrilinos_ASSERT_MISSING_PACKAGES=ON
PASS_REGULAR_EXPRESSION_ALL
+ "CMake Error at .*/TribitsAdjustPackageEnables.cmake:.+ [(]MESSAGE[)]:"
"Error, the package 'Anasazi' is listed as a dependency of the package"
"'Teko' is in the list 'Trilinos_SE_PACKAGES' but the package 'Anasazi' is"
- "either not defined or is listed later in the package order. Check the"
- "pelling of 'Anasazi' or see how it is listed in"
- "Trilinos_PACKAGES_AND_DIRS_AND_CLASSIFICATIONS in relationship to 'Teko'"
- "Configuring incomplete, errors occurred"
+ "either not defined or is listed later in the package order[.] This may also"
+ "be an attempt to create a cicular dependency between the packages 'Anasazi'"
+ "and 'Teko' [(]which is not allowed[)][.] Check the spelling of 'Anasazi' or see"
+ "how it is listed in Trilinos_PACKAGES_AND_DIRS_AND_CLASSIFICATIONS in"
+ "relationship to 'Teko'[.]"
)
diff --git a/test/core/ExamplesUnitTests/CMakeLists.txt b/test/core/ExamplesUnitTests/CMakeLists.txt
index 9df13f045..344185b71 100644
--- a/test/core/ExamplesUnitTests/CMakeLists.txt
+++ b/test/core/ExamplesUnitTests/CMakeLists.txt
@@ -39,43 +39,10 @@
#
-# Common arguments
+# Common arguments for all inner CMake and TriBITS projects
#
-SET(SERIAL_PASSTHROUGH_CONFIGURE_ARGS
- -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
- -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
- )
-
-IF ({${PROJECT_NAME}_ENABLE_Fortran)
- APPEND_SET(SERIAL_PASSTHROUGH_CONFIGURE_ARGS
- -DCMAKE_Fortran_COMPILER=${CMAKE_Fortran_COMPILER} )
-ENDIF()
-
-SET(COMMON_ENV_ARGS_PASSTHROUGH
- -DTPL_ENABLE_MPI=${TPL_ENABLE_MPI}
- -DHeaderOnlyTpl_INCLUDE_DIRS=${${PROJECT_NAME}_TRIBITS_DIR}/examples/tpls/HeaderOnlyTpl
- )
-
-IF (TPL_ENABLE_MPI)
- APPEND_SET(COMMON_ENV_ARGS_PASSTHROUGH
- -DMPI_C_COMPILER=${MPI_C_COMPILER}
- -DMPI_CXX_COMPILER=${MPI_CXX_COMPILER}
- -DMPI_Fortran_COMPILER=${MPI_Fortran_COMPILER}
- -DMPI_EXEC=${MPI_EXEC}
- -DMPI_EXEC_DEFAULT_NUMPROCS=${MPI_EXEC_DEFAULT_NUMPROCS}
- -DMPI_EXEC_MAX_NUMPROCS=${MPI_EXEC_MAX_NUMPROCS}
- -DMPI_EXEC_NUMPROCS_FLAG=${MPI_EXEC_NUMPROCS_FLAG}
- -DMPI_EXEC_PRE_NUMPROCS_FLAGS=${MPI_EXEC_PRE_NUMPROCS_FLAGS}
- -DMPI_EXEC_POST_NUMPROCS_FLAGS=${MPI_EXEC_POST_NUMPROCS_FLAGS}
- )
- SET(TEST_MPI_1_SUFFIX "_MPI_1")
-ELSE()
- APPEND_SET(COMMON_ENV_ARGS_PASSTHROUGH
- ${SERIAL_PASSTHROUGH_CONFIGURE_ARGS}
- )
- SET(TEST_MPI_1_SUFFIX "")
-ENDIF()
+INCLUDE(${CMAKE_CURRENT_LIST_DIR}/GetCompilerPassthroughArgs.cmake)
########################################################################
@@ -114,8 +81,7 @@ TRIBITS_ADD_ADVANCED_TEST( RawHelloWorld
SET(TribitsHelloWorld_COMMON_CONFIG_ARGS
- ${COMMON_ENV_ARGS_PASSTHROUGH}
- -DTribitsHelloWorld_ENABLE_Fortran=${${PROJECT_NAME}_ENABLE_Fortran}
+ ${SERIAL_PASSTHROUGH_CONFIGURE_ARGS}
)
TRIBITS_ADD_ADVANCED_TEST( TribitsHelloWorld
@@ -124,11 +90,15 @@ TRIBITS_ADD_ADVANCED_TEST( TribitsHelloWorld
TEST_0 CMND ${CMAKE_COMMAND}
ARGS
${TribitsHelloWorld_COMMON_CONFIG_ARGS}
+ -DTribitsHelloWorld_ENABLE_TESTS=ON
+ -DHelloWorld_ENABLE_CPACK_PACKAGING=ON
${${PROJECT_NAME}_TRIBITS_DIR}/examples/TribitsHelloWorld
PASS_REGULAR_EXPRESSION_ALL
"Configuring done"
"Generating done"
"Build files have been written to: .*ExamplesUnitTests/TriBITS_TribitsHelloWorld"
+ FAIL_REGULAR_EXPRESSION
+ "Check for working Fortran compiler" # Should not be looking for Fortran!
TEST_1 CMND make
ARGS ${CTEST_BUILD_FLAGS}
PASS_REGULAR_EXPRESSION_ALL
@@ -143,6 +113,79 @@ TRIBITS_ADD_ADVANCED_TEST( TribitsHelloWorld
)
+TRIBITS_ADD_ADVANCED_TEST( TribitsHelloWorld_DefaultGlobalTimeout
+ OVERALL_WORKING_DIRECTORY TEST_NAME
+ OVERALL_NUM_MPI_PROCS 1
+
+ TEST_0
+ MESSAGE "Configure first time not setting any default timeout."
+ CMND ${CMAKE_COMMAND}
+ ARGS
+ ${TribitsHelloWorld_COMMON_CONFIG_ARGS}
+ ${${PROJECT_NAME}_TRIBITS_DIR}/examples/TribitsHelloWorld
+ ALWAYS_FAIL_ON_NONZERO_RETURN
+ TEST_1
+ MESSAGE "Make sure that 'TimeOut' is set to the CMake default of 1500"
+ CMND grep ARGS "^TimeOut: " DartConfiguration.tcl
+ PASS_REGULAR_EXPRESSION "TimeOut: 1500"
+ TEST_2
+ MESSAGE "Make sure DART_TESTING_TIMEOUT in cache is the CMake default 1500!"
+ CMND grep ARGS "^DART_TESTING_TIMEOUT:" CMakeCache.txt
+ PASS_REGULAR_EXPRESSION "DART_TESTING_TIMEOUT:STRING=1500"
+
+ TEST_3
+ MESSAGE "Reconfigure and make sure the timeout is still set correctly"
+ CMND ${CMAKE_COMMAND} ARGS .
+ PASS_REGULAR_EXPRESSION_ALL "Generating done"
+ TEST_4
+ MESSAGE "Make sure that 'TimeOut' is set correctly on reconfigure"
+ CMND grep ARGS "^TimeOut: " DartConfiguration.tcl
+ PASS_REGULAR_EXPRESSION "TimeOut: 1500"
+ TEST_5
+ MESSAGE "Make sure DART_TESTING_TIMEOUT in cache is still the default"
+ CMND grep ARGS "^DART_TESTING_TIMEOUT:" CMakeCache.txt
+ PASS_REGULAR_EXPRESSION "DART_TESTING_TIMEOUT:STRING=1500"
+
+ )
+
+
+TRIBITS_ADD_ADVANCED_TEST( TribitsHelloWorld_DefaultGlobalTimeout_ScaleTimeout
+ OVERALL_WORKING_DIRECTORY TEST_NAME
+ OVERALL_NUM_MPI_PROCS 1
+
+ TEST_0
+ MESSAGE "Configure first time not setting any default timeout but scale it."
+ CMND ${CMAKE_COMMAND}
+ ARGS
+ ${TribitsHelloWorld_COMMON_CONFIG_ARGS}
+ -DTribitsHelloWorld_SCALE_TEST_TIMEOUT=2.0
+ ${${PROJECT_NAME}_TRIBITS_DIR}/examples/TribitsHelloWorld
+ ALWAYS_FAIL_ON_NONZERO_RETURN
+ TEST_1
+ MESSAGE "Make sure that default 'TimeOut' is scaled correctly by 2.0"
+ CMND grep ARGS "^TimeOut: " DartConfiguration.tcl
+ PASS_REGULAR_EXPRESSION "TimeOut: 3000"
+ TEST_2
+ MESSAGE "Make sure DART_TESTING_TIMEOUT in cache is CMake default 1500"
+ CMND grep ARGS "^DART_TESTING_TIMEOUT:" CMakeCache.txt
+ PASS_REGULAR_EXPRESSION "DART_TESTING_TIMEOUT:STRING=1500"
+
+ TEST_3
+ MESSAGE "Reconfigure and make sure the timeout is still set correctly"
+ CMND ${CMAKE_COMMAND} ARGS .
+ PASS_REGULAR_EXPRESSION_ALL "Generating done"
+ TEST_4
+ MESSAGE "Make sure that 'TimeOut' is set correctly on reconfigure"
+ CMND grep ARGS "^TimeOut: " DartConfiguration.tcl
+ PASS_REGULAR_EXPRESSION "TimeOut: 3000"
+ TEST_5
+ MESSAGE "Make sure DART_TESTING_TIMEOUT in cache is still the default"
+ CMND grep ARGS "^DART_TESTING_TIMEOUT:" CMakeCache.txt
+ PASS_REGULAR_EXPRESSION "DART_TESTING_TIMEOUT:STRING=1500"
+
+ )
+
+
TRIBITS_ADD_ADVANCED_TEST( TribitsHelloWorld_ScaleTimeout_FirstConfig
OVERALL_WORKING_DIRECTORY TEST_NAME
OVERALL_NUM_MPI_PROCS 1
@@ -268,6 +311,69 @@ TRIBITS_ADD_ADVANCED_TEST( TribitsHelloWorld_XSDK_DEFAULTS
)
+TRIBITS_ADD_ADVANCED_TEST( TribitsHelloWorld_CONFIGURE_OPTIONS_FILE
+ OVERALL_WORKING_DIRECTORY TEST_NAME
+ OVERALL_NUM_MPI_PROCS 1
+
+ TEST_0
+ MESSAGE "Copy TribitsHelloWorld so that we can copy things into it."
+ CMND ${CMAKE_COMMAND}
+ ARGS -E copy_directory ${${PROJECT_NAME}_TRIBITS_DIR}/examples/TribitsHelloWorld TribitsHelloWorld
+
+ TEST_1
+ MESSAGE "Get the initial configure out of the way"
+ CMND ${CMAKE_COMMAND}
+ ARGS
+ ${TribitsHelloWorld_COMMON_CONFIG_ARGS}
+ -DTribitsHelloWorld_TRIBITS_DIR=${${PROJECT_NAME}_TRIBITS_DIR}
+ TribitsHelloWorld
+ PASS_REGULAR_EXPRESSION_ALL
+ "Generating done"
+ ALWAYS_FAIL_ON_NONZERO_RETURN
+
+ TEST_2
+ MESSAGE "Copy ConfigOptions1.cmake to source dir"
+ CMND cp
+ ARGS ${CMAKE_CURRENT_SOURCE_DIR}/ConfigOptions1.cmake TribitsHelloWorld/
+
+ TEST_3
+ MESSAGE "Configure using default FILEPATH pointing to ConfigOptions1.cmake (should fail)"
+ CMND ${CMAKE_COMMAND}
+ ARGS -DTribitsHelloWorld_CONFIGURE_OPTIONS_FILE=ConfigOptions1.cmake
+ .
+ PASS_REGULAR_EXPRESSION_ALL
+ "(include|INCLUDE) could not find load file"
+ "TriBITS_TribitsHelloWorld_CONFIGURE_OPTIONS_FILE/ConfigOptions1.cmake"
+ # NOTE: Above shows that FILEPATH type causes relative paths to be
+ # evaluated w.r.t. the current working directory.
+
+ TEST_4
+ MESSAGE "Configure using STRING pointing to ConfigOptions1.cmake (should pass)"
+ CMND ${CMAKE_COMMAND}
+ ARGS -DTribitsHelloWorld_CONFIGURE_OPTIONS_FILE:STRING=ConfigOptions1.cmake
+ .
+ PASS_REGULAR_EXPRESSION_ALL
+ "Reading in configuration options from ConfigOptions1.cmake"
+ "Included ConfigOptions1.cmake"
+ ALWAYS_FAIL_ON_NONZERO_RETURN
+ # NOTE: Above shows that STRING type causes relative paths to be evaluated
+ # w.r.t. the current working directory.
+
+ TEST_5
+ MESSAGE "Configure using FILEPATH pointing to ConfigOptions2.cmake (should pass)"
+ CMND ${CMAKE_COMMAND}
+ ARGS -DTribitsHelloWorld_CONFIGURE_OPTIONS_FILE:FILEPATH=${CMAKE_CURRENT_SOURCE_DIR}/ConfigOptions2.cmake
+ .
+ PASS_REGULAR_EXPRESSION_ALL
+ "Reading in configuration options from .*/test/core/ExamplesUnitTests/ConfigOptions2.cmake"
+ "Included ConfigOptions2.cmake"
+ ALWAYS_FAIL_ON_NONZERO_RETURN
+ # NOTE: Above shows that STRING type causes relative paths to be evaluated
+ # w.r.t. the current working directory.
+
+ )
+
+
########################################################################
# TribitsExampleProject
########################################################################
@@ -296,6 +402,7 @@ ELSE()
SET(REGEX_FOR_GITIGNORE)
ENDIF()
+
IF (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)
SET(DEPRECATED_WARNING_1_STR
"‘int SimpleCxx::HelloWorld::someOldFunc.. const’ is deprecated .declared at .*/TribitsExampleProject/packages/simple_cxx/src/SimpleCxx_HelloWorld.hpp:"
@@ -318,6 +425,19 @@ ELSE()
)
ENDIF()
+
+IF (TribitsExProj_CTEST_USE_NEW_AAO_FEATURES)
+ SET(LabelsForSubprojects_CMND_AND_ARGS
+ grep ARGS "^LabelsForSubprojects:" DartConfiguration.tcl)
+ SET(LabelsForSubprojects_REGEX
+ "LabelsForSubprojects: SimpleCxx[;]MixedLang[;]WithSubpackages[;]WrapExternal")
+ELSE()
+ SET(LabelsForSubprojects_CMND_AND_ARGS
+ echo ARGS "No grep, we don't need to look for anything")
+ SET(LabelsForSubprojects_REGEX "No grep, we don't need to look for anything")
+ENDIF()
+
+
TRIBITS_ADD_ADVANCED_TEST( TribitsExampleProject_ALL_ST_NoFortran
OVERALL_WORKING_DIRECTORY TEST_NAME
OVERALL_NUM_MPI_PROCS 1
@@ -338,6 +458,7 @@ TRIBITS_ADD_ADVANCED_TEST( TribitsExampleProject_ALL_ST_NoFortran
-DTribitsExProj_DUMP_PACKAGE_DEPENDENCIES=ON
-DTribitsExProj_ENABLE_EXPORT_MAKEFILES=ON
-DTribitsExProj_ENABLE_INSTALL_CMAKE_CONFIG_FILES=ON
+ -DTribitsExProj_CTEST_USE_NEW_AAO_FEATURES=${TribitsExProj_CTEST_USE_NEW_AAO_FEATURES}
-DCMAKE_CXX_FLAGS=-DSIMPLECXX_SHOW_DEPRECATED_WARNINGS=1
-DCMAKE_INSTALL_PREFIX=install
${${PROJECT_NAME}_TRIBITS_DIR}/examples/TribitsExampleProject
@@ -416,8 +537,14 @@ TRIBITS_ADD_ADVANCED_TEST( TribitsExampleProject_ALL_ST_NoFortran
"-- File Trace: PACKAGE ADD_SUBDIR .*/TribitsExampleProject/packages/with_subpackages/c/tests/CMakeLists.txt"
"-- File Trace: REPOSITORY INCLUDE .*/TribitsExampleProject/cmake/CallbackDefineRepositoryPackaging.cmake"
"-- File Trace: PROJECT INCLUDE .*/TribitsExampleProject/cmake/CallbackDefineProjectPackaging.cmake"
+ ALWAYS_FAIL_ON_NONZERO_RETURN
- TEST_1 CMND make ARGS ${CTEST_BUILD_FLAGS}
+ TEST_1
+ MESSAGE "Make sure that 'LabelsForSubprojects' is set to list of packages"
+ CMND ${LabelsForSubprojects_CMND_AND_ARGS}
+ PASS_REGULAR_EXPRESSION "${LabelsForSubprojects_REGEX}"
+
+ TEST_2 CMND make ARGS ${CTEST_BUILD_FLAGS}
MESSAGE "Build the default 'all' target using raw 'make'"
PASS_REGULAR_EXPRESSION_ALL
"Built target simplecxx"
@@ -426,8 +553,9 @@ TRIBITS_ADD_ADVANCED_TEST( TribitsExampleProject_ALL_ST_NoFortran
"Built target pws_a"
"Built target pws_b"
"Built target pws_c"
+ ALWAYS_FAIL_ON_NONZERO_RETURN
- TEST_2 CMND ${CMAKE_CTEST_COMMAND} ARGS -VV
+ TEST_3 CMND ${CMAKE_CTEST_COMMAND} ARGS -VV
MESSAGE "Run all the tests with raw 'ctest'"
PASS_REGULAR_EXPRESSION_ALL
"SimpleCxx_HelloWorldTests${TEST_MPI_1_SUFFIX} .* Passed"
@@ -436,8 +564,9 @@ TRIBITS_ADD_ADVANCED_TEST( TribitsExampleProject_ALL_ST_NoFortran
"WithSubpackagesC_test_of_c .* Passed"
"WithSubpackagesC_test_of_c_util.* Passed"
"100% tests passed, 0 tests failed out of 6"
+ ALWAYS_FAIL_ON_NONZERO_RETURN
- TEST_3
+ TEST_4
MESSAGE "Create and configure a dummy project that includes WithSubpackagesConfig.cmake"
" from the build tree"
CMND ${CMAKE_COMMAND}
@@ -473,8 +602,9 @@ TRIBITS_ADD_ADVANCED_TEST( TribitsExampleProject_ALL_ST_NoFortran
"WithSubpackages_TPL_LIST = 'HeaderOnlyTpl'"
"-- Configuring done"
"-- Generating done"
+ ALWAYS_FAIL_ON_NONZERO_RETURN
- TEST_4 CMND make ARGS install ${CTEST_BUILD_FLAGS}
+ TEST_5 CMND make ARGS install ${CTEST_BUILD_FLAGS}
MESSAGE "Build 'install' target using raw 'make'"
PASS_REGULAR_EXPRESSION_ALL
"Installing: .+/install/include/TribitsExProj_version.h"
@@ -508,8 +638,9 @@ TRIBITS_ADD_ADVANCED_TEST( TribitsExampleProject_ALL_ST_NoFortran
"Installing: .+/install/lib/cmake/WithSubpackagesC/WithSubpackagesCTargets.cmake"
"Installing: .+/install/lib/cmake/WithSubpackagesC/WithSubpackagesCTargets-release.cmake"
"Installing: .+/install/include/Makefile.export.WithSubpackagesC"
+ ALWAYS_FAIL_ON_NONZERO_RETURN
- TEST_5 CMND ${CMAKE_COMMAND}
+ TEST_6 CMND ${CMAKE_COMMAND}
ARGS
-DDUMMY_PROJECT_NAME=DummyProject
-DDUMMY_PROJECT_DIR=dummy_client_of_WithSubpackages
@@ -541,8 +672,9 @@ TRIBITS_ADD_ADVANCED_TEST( TribitsExampleProject_ALL_ST_NoFortran
"WithSubpackages_MPI_EXEC_NUMPROCS_FLAG = '${MPI_EXEC_NUMPROCS_FLAG}'"
"WithSubpackages_PACKAGE_LIST = 'WithSubpackagesC.WithSubpackagesB.WithSubpackagesA.SimpleCxx'"
"WithSubpackages_TPL_LIST = 'HeaderOnlyTpl'"
+ ALWAYS_FAIL_ON_NONZERO_RETURN
- TEST_5 CMND make ARGS package_source
+ TEST_7 CMND make ARGS package_source
MESSAGE "Create the tarball"
PASS_REGULAR_EXPRESSION_ALL
"Run CPack packaging tool for source..."
@@ -556,8 +688,252 @@ TRIBITS_ADD_ADVANCED_TEST( TribitsExampleProject_ALL_ST_NoFortran
"CPack: - Install directory: .*/examples/TribitsExampleProject"
"CPack: Create package"
"CPack: - package: .*/ExamplesUnitTests/TriBITS_TribitsExampleProject_ALL_ST_NoFortran/tribitsexproj-1.1-Source.tar.bz2 generated."
+ ALWAYS_FAIL_ON_NONZERO_RETURN
+
+ TEST_8 CMND tar ARGS -xzf tribitsexproj-1.1-Source.tar.gz
+ MESSAGE "Untar the tarball"
+ ALWAYS_FAIL_ON_NONZERO_RETURN
+
+ TEST_9 CMND diff
+ ARGS -qr
+ ${${PROJECT_NAME}_TRIBITS_DIR}/examples/TribitsExampleProject
+ tribitsexproj-1.1-Source
+ MESSAGE "Make sure right directoires are excluced"
+ PASS_REGULAR_EXPRESSION_ALL
+ "Only in .*/TribitsExampleProject/cmake: ctest"
+ ${REGEX_FOR_GITIGNORE}
+ "Only in .*/TribitsExampleProject/packages: mixed_lang"
+ "Only in .*/TribitsExampleProject/packages: wrap_external"
+ # NOTE: We don't check return code because diff returns nonzero
+
+ )
+
+
+TRIBITS_ADD_ADVANCED_TEST( TribitsExampleProject_ALL_ST_NoFortran_Ninja
+ OVERALL_WORKING_DIRECTORY TEST_NAME
+ OVERALL_NUM_MPI_PROCS 1
+ EXCLUDE_IF_NOT_TRUE USING_GENERATOR_NINJA
+ XHOSTTYPE Darwin
+
+ TEST_0 CMND ${CMAKE_COMMAND}
+ MESSAGE "Do the initial configure with ninja"
+ ARGS
+ -GNinja
+ -DTribitsExProj_WRITE_NINJA_MAKEFILES=OFF
+ ${TribitsExampleProject_COMMON_CONFIG_ARGS}
+ -DTribitsExProj_TRIBITS_DIR=${${PROJECT_NAME}_TRIBITS_DIR}
+ -DTribitsExProj_ENABLE_Fortran=OFF
+ -DTribitsExProj_ENABLE_ALL_PACKAGES=ON
+ -DTribitsExProj_ENABLE_TESTS=ON
+ -DTribitsExProj_ENABLE_SECONDARY_TESTED_CODE=ON
+ -DTribitsExProj_ENABLE_CPACK_PACKAGING=ON
+ -DTribitsExProj_DUMP_CPACK_SOURCE_IGNORE_FILES=ON
+ -DTribitsExProj_ENABLE_EXPORT_MAKEFILES=ON
+ -DTribitsExProj_ENABLE_INSTALL_CMAKE_CONFIG_FILES=ON
+ -DCMAKE_INSTALL_PREFIX=install
+ ${${PROJECT_NAME}_TRIBITS_DIR}/examples/TribitsExampleProject
+ PASS_REGULAR_EXPRESSION_ALL
+ "Configuring done"
+ "Generating done"
+ ALWAYS_FAIL_ON_NONZERO_RETURN
+
+ TEST_1 CMND ninja ARGS -j1 ${CTEST_BUILD_FLAGS}
+ MESSAGE "Build the default 'all' target using raw 'ninja'"
+ PASS_REGULAR_EXPRESSION_ALL
+ "Linking CXX .* library .*simplecxx"
+ "Linking CXX executable .*simplecxx-helloworld"
+ "Linking CXX .* library .*pws_a"
+ "Linking CXX .* library .*pws_b"
+ "Linking CXX .* library .*pws_c"
+ ALWAYS_FAIL_ON_NONZERO_RETURN
+
+ # ToDo: Add check of 'ninja" returns "ninja: no work to do"
+
+ TEST_2 CMND ${CMAKE_CTEST_COMMAND} ARGS -VV
+ MESSAGE "Run all the tests with raw 'ctest'"
+ PASS_REGULAR_EXPRESSION_ALL
+ "SimpleCxx_HelloWorldTests${TEST_MPI_1_SUFFIX} .* Passed"
+ "WithSubpackagesA_test_of_a .* Passed"
+ "WithSubpackagesB_test_of_b .* Passed"
+ "WithSubpackagesC_test_of_c .* Passed"
+ "WithSubpackagesC_test_of_c_util.* Passed"
+ "100% tests passed, 0 tests failed out of 6"
+
+ TEST_3
+ MESSAGE "Create and configure a dummy project that includes WithSubpackagesConfig.cmake"
+ " from the build tree"
+ CMND ${CMAKE_COMMAND}
+ ARGS
+ -DDUMMY_PROJECT_NAME=DummyProject
+ -DDUMMY_PROJECT_DIR=dummy_client_of_build_WithSubpackages
+ -DEXPORT_VAR_PREFIX=WithSubpackages
+ -DEXPORT_CONFIG_FILE=../packages/with_subpackages/WithSubpackagesConfig.cmake
+ -DCMAKE_COMMAND=${CMAKE_COMMAND}
+ -P ${CMAKE_CURRENT_SOURCE_DIR}/RunDummyPackageClientBulid.cmake
+ PASS_REGULAR_EXPRESSION_ALL
+ "WithSubpackages_LIBRARIES = 'pws_c.pws_b.pws_a.simplecxx'"
+ "WithSubpackages_TPL_INCLUDE_DIRS = '.+/tribits/examples/tpls/HeaderOnlyTpl'"
+ "WithSubpackages_PACKAGE_LIST = 'WithSubpackagesC.WithSubpackagesB.WithSubpackagesA.SimpleCxx'"
+ "WithSubpackages_TPL_LIST = 'HeaderOnlyTpl'"
+ ALWAYS_FAIL_ON_NONZERO_RETURN
+
+ TEST_4 CMND ninja ARGS -j1 install ${CTEST_BUILD_FLAGS}
+ MESSAGE "Build 'install' target using raw 'ninja'"
+ PASS_REGULAR_EXPRESSION_ALL
+ "Installing: .+/install/include/TribitsExProj_version.h"
+ ALWAYS_FAIL_ON_NONZERO_RETURN
+
+ TEST_5
+ MESSAGE "Configure dummy project pointing to install tree"
+ CMND ${CMAKE_COMMAND}
+ ARGS
+ -DDUMMY_PROJECT_NAME=DummyProject
+ -DDUMMY_PROJECT_DIR=dummy_client_of_WithSubpackages
+ -DEXPORT_VAR_PREFIX=WithSubpackages
+ -DEXPORT_CONFIG_FILE=../install/lib/cmake/WithSubpackages/WithSubpackagesConfig.cmake
+ -DCMAKE_COMMAND=${CMAKE_COMMAND}
+ -P ${CMAKE_CURRENT_SOURCE_DIR}/RunDummyPackageClientBulid.cmake
+ MESSAGE "Create and configure a dummy project that includes WithSubpackagesConfig.cmake"
+ PASS_REGULAR_EXPRESSION_ALL
+ "WithSubpackages_LIBRARY_DIRS = '.+/install/lib/cmake/WithSubpackages/../../../lib'"
+ "WithSubpackages_LIBRARIES = 'pws_c.pws_b.pws_a.simplecxx'"
+ "WithSubpackages_TPL_INCLUDE_DIRS = '.+/examples/tpls/HeaderOnlyTpl'"
+ "WithSubpackages_PACKAGE_LIST = 'WithSubpackagesC.WithSubpackagesB.WithSubpackagesA.SimpleCxx'"
+ "WithSubpackages_TPL_LIST = 'HeaderOnlyTpl'"
+ ALWAYS_FAIL_ON_NONZERO_RETURN
+
+ TEST_6 CMND ninja ARGS -j1 package_source
+ MESSAGE "Create the tarball"
+ PASS_REGULAR_EXPRESSION_ALL
+ "Run CPack packaging tool for source..."
+ "CPack: - package: .*/ExamplesUnitTests/TriBITS_TribitsExampleProject_ALL_ST_NoFortran_Ninja/tribitsexproj-1.1-Source.tar.gz generated."
+ ALWAYS_FAIL_ON_NONZERO_RETURN
+ # Above should be 'make package_soruce' but the dummy makefiles don't
+ # support that yet!
+
+ TEST_7 CMND tar ARGS -xzf tribitsexproj-1.1-Source.tar.gz
+ MESSAGE "Untar the tarball"
+
+ TEST_8 CMND diff
+ ARGS -qr
+ ${${PROJECT_NAME}_TRIBITS_DIR}/examples/TribitsExampleProject
+ tribitsexproj-1.1-Source
+ MESSAGE "Make sure right directoires are excluced"
+ PASS_REGULAR_EXPRESSION_ALL
+ "Only in .*/TribitsExampleProject/cmake: ctest"
+ ${REGEX_FOR_GITIGNORE}
+ "Only in .*/TribitsExampleProject/packages: mixed_lang"
+ "Only in .*/TribitsExampleProject/packages: wrap_external"
+ # NOTE: We don't check the the return code form diff because it will
+ # return nonzero if there are any differences
+
+ )
+
+
+TRIBITS_ADD_ADVANCED_TEST( TribitsExampleProject_ALL_ST_NoFortran_Ninja_Makefiles
+ OVERALL_WORKING_DIRECTORY TEST_NAME
+ OVERALL_NUM_MPI_PROCS 1
+ EXCLUDE_IF_NOT_TRUE USING_GENERATOR_NINJA ${PROJECT_NAME}_WRITE_NINJA_MAKEFILES
+ XHOSTTYPE Darwin
+
+ TEST_0 CMND ${CMAKE_COMMAND}
+ MESSAGE "Do the initial configure with ninja"
+ ARGS
+ -GNinja
+ ${TribitsExampleProject_COMMON_CONFIG_ARGS}
+ -DTribitsExProj_TRIBITS_DIR=${${PROJECT_NAME}_TRIBITS_DIR}
+ -DTribitsExProj_ENABLE_Fortran=OFF
+ -DTribitsExProj_ENABLE_ALL_PACKAGES=ON
+ -DTribitsExProj_ENABLE_TESTS=ON
+ -DTribitsExProj_ENABLE_SECONDARY_TESTED_CODE=ON
+ -DTribitsExProj_ENABLE_CPACK_PACKAGING=ON
+ -DTribitsExProj_DUMP_CPACK_SOURCE_IGNORE_FILES=ON
+ -DTribitsExProj_ENABLE_EXPORT_MAKEFILES=ON
+ -DTribitsExProj_ENABLE_INSTALL_CMAKE_CONFIG_FILES=ON
+ -DCMAKE_INSTALL_PREFIX=install
+ ${${PROJECT_NAME}_TRIBITS_DIR}/examples/TribitsExampleProject
+ PASS_REGULAR_EXPRESSION_ALL
+ "Configuring done"
+ "Generating done"
+ ALWAYS_FAIL_ON_NONZERO_RETURN
+
+ TEST_1 CMND make ARGS ${MAKE_PARALLEL_ARG} ${CTEST_BUILD_FLAGS}
+ MESSAGE "Build the default 'all' target using raw 'make'"
+ PASS_REGULAR_EXPRESSION_ALL
+ "Linking CXX .* library .*simplecxx"
+ "Linking CXX executable .*simplecxx-helloworld"
+ "Linking CXX .* library .*pws_a"
+ "Linking CXX .* library .*pws_b"
+ "Linking CXX .* library .*pws_c"
+ ALWAYS_FAIL_ON_NONZERO_RETURN
+
+ # ToDo: Add check of 'make" returns "ninja: no work to do"
+
+ TEST_2 CMND ${CMAKE_CTEST_COMMAND} ARGS -VV
+ MESSAGE "Run all the tests with raw 'ctest'"
+ PASS_REGULAR_EXPRESSION_ALL
+ "SimpleCxx_HelloWorldTests${TEST_MPI_1_SUFFIX} .* Passed"
+ "WithSubpackagesA_test_of_a .* Passed"
+ "WithSubpackagesB_test_of_b .* Passed"
+ "WithSubpackagesC_test_of_c .* Passed"
+ "WithSubpackagesC_test_of_c_util.* Passed"
+ "100% tests passed, 0 tests failed out of 6"
+
+ TEST_3
+ MESSAGE "Create and configure a dummy project that includes WithSubpackagesConfig.cmake"
+ " from the build tree"
+ CMND ${CMAKE_COMMAND}
+ ARGS
+ -DDUMMY_PROJECT_NAME=DummyProject
+ -DDUMMY_PROJECT_DIR=dummy_client_of_build_WithSubpackages
+ -DEXPORT_VAR_PREFIX=WithSubpackages
+ -DEXPORT_CONFIG_FILE=../packages/with_subpackages/WithSubpackagesConfig.cmake
+ -DCMAKE_COMMAND=${CMAKE_COMMAND}
+ -P ${CMAKE_CURRENT_SOURCE_DIR}/RunDummyPackageClientBulid.cmake
+ PASS_REGULAR_EXPRESSION_ALL
+ "WithSubpackages_LIBRARIES = 'pws_c.pws_b.pws_a.simplecxx'"
+ "WithSubpackages_TPL_INCLUDE_DIRS = '.+/tribits/examples/tpls/HeaderOnlyTpl'"
+ "WithSubpackages_PACKAGE_LIST = 'WithSubpackagesC.WithSubpackagesB.WithSubpackagesA.SimpleCxx'"
+ "WithSubpackages_TPL_LIST = 'HeaderOnlyTpl'"
+ ALWAYS_FAIL_ON_NONZERO_RETURN
+
+ TEST_4 CMND make ARGS ${MAKE_PARALLEL_ARG} install ${CTEST_BUILD_FLAGS}
+ MESSAGE "Build 'install' target using raw 'make'"
+ PASS_REGULAR_EXPRESSION_ALL
+ "Installing: .+/install/include/TribitsExProj_version.h"
+ ALWAYS_FAIL_ON_NONZERO_RETURN
+
+ TEST_5
+ MESSAGE "Configure dummy project pointing to install tree"
+ CMND ${CMAKE_COMMAND}
+ ARGS
+ -DDUMMY_PROJECT_NAME=DummyProject
+ -DDUMMY_PROJECT_DIR=dummy_client_of_WithSubpackages
+ -DEXPORT_VAR_PREFIX=WithSubpackages
+ -DEXPORT_CONFIG_FILE=../install/lib/cmake/WithSubpackages/WithSubpackagesConfig.cmake
+ -DCMAKE_COMMAND=${CMAKE_COMMAND}
+ -P ${CMAKE_CURRENT_SOURCE_DIR}/RunDummyPackageClientBulid.cmake
+ MESSAGE "Create and configure a dummy project that includes WithSubpackagesConfig.cmake"
+ PASS_REGULAR_EXPRESSION_ALL
+ "WithSubpackages_LIBRARY_DIRS = '.+/install/lib/cmake/WithSubpackages/../../../lib'"
+ "WithSubpackages_LIBRARIES = 'pws_c.pws_b.pws_a.simplecxx'"
+ "WithSubpackages_TPL_INCLUDE_DIRS = '.+/examples/tpls/HeaderOnlyTpl'"
+ "WithSubpackages_PACKAGE_LIST = 'WithSubpackagesC.WithSubpackagesB.WithSubpackagesA.SimpleCxx'"
+ "WithSubpackages_TPL_LIST = 'HeaderOnlyTpl'"
+ ALWAYS_FAIL_ON_NONZERO_RETURN
+
+ TEST_6 CMND make ARGS ${MAKE_PARALLEL_ARG} package_source
+ MESSAGE "Create the tarball"
+ PASS_REGULAR_EXPRESSION_ALL
+ "Run CPack packaging tool for source..."
+ "CPack: - package: .*/ExamplesUnitTests/TriBITS_TribitsExampleProject_ALL_ST_NoFortran_Ninja_Makefiles/tribitsexproj-1.1-Source.tar.gz generated."
+ ALWAYS_FAIL_ON_NONZERO_RETURN
+ # Above should be 'make package_soruce' but the dummy makefiles don't
+ # support that yet!
+
TEST_7 CMND tar ARGS -xzf tribitsexproj-1.1-Source.tar.gz
MESSAGE "Untar the tarball"
+
TEST_8 CMND diff
ARGS -qr
${${PROJECT_NAME}_TRIBITS_DIR}/examples/TribitsExampleProject
@@ -568,6 +944,8 @@ TRIBITS_ADD_ADVANCED_TEST( TribitsExampleProject_ALL_ST_NoFortran
${REGEX_FOR_GITIGNORE}
"Only in .*/TribitsExampleProject/packages: mixed_lang"
"Only in .*/TribitsExampleProject/packages: wrap_external"
+ # NOTE: We don't check the the return code form diff because it will
+ # return nonzero if there are any differences
)
@@ -1898,14 +2276,18 @@ TRIBITS_ADD_ADVANCED_TEST( TribitsExampleProject_DisableWithSubpackagesB_EnableW
PASS_REGULAR_EXPRESSION_ALL
"Explicitly enabled SE packages on input .by user.: WithSubpackagesB 1"
"-- Setting TribitsExProj_ENABLE_WrapExternal=OFF because WrapExternal has a required library dependence on disabled package WithSubpackagesA"
- "Enabling all parent packages that have at least one subpackage enabled [.][.][.]"
+ "Enabling all optional intra-package enables _ENABLE_ that are not currently disabled if both sets of packages are enabled [.][.][.]"
+ "-- NOT setting WithSubpackagesB_ENABLE_MixedLang=ON since MixedLang is NOT enabled at this point!"
+ "Enabling the shell of non-enabled parent packages [(]mostly for show[)] that have at least one subpackage enabled [.][.][.]"
"-- Setting TribitsExProj_ENABLE_WithSubpackages=ON because TribitsExProj_ENABLE_WithSubpackagesB=ON"
"Final set of enabled packages: SimpleCxx WithSubpackages 2"
"Final set of enabled SE packages: SimpleCxx WithSubpackagesB WithSubpackages 3"
)
# NOTE: The above test is the *only* test that we have that checks that a
-# parent package is re-enabled if any of its subpackages are enabled!
+# parent package is enabled at the end if any of its subpackages are enabled!
+# This is also the only test that looks for the output that an optional
+# package enable is not set.
##################################
@@ -2483,6 +2865,35 @@ TRIBITS_ADD_ADVANCED_TEST( TribitsExampleProjectAddons
########################################################################
+TRIBITS_ADD_ADVANCED_TEST( TribitsExampleMetaProject_Empty
+ OVERALL_WORKING_DIRECTORY TEST_NAME
+ OVERALL_NUM_MPI_PROCS 1
+
+ TEST_0
+ MESSAGE "Configure TribitsExampleMetaProject with nothing in it"
+ CMND ${CMAKE_COMMAND}
+ ARGS
+ ${COMMON_ENV_ARGS_PASSTHROUGH}
+ -DTribitsExMetaProj_ENABLE_Fortran=OFF
+ -DTribitsExMetaProj_IGNORE_MISSING_EXTRA_REPOSITORIES=TRUE
+ ${${PROJECT_NAME}_TRIBITS_DIR}/examples/TribitsExampleMetaProject
+ PASS_REGULAR_EXPRESSION_ALL
+ "WARNING: Ignoring missing extra repo 'TribitsExampleProject' as requested since .*/TribitsExampleMetaProject/TribitsExampleProject does not exist"
+ "WARNING: Ignoring missing extra repo 'TribitsExampleProjectAddons' as requested since .*/TribitsExampleMetaProject/TribitsExampleProjectAddons does not exist"
+ "Final set of enabled SE packages: 0"
+ "Final set of non-enabled SE packages: 0"
+ "WARNING: There were no packages configured so no libraries or tests/examples will be built"
+ "Configuring done"
+ "Generating done"
+ ALWAYS_FAIL_ON_NONZERO_RETURN
+
+ )
+# NOTE: That above test is the only test that triggers an empty list that
+# tries to get reversed. This is a TriBITS project with no packages and no
+# TPLs. While not common, it is a starter sitiation that users will have so
+# it should be have smoothly.
+
+
TRIBITS_ADD_ADVANCED_TEST( TribitsExampleMetaProject
OVERALL_WORKING_DIRECTORY TEST_NAME
OVERALL_NUM_MPI_PROCS 1
diff --git a/test/core/ExamplesUnitTests/GetCompilerPassthroughArgs.cmake b/test/core/ExamplesUnitTests/GetCompilerPassthroughArgs.cmake
new file mode 100644
index 000000000..7509cb8ff
--- /dev/null
+++ b/test/core/ExamplesUnitTests/GetCompilerPassthroughArgs.cmake
@@ -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
+
+
+#
+# Gather up arguments to pass through to inner configures and builds of
+# example/test CMake and TriBITS projects.
+#
+
+SET(SERIAL_PASSTHROUGH_CONFIGURE_ARGS
+ -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
+ -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
+ )
+
+IF ({${PROJECT_NAME}_ENABLE_Fortran)
+ APPEND_SET(SERIAL_PASSTHROUGH_CONFIGURE_ARGS
+ -DCMAKE_Fortran_COMPILER=${CMAKE_Fortran_COMPILER} )
+ENDIF()
+
+SET(COMMON_ENV_ARGS_PASSTHROUGH
+ -DTPL_ENABLE_MPI=${TPL_ENABLE_MPI}
+ -DHeaderOnlyTpl_INCLUDE_DIRS=${${PROJECT_NAME}_TRIBITS_DIR}/examples/tpls/HeaderOnlyTpl
+ )
+
+IF (TPL_ENABLE_MPI)
+ APPEND_SET(COMMON_ENV_ARGS_PASSTHROUGH
+ -DMPI_C_COMPILER=${MPI_C_COMPILER}
+ -DMPI_CXX_COMPILER=${MPI_CXX_COMPILER}
+ -DMPI_Fortran_COMPILER=${MPI_Fortran_COMPILER}
+ -DMPI_EXEC=${MPI_EXEC}
+ -DMPI_EXEC_DEFAULT_NUMPROCS=${MPI_EXEC_DEFAULT_NUMPROCS}
+ -DMPI_EXEC_MAX_NUMPROCS=${MPI_EXEC_MAX_NUMPROCS}
+ -DMPI_EXEC_NUMPROCS_FLAG=${MPI_EXEC_NUMPROCS_FLAG}
+ -DMPI_EXEC_PRE_NUMPROCS_FLAGS=${MPI_EXEC_PRE_NUMPROCS_FLAGS}
+ -DMPI_EXEC_POST_NUMPROCS_FLAGS=${MPI_EXEC_POST_NUMPROCS_FLAGS}
+ )
+ SET(TEST_MPI_1_SUFFIX "_MPI_1")
+ELSE()
+ APPEND_SET(COMMON_ENV_ARGS_PASSTHROUGH
+ ${SERIAL_PASSTHROUGH_CONFIGURE_ARGS}
+ )
+ SET(TEST_MPI_1_SUFFIX "")
+ENDIF()
+
+IF (CMAKE_GENERATOR STREQUAL "Ninja")
+ SET(USING_GENERATOR_NINJA TRUE)
+ SET(GENERATOR_CONFIG_PASSTHORUGH_ARGS -GNinja)
+ SET(MAKE_PARALLEL_ARG NP=1)
+ELSE()
+ SET(USING_GENERATOR_NINJA FALSE)
+ SET(GENERATOR_CONFIG_PASSTHORUGH_ARGS)
+ SET(MAKE_PARALLEL_ARG -j1)
+ENDIF()
diff --git a/test/core/ProcessEnabledTpls/CMakeLists.txt b/test/core/ProcessEnabledTpls/CMakeLists.txt
index cc3ecb630..fea965862 100644
--- a/test/core/ProcessEnabledTpls/CMakeLists.txt
+++ b/test/core/ProcessEnabledTpls/CMakeLists.txt
@@ -39,7 +39,7 @@
-INCLUDE(ParseVariableArguments)
+INCLUDE(CMakeParseArguments)
SET(MOCK_PROJECT_NAME DummyProj)
@@ -54,13 +54,15 @@ SET(MOCK_PROJECT_NAME DummyProj)
FUNCTION(CREATE_PROCESS_ENABLED_TPLS_TEST_CASE TEST_NAME)
- PARSE_ARGUMENTS(
+ CMAKE_PARSE_ARGUMENTS(
#prefix
PARSE
- #lists
- "TPL_NAME;TPL_FINDMOD;INCLUDE_DIRS;LIBRARY_DIRS;PASS_REGULAR_EXPRESSION_ALL;EXTRA_ARGS;RC_INCLUDE_DIRS;RC_LIBRARY_DIRS;RC_PASS_REGULAR_EXPRESSION_ALL;RC_EXTRA_ARGS"
#options
"TPL_FIND_SHARED_LIBS;VERBOSE_DEBUG"
+ #one_value_keywords
+ ""
+ #multi_value_keywords
+ "TPL_NAME;TPL_FINDMOD;INCLUDE_DIRS;LIBRARY_DIRS;PASS_REGULAR_EXPRESSION_ALL;EXTRA_ARGS;RC_INCLUDE_DIRS;RC_LIBRARY_DIRS;RC_PASS_REGULAR_EXPRESSION_ALL;RC_EXTRA_ARGS"
${ARGN}
)
diff --git a/test/core/TestingFunctionMacro_UnitTests.cmake b/test/core/TestingFunctionMacro_UnitTests.cmake
index 49b187a32..524275bfc 100644
--- a/test/core/TestingFunctionMacro_UnitTests.cmake
+++ b/test/core/TestingFunctionMacro_UnitTests.cmake
@@ -434,6 +434,8 @@ FUNCTION(UNITEST_TRIBITS_ADD_TEST_BASIC)
# Needed by TRIBITS_ADD_TEST(...)
SET(PACKAGE_NAME PackageA)
+ SET(PARENT_PACKAGE_NAME PackageA)
+ SET(${PACKAGE_NAME}_ENABLE_TESTS ON)
# Used locally
SET(EXEN SomeExec)
@@ -780,6 +782,19 @@ FUNCTION(UNITEST_TRIBITS_ADD_TEST_BASIC)
"${PACKEXEN};/some/abs/path/${PACKEXEN}.exe;arg1"
)
+ MESSAGE("Tests not enabled")
+ SET(${PACKAGE_NAME}_ENABLE_TESTS OFF)
+ TRIBITS_ADD_TEST( ${EXEN} ADDED_TESTS_NAMES_OUT ${EXEN}_TEST_NAMES )
+ UNITTEST_COMPARE_CONST(
+ MESSAGE_WRAPPER_INPUT
+ "-- PackageA_SomeExec: NOT added test because PackageA_ENABLE_TESTS='OFF'."
+ )
+ UNITTEST_COMPARE_CONST(
+ TRIBITS_ADD_TEST_ADD_TEST_INPUT
+ ""
+ )
+ UNITTEST_COMPARE_CONST( ${EXEN}_TEST_NAMES "" )
+
ENDFUNCTION()
@@ -791,6 +806,7 @@ FUNCTION(UNITEST_TRIBITS_ADD_TEST_DISABLE)
# Needed by TRIBITS_ADD_TEST(...)
SET(PACKAGE_NAME PackageA)
+ SET(${PACKAGE_NAME}_ENABLE_TESTS ON)
# Used locally
SET(EXEN SomeExec)
@@ -915,6 +931,7 @@ FUNCTION(UNITEST_TRIBITS_ADD_TEST_CATEGORIES)
# Needed by TRIBITS_ADD_TEST(...)
SET(PACKAGE_NAME PackageA)
+ SET(${PACKAGE_NAME}_ENABLE_TESTS ON)
SET(${PROJECT_NAME}_TEST_CATEGORIES "")
@@ -1065,6 +1082,7 @@ FUNCTION(UNITEST_TRIBITS_ADD_TEST_COMM)
# Needed by TRIBITS_ADD_TEST(...)
SET(PACKAGE_NAME PackageB)
+ SET(${PACKAGE_NAME}_ENABLE_TESTS ON)
# Doing default serial mode
@@ -1381,6 +1399,7 @@ FUNCTION(UNITEST_TRIBITS_ADD_TEST_PROPERTIES)
# Needed by TRIBITS_ADD_TEST(...)
SET(PACKAGE_NAME PackageA)
+ SET(${PACKAGE_NAME}_ENABLE_TESTS ON)
# Used locally
SET(EXEN SomeExec)
@@ -1485,6 +1504,8 @@ FUNCTION(UNITEST_TRIBITS_ADD_ADVANCED_TEST_BASIC)
# Needed by TRIBITS_ADD_ADVANCED_TEST(...)
SET(PACKAGE_NAME PackageA)
+ SET(PARENT_PACKAGE_NAME PackageA)
+ SET(${PACKAGE_NAME}_ENABLE_TESTS ON)
# Used locally
SET(EXEN SomeExec)
@@ -1675,6 +1696,29 @@ FUNCTION(UNITEST_TRIBITS_ADD_ADVANCED_TEST_BASIC)
# ToDo: Add 6 more tests testing XHOST, HOSTTYPE, and XHOSTTYPE
+ MESSAGE("***\n*** Tests not enabled\n***")
+ SET(MESSAGE_WRAPPER_UNIT_TEST_MODE TRUE)
+ SET(${PROJECT_NAME}_TRACE_ADD_TEST ON)
+ SET(${PACKAGE_NAME}_ENABLE_TESTS OFF)
+ TRIBITS_ADD_ADVANCED_TEST_UNITTEST_RESET()
+ TRIBITS_ADD_ADVANCED_TEST( TAAT_tests_disabled
+ TEST_0 CMND ${CMNDN}
+ ADDED_TEST_NAME_OUT TAAT_tests_disabled_TEST_NAME
+ )
+ UNITTEST_COMPARE_CONST(
+ MESSAGE_WRAPPER_INPUT
+ "-- PackageA_TAAT_tests_disabled: NOT added test because PackageA_ENABLE_TESTS='OFF'."
+ )
+ UNITTEST_COMPARE_CONST(TAAT_tests_disabled_TEST_NAME "")
+ UNITTEST_COMPARE_CONST(
+ TRIBITS_ADD_ADVANCED_TEST_CMND_ARRAY_0
+ ""
+ )
+ UNITTEST_COMPARE_CONST(
+ TRIBITS_ADD_ADVANCED_TEST_NUM_CMNDS
+ ""
+ )
+
ENDFUNCTION()
@@ -1686,6 +1730,7 @@ FUNCTION(UNITEST_TRIBITS_ADD_ADVANCED_TEST_CATEGORIES)
# Needed by TRIBITS_ADD_TEST(...)
SET(PACKAGE_NAME PackageA)
+ SET(${PACKAGE_NAME}_ENABLE_TESTS ON)
SET(${PROJECT_NAME}_TEST_CATEGORIES "")
@@ -2148,6 +2193,7 @@ FUNCTION(UNITEST_TRIBITS_ADD_ADVANCED_TEST_COMM)
# Needed by TRIBITS_ADD_ADVANCED_TEST(...)
SET(PACKAGE_NAME PackageA)
+ SET(${PACKAGE_NAME}_ENABLE_TESTS ON)
# Used locally
SET(EXEN SomeExec)
@@ -2242,6 +2288,7 @@ FUNCTION(UNITEST_TRIBITS_ADD_ADVANCED_TEST_NUM_MPI_PROCS)
# Needed by TRIBITS_ADD_ADVANCED_TEST(...)
SET(PACKAGE_NAME PackageA)
+ SET(${PACKAGE_NAME}_ENABLE_TESTS ON)
# Used locally
SET(EXEN SomeExec)
@@ -2523,6 +2570,7 @@ FUNCTION(UNITEST_TRIBITS_ADD_ADVANCED_TEST_DIRECTROY)
# Needed by TRIBITS_ADD_TEST(...)
SET(PACKAGE_NAME PackageA)
+ SET(${PACKAGE_NAME}_ENABLE_TESTS ON)
SET(TRIBITS_ADD_ADVANCED_TEST_SKIP_SCRIPT FALSE)
@@ -2605,6 +2653,7 @@ FUNCTION(UNITEST_TRIBITS_ADD_ADVANCED_TEST_PROPERTIES)
# Needed by TRIBITS_ADD_ADVANCED_TEST(...)
SET(PACKAGE_NAME PackageA)
+ SET(${PACKAGE_NAME}_ENABLE_TESTS ON)
# Used locally
SET(EXEN SomeExec)
@@ -2668,6 +2717,7 @@ FUNCTION(UNITEST_TRIBITS_ADD_ADVANCED_TEST_EXCLUDES)
# Needed by TRIBITS_ADD_TEST(...)
SET(PACKAGE_NAME PackageA)
+ SET(${PACKAGE_NAME}_ENABLE_TESTS ON)
# Turn on tracing for the rest of the tests!
SET(${PROJECT_NAME}_TRACE_ADD_TEST ON)
@@ -2753,6 +2803,9 @@ FUNCTION(UNITEST_TRIBITS_ADD_EXECUTABLE_AND_TEST)
MESSAGE("*** Test passing basic arguments to TRIBITS_ADD_EXECUTABLE_AND_TEST( ... )")
MESSAGE("***\n")
+ SET(PACKAGE_NAME PackageA)
+ SET(${PACKAGE_NAME}_ENABLE_TESTS ON)
+
TRIBITS_ADD_EXECUTABLE_AND_TEST(
execName
SOURCES src1 src2
@@ -2821,6 +2874,8 @@ FUNCTION(UNITTEST_TRIBITS_ETI_TYPE_EXPANSION)
MESSAGE("*** Test passing invalid arguments to TRIBITS_ETI_TYPE_EXPANSION( ... )\n")
+ SET(result "This is left over from other module!") # See #199
+
UNSET(expansion)
TRIBITS_ETI_TYPE_EXPANSION(expansion "badformat")
UNITTEST_COMPARE_CONST(
@@ -3245,4 +3300,4 @@ MESSAGE("*** Determine final result of all unit tests")
MESSAGE("***\n")
# Pass in the number of expected tests that must pass!
-UNITTEST_FINAL_RESULT(492)
+UNITTEST_FINAL_RESULT(499)
diff --git a/test/core/TribitsAdjustPackageEnables_UnitTests.cmake b/test/core/TribitsAdjustPackageEnables_UnitTests.cmake
index 110b1b953..e09445a16 100644
--- a/test/core/TribitsAdjustPackageEnables_UnitTests.cmake
+++ b/test/core/TribitsAdjustPackageEnables_UnitTests.cmake
@@ -590,7 +590,8 @@ FUNCTION(UNITTEST_EXTRA_REPO_MISSING_OPTIONAL_PACKAGE_VERBOSE)
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_PACKAGES
"Teuchos;RTOp;Ex2Package1;Ex2Package2")
UNITTEST_COMPARE_CONST(${PROJECT_NAME}_ENABLE_Ex2Package1 "")
-
+ UNITTEST_COMPARE_CONST(${PROJECT_NAME}_ENABLE_MissingUpstreamPackage "OFF")
+ UNITTEST_COMPARE_CONST(Ex2Package1_ENABLE_MissingUpstreamPackage "OFF")
ENDFUNCTION()
@@ -618,6 +619,8 @@ FUNCTION(UNITTEST_EXTRA_REPO_MISSING_REQUIRED_PACKAGE)
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_PACKAGES
"Teuchos;RTOp;Ex2Package1;Ex2Package2")
UNITTEST_COMPARE_CONST(${PROJECT_NAME}_ENABLE_Ex2Package1 OFF)
+ UNITTEST_COMPARE_CONST(${PROJECT_NAME}_ENABLE_MissingUpstreamPackage "OFF")
+ UNITTEST_COMPARE_CONST(Ex2Package1_ENABLE_MissingUpstreamPackage "OFF")
ENDFUNCTION()
@@ -648,6 +651,8 @@ FUNCTION(UNITTEST_EXTRA_REPO_MISSING_REQUIRED_PACKAGE_VERBOSE)
UNITTEST_COMPARE_CONST( ${PROJECT_NAME}_PACKAGES
"Teuchos;RTOp;Ex2Package1;Ex2Package2")
UNITTEST_COMPARE_CONST(${PROJECT_NAME}_ENABLE_Ex2Package1 OFF)
+ UNITTEST_COMPARE_CONST(${PROJECT_NAME}_ENABLE_MissingUpstreamPackage "OFF")
+ UNITTEST_COMPARE_CONST(Ex2Package1_ENABLE_MissingUpstreamPackage "OFF")
ENDFUNCTION()
@@ -876,9 +881,6 @@ FUNCTION(UNITTEST_ENABLE_ALL_PACKAGES)
UNITTEST_COMPARE_CONST(${PROJECT_NAME}_ENABLE_Ex2Package1 ON)
UNITTEST_COMPARE_CONST(${PROJECT_NAME}_ENABLE_Ex2Package2 "")
- # Test deprecated setting of false
- UNITTEST_COMPARE_CONST(${PROJECT_NAME}_ENABLE_SECONDARY_STABLE_CODE OFF)
-
ENDFUNCTION()
@@ -1121,4 +1123,4 @@ UNITTEST_ENABLE_TRIBITS_IS_PRIMARY_META_PROJECT_PACKAGE_ENABLE_Teuchos_FORWARD()
UNITTEST_ENABLE_TRIBITS_IS_PRIMARY_META_PROJECT_PACKAGE_ENABLE_Teuchos_Tests_RTOp_FORWARD()
# Pass in the number of expected tests that must pass!
-UNITTEST_FINAL_RESULT(198)
\ No newline at end of file
+UNITTEST_FINAL_RESULT(203)
\ No newline at end of file
diff --git a/test/ctest_driver/CMakeLists.txt b/test/ctest_driver/CMakeLists.txt
index 38d6852e9..e66ccdac7 100644
--- a/test/ctest_driver/CMakeLists.txt
+++ b/test/ctest_driver/CMakeLists.txt
@@ -1,824 +1,12 @@
-# @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
-
-
-
-INCLUDE(ParseVariableArguments)
-INCLUDE(AdvancedSet)
-
-
-ADVANCED_SET(Trilinos_CTEST_COMMAND ctest CACHE STRING
- "CTest executable used to drive unit tests")
-
-# The mock test project
-SET(MOCK_PROJECT_NAME Trilinos)
-
-SET(TRIBITS_MOCK_TRILINOS_DIR "examples/MockTrilinos")
-
-SET(MOCK_TRILINOS_DIR ${${PROJECT_NAME}_TRIBITS_DIR}/${TRIBITS_MOCK_TRILINOS_DIR})
-
-
-FUNCTION(CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE TEST_NAME)
-
- #MESSAGE("CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE: ${TEST_CASE} ${ARGN}")
-
- PARSE_ARGUMENTS(
- #prefix
- PARSE
- #lists
- "COPY_FILES;ARGS;PASS_REGULAR_EXPRESSION_ALL;COMPARE_DEPS_FILE"
- #options
- "SKIP_STANDARD_DEPS_CHECK"
- ${ARGN}
- )
-
- SET(TEST_CORE_NAME CTestDriver_${TEST_NAME})
- SET(TEST_FULL_NAME ${PACKAGE_NAME}_${TEST_CORE_NAME})
-
- SET(TEST_BLOCKS "")
- SET(TEST_IDX 0)
-
- IF (PARSE_COPY_FILES)
-
- LIST(LENGTH PARSE_COPY_FILES COPY_FILES_LEN)
- MATH(EXPR NUM_FILE_COPIES "${COPY_FILES_LEN}/2")
- MATH(EXPR COPY_FILES_LAST_IDX "${NUM_FILE_COPIES}-1")
-
- SET(NUM_COPY_FILE_ARGS 2)
- SET(FILE_FROM_OFFSET 0)
- SET(FILE_TO_OFFSET 1)
-
- FOREACH(COPY_FILE_IDX RANGE ${COPY_FILES_LAST_IDX})
-
- # FILE_FROM
- MATH(EXPR FILE_FROM_IDX "${COPY_FILE_IDX}*${NUM_COPY_FILE_ARGS}+${FILE_FROM_OFFSET}")
- LIST(GET PARSE_COPY_FILES ${FILE_FROM_IDX} FILE_FROM )
- #PRINT_VAR(FILE_FROM)
-
- # FILE_TO
- MATH(EXPR FILE_TO_IDX "${COPY_FILE_IDX}*${NUM_COPY_FILE_ARGS}+${FILE_TO_OFFSET}")
- LIST(GET PARSE_COPY_FILES ${FILE_TO_IDX} FILE_TO )
- #PRINT_VAR(FILE_TO)
-
- SET(TEST_BLOCKS ${TEST_BLOCKS}
- TEST_${TEST_IDX} CMND ${CMAKE_COMMAND}
- ARGS -E copy ${FILE_FROM} ${CMAKE_CURRENT_BINARY_DIR}/${TEST_FULL_NAME}/${FILE_TO}
- )
-
- MATH(EXPR TEST_IDX "${TEST_IDX}+1")
-
- ENDFOREACH()
-
- ENDIF()
-
- SET(TEST_BLOCKS ${TEST_BLOCKS}
- TEST_${TEST_IDX} CMND env
- ARGS
- ${MOCK_PROJECT_NAME}_TRIBITS_DIR=${${PROJECT_NAME}_TRIBITS_DIR}
- CTEST_DEPENDENCY_HANDLING_UNIT_TESTING=ON
- ${MOCK_PROJECT_NAME}_CTEST_COMMAND=${CMAKE_CTEST_COMMAND}
- ${MOCK_PROJECT_NAME}_PACKAGES= # Set back to default
- CTEST_EXPLICITLY_ENABLE_IMPLICITLY_ENABLED_PACKAGES= # Set back to default
- CTEST_ENABLE_MODIFIED_PACKAGES_ONLY=OFF # Set back to default
- ${MOCK_PROJECT_NAME}_PRE_REPOSITORIES= # Set back to default
- ${MOCK_PROJECT_NAME}_EXTRA_REPOSITORIES= # Set back to default
- CTEST_DO_UPDATES=ON # Set back to default
- CTEST_DASHBOARD_ROOT= # Must be empty
- CTEST_DO_SUBMIT=OFF # Must be off
- CTEST_START_WITH_EMPTY_BINARY_DIRECTORY=OFF # Must be off!
- ${PARSE_ARGS}
- ${CMAKE_CTEST_COMMAND} -S ${CMAKE_CURRENT_SOURCE_DIR}/unit_test_driver.cmake
- PASS_REGULAR_EXPRESSION_ALL ${PARSE_PASS_REGULAR_EXPRESSION_ALL}
- )
-
- MATH(EXPR TEST_IDX "${TEST_IDX}+1")
-
- IF (PARSE_COMPARE_DEPS_FILE)
- SET(TEST_BLOCKS ${TEST_BLOCKS}
- TEST_${TEST_IDX} CMND ${CMAKE_COMMAND}
- ARGS -E compare_files
- "${PARSE_COMPARE_DEPS_FILE}"
- "${CMAKE_CURRENT_BINARY_DIR}/${TEST_FULL_NAME}/TrilinosPackageDependencies.xml"
- )
- ENDIF()
-
- TRIBITS_ADD_ADVANCED_TEST( ${TEST_CORE_NAME}
- OVERALL_WORKING_DIRECTORY TEST_NAME
- ${TEST_BLOCKS}
- OVERALL_NUM_MPI_PROCS 1
- )
-
-ENDFUNCTION()
-
-
-#
-# Test package enables/disables
-#
-
-
-CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE(
- EnableAllDefault
- PASS_REGULAR_EXPRESSION_ALL
- "Enabling all SE packages that are not currently disabled because of Trilinos_ENABLE_ALL_PACKAGES=ON"
- "Final set of enabled packages: TrilinosFramework Teuchos RTOp Epetra Zoltan Shards Triutils Tpetra EpetraExt Thyra Isorropia AztecOO Galeri Amesos Intrepid Ifpack ML Stratimikos RBGen 19"
- "Final set of non-enabled packages: Stokhos Sacado Belos Phalanx Panzer 5"
- COMPARE_DEPS_FILE
- "${CMAKE_CURRENT_SOURCE_DIR}/TrilinosPackageDependencies.Trilinos.xml"
- )
-
-
-CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE(
- EnableAllSecondaryTested
- ARGS Trilinos_ENABLE_SECONDARY_TESTED_CODE=ON
- PASS_REGULAR_EXPRESSION_ALL
- "Enabling all SE packages that are not currently disabled because of Trilinos_ENABLE_ALL_PACKAGES=ON"
- "Final set of enabled packages: TrilinosFramework Teuchos RTOp Epetra Zoltan Shards Triutils Tpetra EpetraExt Sacado Thyra Isorropia AztecOO Galeri Amesos Intrepid Ifpack ML Belos Stratimikos RBGen Phalanx Panzer 23"
- "Final set of non-enabled packages: Stokhos 1"
- )
-
-
-# Test backward compatibility for ${PROJECT_NAME}_ENABLE_SECONDARY_STABLE_CODE
-CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE(
- EnableAllSecondaryStable
- ARGS Trilinos_ENABLE_SECONDARY_STABLE_CODE=ON
- PASS_REGULAR_EXPRESSION_ALL
- "WARNING: Set var Trilinos_ENABLE_SECONDARY_STABLE_CODE is deprecated! Use Trilinos_ENABLE_SECONDARY_TESTED_CODE instead!"
- "Enabling all SE packages that are not currently disabled because of Trilinos_ENABLE_ALL_PACKAGES=ON"
- "Final set of enabled packages: TrilinosFramework Teuchos RTOp Epetra Zoltan Shards Triutils Tpetra EpetraExt Sacado Thyra Isorropia AztecOO Galeri Amesos Intrepid Ifpack ML Belos Stratimikos RBGen Phalanx Panzer 23"
- "Final set of non-enabled packages: Stokhos 1"
- )
-
-
-CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE(
- EnableTeuchos
- ARGS Trilinos_PACKAGES=Teuchos Trilinos_ENABLE_KNOWN_EXTERNAL_REPOS_TYPE=Experimental
- PASS_REGULAR_EXPRESSION_ALL
- "Final set of enabled packages: Teuchos 1"
- "Final set of non-enabled packages: TrilinosFramework RTOp Epetra Zoltan Shards Triutils Tpetra EpetraExt Stokhos Sacado Thyra Isorropia AztecOO Galeri Amesos Intrepid Ifpack ML Belos Stratimikos RBGen Phalanx Panzer 23"
- "Processing current package Teuchos: libs='ON', tests='ON'"
- "CONFIGURE_OPTIONS = '-DTrilinos_TRIBITS_DIR=.+-DCTEST_USE_LAUNCHERS:BOOL=1.-DTrilinos_ENABLE_ALL_OPTIONAL_PACKAGES:BOOL=ON.-DTrilinos_ENABLE_TESTS:BOOL=ON.-DTrilinos_WARNINGS_AS_ERRORS_FLAGS:STRING=-DummyErrFlags.-DTrilinos_ALLOW_NO_PACKAGES:BOOL=ON.-DTrilinos_DISABLE_ENABLED_FORWARD_DEP_PACKAGES=ON.-DTrilinos_EXTRAREPOS_FILE:STRING=.*/MockTrilinos/cmake.ExtraRepositoriesList.cmake.-DTrilinos_IGNORE_MISSING_EXTRA_REPOSITORIES:BOOL=ON.-DTrilinos_ENABLE_KNOWN_EXTERNAL_REPOS_TYPE:STRING=Experimental.-DTrilinos_ENABLE_Teuchos:BOOL=ON'"
- )
-# NOTE: The above test pins down the form of the configure options passed to
-# different package configures to make sure everything in there.
-
-
-CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE(
- EnableRTOp_DisableTeuchos
- ARGS Trilinos_PACKAGES=RTOp Trilinos_EXCLUDE_PACKAGES=Teuchos
- PASS_REGULAR_EXPRESSION_ALL
- "Explicitly enabled packages on input .by user.: RTOp 1"
- "WARNING: Setting Trilinos_ENABLE_RTOp=OFF which was 'ON' because RTOp has a required library dependence on disabled package Teuchos but Trilinos_DISABLE_ENABLED_FORWARD_DEP_PACKAGES=ON!"
- "Final set of enabled packages: 0"
- "Trilinos_NUM_ENABLED_PACKAGES=0: Exiting the script!"
- )
-# NOTE: The above test ensures that disabled packages turn off explicitly
-# enabled downstream packages.
-
-
-CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE(
- EnableTeuchosRTOp_DisableRTOp
- ARGS Trilinos_PACKAGES="Teuchos,RTOp" Trilinos_EXCLUDE_PACKAGES=RTOp
- PASS_REGULAR_EXPRESSION_ALL
- "Disabling excluded package RTOp ..."
- "Enabling explicitly set package Teuchos ..."
- "NOT enabling explicitly set package RTOp since it was explicitly excluded"
- "Explicitly enabled packages on input .by user.: Teuchos 1"
- "Final set of enabled packages: Teuchos 1"
- "Trilinos_NUM_ENABLED_PACKAGES=1: Configuring packages!"
- )
-# NOTE: The above test ensures that disabled packages turn off explicitly
-# enabled downstream packages.
-
-
-CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE(
- EnableTeuchos_DisableTPLBLAS
- ARGS Trilinos_PACKAGES=Teuchos Trilinos_EXCLUDE_TPLS=BLAS
- PASS_REGULAR_EXPRESSION_ALL
- "Explicitly enabled packages on input .by user.: Teuchos 1"
- "Explicitly disabled TPLs on input .by user or by default.: BLAS 1"
- "WARNING: Setting Trilinos_ENABLE_Teuchos=OFF which was 'ON' because Teuchos has a required library dependence on disabled TPL BLAS but Trilinos_DISABLE_ENABLED_FORWARD_DEP_PACKAGES=ON!"
- "Final set of enabled packages: 0"
- "Trilinos_NUM_ENABLED_PACKAGES=0: Exiting the script!"
- )
-# NOTE: The above test ensures that disabled TPLS turn off explicitly
-# enabled downstream packages.
-
-
-CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE(
- EnableThyra
- ARGS Trilinos_PACKAGES=Thyra Trilinos_ENABLE_KNOWN_EXTERNAL_REPOS_TYPE=Experimental
- PASS_REGULAR_EXPRESSION_ALL
- "Final set of enabled packages: Teuchos RTOp Epetra Zoltan Triutils Tpetra EpetraExt Thyra 8"
- "Final set of non-enabled packages: TrilinosFramework Shards Stokhos Sacado Isorropia AztecOO Galeri Amesos Intrepid Ifpack ML Belos Stratimikos RBGen Phalanx Panzer 16"
- "Processing current package Teuchos: libs='ON', tests=''"
- "CONFIGURE_OPTIONS = '-DTrilinos_TRIBITS_DIR=.+-DCTEST_USE_LAUNCHERS:BOOL=1.-DTrilinos_ENABLE_ALL_OPTIONAL_PACKAGES:BOOL=ON.-DTrilinos_ENABLE_TESTS:BOOL=.-DTrilinos_WARNINGS_AS_ERRORS_FLAGS:STRING=-DummyErrFlags.-DTrilinos_ALLOW_NO_PACKAGES:BOOL=ON.-DTrilinos_DISABLE_ENABLED_FORWARD_DEP_PACKAGES=ON.-DTrilinos_EXTRAREPOS_FILE:STRING=.+/examples/MockTrilinos/cmake/ExtraRepositoriesList.cmake.-DTrilinos_IGNORE_MISSING_EXTRA_REPOSITORIES:BOOL=ON.-DTrilinos_ENABLE_KNOWN_EXTERNAL_REPOS_TYPE:STRING=Experimental.-DTrilinos_ENABLE_Teuchos:BOOL=ON'"
- "Processing current package Epetra: libs='ON', tests=''"
- "Processing current package Thyra: libs='ON', tests='ON'"
- "CONFIGURE_OPTIONS = '-DTrilinos_TRIBITS_DIR=.+-DCTEST_USE_LAUNCHERS:BOOL=1.-DTrilinos_ENABLE_ALL_OPTIONAL_PACKAGES:BOOL=ON.-DTrilinos_ENABLE_TESTS:BOOL=ON.-DTrilinos_WARNINGS_AS_ERRORS_FLAGS:STRING=-DummyErrFlags.-DTrilinos_ALLOW_NO_PACKAGES:BOOL=ON.-DTrilinos_DISABLE_ENABLED_FORWARD_DEP_PACKAGES=ON.-DTrilinos_EXTRAREPOS_FILE:STRING=.+/examples/MockTrilinos/cmake/ExtraRepositoriesList.cmake.-DTrilinos_IGNORE_MISSING_EXTRA_REPOSITORIES:BOOL=ON.-DTrilinos_ENABLE_KNOWN_EXTERNAL_REPOS_TYPE:STRING=Experimental.-DTrilinos_ENABLE_EpetraExt:BOOL=.-DTrilinos_ENABLE_Thyra:BOOL=ON'"
- )
-# NOTE: The above test pins down the form of the configure options passed to
-# different package configures to make sure everything in there.
-
-
-CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE(
- EnableEpetraThyra_NoProcessImplicitlyEnabled
- ARGS Trilinos_PACKAGES=Epetra,Thyra
- CTEST_EXPLICITLY_ENABLE_IMPLICITLY_ENABLED_PACKAGES=OFF
- PASS_REGULAR_EXPRESSION_ALL
- "Final set of enabled packages: Teuchos RTOp Epetra Zoltan Triutils Tpetra EpetraExt Thyra 8"
- "Final set of packages to be explicitly processed by CTest/CDash: Epetra Thyra 2"
- "0. Processing current package Epetra: libs=.ON., tests=.ON."
- "1. Processing current package Thyra: libs=.ON., tests=.ON."
- )
-# NOTE: The above test shows that ony
-
-
-CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE(
- EnableThyra_ExcludeEpetra
- ARGS Trilinos_PACKAGES=Thyra Trilinos_EXCLUDE_PACKAGES=Epetra
- PASS_REGULAR_EXPRESSION_ALL
- "Explicitly enabled packages on input .* Thyra 1"
- "Explicitly disabled packages on input .* Epetra Stokhos 2"
- "Final set of enabled packages: Teuchos RTOp Tpetra Thyra 4"
- "Final set of non-enabled packages: TrilinosFramework Epetra Zoltan Shards Triutils EpetraExt Stokhos Sacado Isorropia AztecOO Galeri Amesos Intrepid Ifpack ML Belos Stratimikos RBGen Phalanx Panzer 20"
- "Processing current package Teuchos: libs='ON', tests=''"
- "Processing current package Thyra: libs='ON', tests='ON'"
- )
-
-
-CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE(
- EnableAll_EnablePhalanx
- ARGS Trilinos_ADDITIONAL_PACKAGES=Phalanx
- PASS_REGULAR_EXPRESSION_ALL
- "Enabling explicitly set package Phalanx"
- "Explicitly enabled packages on input .* Phalanx 1"
- "Explicitly disabled packages on input .* Stokhos 1"
- "Enabling all SE packages that are not currently disabled because of Trilinos_ENABLE_ALL_PACKAGES=ON"
- "Final set of enabled packages: TrilinosFramework Teuchos RTOp Epetra Zoltan Shards Triutils Tpetra EpetraExt Sacado Thyra Isorropia AztecOO Galeri Amesos Intrepid Ifpack ML Stratimikos RBGen Phalanx 21"
- "Final set of non-enabled packages: Stokhos Belos Panzer 3"
- "Processing current package RBGen: libs='ON', tests='ON'"
- "Processing current package Phalanx: libs='ON', tests='ON'"
- )
-
-
-CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE(
- EnableAll_EnableStokhos
- ARGS Trilinos_ADDITIONAL_PACKAGES=Stokhos
- PASS_REGULAR_EXPRESSION_ALL
- "Enabling explicitly set package Stokhos which was default or otherwise disabed!"
- "Explicitly enabled packages on input .* Stokhos 1"
- "Explicitly disabled packages on input .* 0"
- "Enabling all SE packages that are not currently disabled because of Trilinos_ENABLE_ALL_PACKAGES=ON"
- "Final set of enabled packages: TrilinosFramework Teuchos RTOp Epetra Zoltan Shards Triutils Tpetra EpetraExt Stokhos Thyra Isorropia AztecOO Galeri Amesos Intrepid Ifpack ML Stratimikos RBGen 20"
- "Final set of non-enabled packages: Sacado Belos Phalanx Panzer 4"
- "Processing current package Stokhos: libs='ON', tests='ON'"
- "Processing current package RBGen: libs='ON', tests='ON'"
- )
-
-
-CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE(
- EnableAllSecondaryTested_EnableStokhos
- ARGS Trilinos_ENABLE_SECONDARY_TESTED_CODE=ON Trilinos_ADDITIONAL_PACKAGES=Stokhos
- PASS_REGULAR_EXPRESSION_ALL
- "Enabling explicitly set package Stokhos"
- "Explicitly enabled packages on input .* Stokhos 1"
- "Explicitly disabled packages on input .* 0"
- "Enabling all SE packages that are not currently disabled because of Trilinos_ENABLE_ALL_PACKAGES=ON"
- "Final set of enabled packages: TrilinosFramework Teuchos RTOp Epetra Zoltan Shards Triutils Tpetra EpetraExt Stokhos Sacado Thyra Isorropia AztecOO Galeri Amesos Intrepid Ifpack ML Belos Stratimikos RBGen Phalanx Panzer 24"
- "Final set of non-enabled packages: 0"
- "Processing current package Stokhos: libs='ON', tests='ON'"
- "Processing current package RBGen: libs='ON', tests='ON'"
- "Processing current package Phalanx: libs='ON', tests='ON'"
- )
-
-
-CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE(
- CI_EnableAllSecondaryTested
- ARGS Trilinos_ENABLE_SECONDARY_TESTED_CODE=ON Trilinos_ENABLE_KNOWN_EXTERNAL_REPOS_TYPE=Continuous
- PASS_REGULAR_EXPRESSION_ALL
- "EXECUTE_PROCESS.+git.+preCopyrightTrilinos.+preCopyrightTrilinos.fetch.out"
- "Explicitly enabled packages on input .* 0"
- "Explicitly disabled packages on input .* Stokhos Stalix 2"
- "Enabling all SE packages that are not currently disabled because of Trilinos_ENABLE_ALL_PACKAGES=ON"
- "Final set of enabled packages: TrilinosFramework Teuchos RTOp Epetra Zoltan Shards Triutils Tpetra EpetraExt Sacado Thyra Isorropia AztecOO Galeri Amesos Intrepid Ifpack ML Belos Stratimikos RBGen Phalanx Panzer Teko 24"
- "Final set of packages to be explicitly processed by CTest/CDash: TrilinosFramework Teuchos RTOp Epetra Zoltan Shards Triutils Tpetra EpetraExt Sacado Thyra Isorropia AztecOO Galeri Amesos Intrepid Ifpack ML Belos Stratimikos RBGen Phalanx Panzer Teko 24"
- "Final set of non-enabled packages: Stokhos Stalix 2"
- "CONFIGURE_OPTIONS.+-DTrilinos_ENABLE_KNOWN_EXTERNAL_REPOS_TYPE:STRING=Continuous.+"
- "Processing current package Teuchos: libs='ON', tests='ON'"
- "CONFIGURE_OPTIONS.+Trilinos_ENABLE_Teuchos:BOOL=ON"
- "Processing current package Phalanx: libs='ON', tests='ON'"
- COMPARE_DEPS_FILE
- "${CMAKE_CURRENT_SOURCE_DIR}/TrilinosPackageDependencies.Continuos.xml"
- )
-
-
-# Check with an extra repo enabled and assert all of the internal logic
-CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE(
- CI_EnableAllSecondaryTested_EnableStalix
- ARGS Trilinos_ENABLE_SECONDARY_TESTED_CODE=ON Trilinos_ENABLE_KNOWN_EXTERNAL_REPOS_TYPE=Continuous
- Trilinos_ADDITIONAL_PACKAGES=Stalix
- PASS_REGULAR_EXPRESSION_ALL
- "Explicitly enabled packages on input .* Stalix 1"
- "Explicitly disabled packages on input .* Stokhos 1"
- "Enabling all SE packages that are not currently disabled because of Trilinos_ENABLE_ALL_PACKAGES=ON"
- "Final set of enabled packages: TrilinosFramework Teuchos RTOp Epetra Zoltan Shards Triutils Tpetra EpetraExt Sacado Thyra Isorropia AztecOO Galeri Amesos Intrepid Ifpack ML Belos Stratimikos RBGen Phalanx Panzer Teko Stalix 25"
- "Final set of non-enabled packages: Stokhos 1"
- "Processing current package Phalanx: libs='ON', tests='ON'"
- "Processing current package Stalix: libs='ON', tests='ON'"
- )
-
-
-# Check repo operations for an update
-CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE(
- CI_TestGitUpdateCommands
- ARGS Trilinos_ENABLE_SECONDARY_TESTED_CODE=ON Trilinos_ENABLE_KNOWN_EXTERNAL_REPOS_TYPE=Continuous
- Trilinos_ADDITIONAL_PACKAGES=Stalix
- PASS_REGULAR_EXPRESSION_ALL
- "preCopyrightTrilinos: Doing GIT update from URL 'url1:/git/preCopyrightTrilinos' to dir '.*/MockTrilinos/preCopyrightTrilinos'"
- "EXECUTE_PROCESS.COMMAND./somebasedir/git[;]clean[;]-fdx[;]WORKING_DIRECTORY[;].*/MockTrilinos/preCopyrightTrilinos.OUTPUT_FILE[;].*/test/ctest_driver/TriBITS_CTestDriver_CI_TestGitUpdateCommands/preCopyrightTrilinos.clean.out."
- "EXECUTE_PROCESS.COMMAND./somebasedir/git[;]reset[;]--hard[;]HEAD[;]WORKING_DIRECTORY[;].*/MockTrilinos/preCopyrightTrilinos.OUTPUT_FILE[;].*/test/ctest_driver/TriBITS_CTestDriver_CI_TestGitUpdateCommands/preCopyrightTrilinos.reset.out."
- "EXECUTE_PROCESS.COMMAND./somebasedir/git[;]fetch[;]origin[;]TIMEOUT[;]600[;]WORKING_DIRECTORY[;].*/MockTrilinos/preCopyrightTrilinos.OUTPUT_FILE[;].*/test/ctest_driver/TriBITS_CTestDriver_CI_TestGitUpdateCommands/preCopyrightTrilinos.fetch.out."
- "EXECUTE_PROCESS.COMMAND./somebasedir/git[;]reset[;]--hard[;]tracking/branch[;]WORKING_DIRECTORY[;].*/MockTrilinos/preCopyrightTrilinos.OUTPUT_FILE[;].*/test/ctest_driver/TriBITS_CTestDriver_CI_TestGitUpdateCommands/preCopyrightTrilinos.set_branch.out."
- "Dakota: Doing initial GIT clone/checkout from URL 'url3:/git/Dakota' to dir 'packages/TriKota/Dakota' ..."
- "EXECUTE_PROCESS.COMMAND[;]/somebasedir/git[;]clone[;]url3:/git/Dakota[;]packages/TriKota/Dakota[;]WORKING_DIRECTORY[;].*/tribits/examples/MockTrilinos[;]OUTPUT_FILE[;].*/TriBITS_CTestDriver_CI_TestGitUpdateCommands/Dakota.clone.out"
- "EXECUTE_PROCESS.COMMAND[;]/somebasedir/git[;]clean[;]-fdx[;]WORKING_DIRECTORY[;].*/MockTrilinos/packages/TriKota/Dakota[;]OUTPUT_FILE[;].*/TriBITS_CTestDriver_CI_TestGitUpdateCommands/Dakota.clean.out"
- "EXECUTE_PROCESS.COMMAND[;]/somebasedir/git[;]reset[;]--hard[;]HEAD[;]WORKING_DIRECTORY[;].*/MockTrilinos/packages/TriKota/Dakota[;]OUTPUT_FILE[;].*/TriBITS_CTestDriver_CI_TestGitUpdateCommands/Dakota.reset.out"
- "EXECUTE_PROCESS.COMMAND[;]/somebasedir/git[;]fetch[;]origin[;]TIMEOUT[;]600[;]WORKING_DIRECTORY[;].*/MockTrilinos/packages/TriKota/Dakota[;]OUTPUT_FILE[;].*/TriBITS_CTestDriver_CI_TestGitUpdateCommands/Dakota.fetch.out"
- "EXECUTE_PROCESS.COMMAND[;]/somebasedir/git[;]reset[;]--hard[;]tracking/branch[;]WORKING_DIRECTORY[;].*/MockTrilinos/packages/TriKota/Dakota[;]OUTPUT_FILE[;].*/TriBITS_CTestDriver_CI_TestGitUpdateCommands/Dakota.set_branch.out"
- "Dakota: Doing initial GIT clone/checkout from URL 'url3:/git/Dakota' to dir 'packages/TriKota/Dakota' ..."
- "EXECUTE_PROCESS.COMMAND[;].*/python.*[;].*/python_utils/gitdist[;]--dist-no-color[;]log[;]--pretty=format.*[;]--name-status[;]-C[;]ORIG_HEAD..HEAD[;]WORKING_DIRECTORY[;].*/examples/MockTrilinos[;]OUTPUT_FILE[;].*/TriBITS_CTestDriver_CI_TestGitUpdateCommands/Updates.txt"
- "Adding POST extra Continuous repository preCopyrightTrilinos"
- "Adding POST extra Continuous repository Dakota"
- "Trilinos_NUM_PACKAGES='24'"
- "Trilinos_NUM_TPLS='19'"
- "Reading list of POST extra packages from .*/MockTrilinos/preCopyrightTrilinos/PackagesList.cmake"
- "Trilinos_NUM_PACKAGES='26'"
- "Trilinos_NUM_TPLS='20'"
- "Skipping reading packages and TPLs for POST extra repo Dakota because marked NOPACKAGES"
- )
-
-
-# Test repo operations for Trilinos_BRANCH=other-branch (#130)
-CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE(
- CI_TestGitUpdateCommands_Branch
- ARGS Trilinos_ENABLE_SECONDARY_TESTED_CODE=ON Trilinos_ENABLE_KNOWN_EXTERNAL_REPOS_TYPE=Continuous
- Trilinos_ADDITIONAL_PACKAGES=Stalix
- Trilinos_BRANCH=other-branch
- PASS_REGULAR_EXPRESSION_ALL
- "For base repo, doing switch to branch other-branch"
- "EXECUTE_PROCESS.COMMAND[;]/somebasedir/git[;]checkout[;]-B[;]other-branch[;]--track[;]origin/other-branch[;]WORKING_DIRECTORY[;].*/MockTrilinos[;]RESULT_VARIABLE[;]GIT_CHECKOUT_RETURN_VAL[;]OUTPUT_VARIABLE[;]BRANCH_OUTPUT[;]ERROR_VARIABLE[;]BRANCH_ERROR"
- "For extra repos, doing switch to branch other-branch"
- "preCopyrightTrilinos: Doing GIT update from URL 'url1:/git/preCopyrightTrilinos' to dir '.*/MockTrilinos/preCopyrightTrilinos'"
- "EXECUTE_PROCESS.COMMAND./somebasedir/git[;]clean[;]-fdx[;]WORKING_DIRECTORY[;].*/MockTrilinos/preCopyrightTrilinos.OUTPUT_FILE[;].*/test/ctest_driver/TriBITS_CTestDriver_CI_TestGitUpdateCommands_Branch/preCopyrightTrilinos.clean.out."
- "EXECUTE_PROCESS.COMMAND./somebasedir/git[;]reset[;]--hard[;]HEAD[;]WORKING_DIRECTORY[;].*/MockTrilinos/preCopyrightTrilinos.OUTPUT_FILE[;].*/test/ctest_driver/TriBITS_CTestDriver_CI_TestGitUpdateCommands_Branch/preCopyrightTrilinos.reset.out."
- "EXECUTE_PROCESS.COMMAND./somebasedir/git[;]fetch[;]origin[;]TIMEOUT[;]600[;]WORKING_DIRECTORY[;].*/MockTrilinos/preCopyrightTrilinos.OUTPUT_FILE[;].*/test/ctest_driver/TriBITS_CTestDriver_CI_TestGitUpdateCommands_Branch/preCopyrightTrilinos.fetch.out."
- "EXECUTE_PROCESS.COMMAND./somebasedir/git[;]checkout[;]-B[;]other-branch[;]--track[;]origin/other-branch[;]WORKING_DIRECTORY[;].*/MockTrilinos/preCopyrightTrilinos.OUTPUT_FILE[;].*/test/ctest_driver/TriBITS_CTestDriver_CI_TestGitUpdateCommands_Branch/preCopyrightTrilinos.set_branch.out."
- "Dakota: Doing initial GIT clone/checkout from URL 'url3:/git/Dakota' to dir 'packages/TriKota/Dakota' ..."
- "EXECUTE_PROCESS.COMMAND[;]/somebasedir/git[;]clone[;]url3:/git/Dakota[;]packages/TriKota/Dakota[;]WORKING_DIRECTORY[;].*/tribits/examples/MockTrilinos[;]OUTPUT_FILE[;].*/TriBITS_CTestDriver_CI_TestGitUpdateCommands_Branch/Dakota.clone.out"
- "EXECUTE_PROCESS.COMMAND[;]/somebasedir/git[;]clean[;]-fdx[;]WORKING_DIRECTORY[;].*/MockTrilinos/packages/TriKota/Dakota[;]OUTPUT_FILE[;].*/TriBITS_CTestDriver_CI_TestGitUpdateCommands_Branch/Dakota.clean.out"
- "EXECUTE_PROCESS.COMMAND[;]/somebasedir/git[;]reset[;]--hard[;]HEAD[;]WORKING_DIRECTORY[;].*/MockTrilinos/packages/TriKota/Dakota[;]OUTPUT_FILE[;].*/TriBITS_CTestDriver_CI_TestGitUpdateCommands_Branch/Dakota.reset.out"
- "EXECUTE_PROCESS.COMMAND[;]/somebasedir/git[;]fetch[;]origin[;]TIMEOUT[;]600[;]WORKING_DIRECTORY[;].*/MockTrilinos/packages/TriKota/Dakota[;]OUTPUT_FILE[;].*/TriBITS_CTestDriver_CI_TestGitUpdateCommands_Branch/Dakota.fetch.out"
- "EXECUTE_PROCESS.COMMAND[;]/somebasedir/git[;]checkout[;]-B[;]other-branch[;]--track[;]origin/other-branch[;]WORKING_DIRECTORY[;].*/MockTrilinos/packages/TriKota/Dakota[;]OUTPUT_FILE[;].*/TriBITS_CTestDriver_CI_TestGitUpdateCommands_Branch/Dakota.set_branch.out"
- "Adding POST extra Continuous repository preCopyrightTrilinos"
- "Adding POST extra Continuous repository Dakota"
- "Trilinos_NUM_PACKAGES='24'"
- "Trilinos_NUM_TPLS='19'"
- "Reading list of POST extra packages from .*/MockTrilinos/preCopyrightTrilinos/PackagesList.cmake"
- "Trilinos_NUM_PACKAGES='26'"
- "Trilinos_NUM_TPLS='20'"
- "Skipping reading packages and TPLs for POST extra repo Dakota because marked NOPACKAGES"
- )
-
-
-# Test repo operations Trilinos_BRANCH=other-branch, Trilinos_EXTRAREPOS_BRANCH=yet-other-branch
-CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE(
- CI_TestGitUpdateCommands_Branch_ExtraReposBranch
- ARGS Trilinos_ENABLE_SECONDARY_TESTED_CODE=ON Trilinos_ENABLE_KNOWN_EXTERNAL_REPOS_TYPE=Continuous
- Trilinos_ADDITIONAL_PACKAGES=Stalix
- Trilinos_BRANCH=other-branch Trilinos_EXTRAREPOS_BRANCH=yet-other-branch
- PASS_REGULAR_EXPRESSION_ALL
- "For base repo, doing switch to branch other-branch"
- "EXECUTE_PROCESS.COMMAND[;]/somebasedir/git[;]checkout[;]-B[;]other-branch[;]--track[;]origin/other-branch[;]WORKING_DIRECTORY[;].*/MockTrilinos[;]RESULT_VARIABLE[;]GIT_CHECKOUT_RETURN_VAL[;]OUTPUT_VARIABLE[;]BRANCH_OUTPUT[;]ERROR_VARIABLE[;]BRANCH_ERROR"
- "For extra repos, doing switch to branch yet-other-branch"
- "preCopyrightTrilinos: Doing GIT update from URL 'url1:/git/preCopyrightTrilinos' to dir '.*/MockTrilinos/preCopyrightTrilinos'"
- "EXECUTE_PROCESS.COMMAND./somebasedir/git[;]clean[;]-fdx[;]WORKING_DIRECTORY[;].*/MockTrilinos/preCopyrightTrilinos.OUTPUT_FILE[;].*/test/ctest_driver/TriBITS_CTestDriver_CI_TestGitUpdateCommands_Branch_ExtraReposBranch/preCopyrightTrilinos.clean.out."
- "EXECUTE_PROCESS.COMMAND./somebasedir/git[;]reset[;]--hard[;]HEAD[;]WORKING_DIRECTORY[;].*/MockTrilinos/preCopyrightTrilinos.OUTPUT_FILE[;].*/test/ctest_driver/TriBITS_CTestDriver_CI_TestGitUpdateCommands_Branch_ExtraReposBranch/preCopyrightTrilinos.reset.out."
- "EXECUTE_PROCESS.COMMAND./somebasedir/git[;]fetch[;]origin[;]TIMEOUT[;]600[;]WORKING_DIRECTORY[;].*/MockTrilinos/preCopyrightTrilinos.OUTPUT_FILE[;].*/test/ctest_driver/TriBITS_CTestDriver_CI_TestGitUpdateCommands_Branch_ExtraReposBranch/preCopyrightTrilinos.fetch.out."
- "EXECUTE_PROCESS.COMMAND./somebasedir/git[;]checkout[;]-B[;]yet-other-branch[;]--track[;]origin/yet-other-branch[;]WORKING_DIRECTORY[;].*/MockTrilinos/preCopyrightTrilinos.OUTPUT_FILE[;].*/test/ctest_driver/TriBITS_CTestDriver_CI_TestGitUpdateCommands_Branch_ExtraReposBranch/preCopyrightTrilinos.set_branch.out."
- "Dakota: Doing initial GIT clone/checkout from URL 'url3:/git/Dakota' to dir 'packages/TriKota/Dakota' ..."
- "EXECUTE_PROCESS.COMMAND[;]/somebasedir/git[;]clone[;]url3:/git/Dakota[;]packages/TriKota/Dakota[;]WORKING_DIRECTORY[;].*/tribits/examples/MockTrilinos[;]OUTPUT_FILE[;].*/TriBITS_CTestDriver_CI_TestGitUpdateCommands_Branch_ExtraReposBranch/Dakota.clone.out"
- "EXECUTE_PROCESS.COMMAND[;]/somebasedir/git[;]clean[;]-fdx[;]WORKING_DIRECTORY[;].*/MockTrilinos/packages/TriKota/Dakota[;]OUTPUT_FILE[;].*/TriBITS_CTestDriver_CI_TestGitUpdateCommands_Branch_ExtraReposBranch/Dakota.clean.out"
- "EXECUTE_PROCESS.COMMAND[;]/somebasedir/git[;]reset[;]--hard[;]HEAD[;]WORKING_DIRECTORY[;].*/MockTrilinos/packages/TriKota/Dakota[;]OUTPUT_FILE[;].*/TriBITS_CTestDriver_CI_TestGitUpdateCommands_Branch_ExtraReposBranch/Dakota.reset.out"
- "EXECUTE_PROCESS.COMMAND[;]/somebasedir/git[;]fetch[;]origin[;]TIMEOUT[;]600[;]WORKING_DIRECTORY[;].*/MockTrilinos/packages/TriKota/Dakota[;]OUTPUT_FILE[;].*/TriBITS_CTestDriver_CI_TestGitUpdateCommands_Branch_ExtraReposBranch/Dakota.fetch.out"
- "EXECUTE_PROCESS.COMMAND[;]/somebasedir/git[;]checkout[;]-B[;]yet-other-branch[;]--track[;]origin/yet-other-branch[;]WORKING_DIRECTORY[;].*/MockTrilinos/packages/TriKota/Dakota[;]OUTPUT_FILE[;].*/TriBITS_CTestDriver_CI_TestGitUpdateCommands_Branch_ExtraReposBranch/Dakota.set_branch.out"
- "Adding POST extra Continuous repository preCopyrightTrilinos"
- "Adding POST extra Continuous repository Dakota"
- "Trilinos_NUM_PACKAGES='24'"
- "Trilinos_NUM_TPLS='19'"
- "Reading list of POST extra packages from .*/MockTrilinos/preCopyrightTrilinos/PackagesList.cmake"
- "Trilinos_NUM_PACKAGES='26'"
- "Trilinos_NUM_TPLS='20'"
- "Skipping reading packages and TPLs for POST extra repo Dakota because marked NOPACKAGES"
- )
-
-
-CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE(
- Nightly_EnableAllSecondaryTested
- ARGS Trilinos_ENABLE_SECONDARY_TESTED_CODE=ON Trilinos_ENABLE_KNOWN_EXTERNAL_REPOS_TYPE=Nightly
- PASS_REGULAR_EXPRESSION_ALL
- "EXECUTE_PROCESS.+git.+preCopyrightTrilinos.+preCopyrightTrilinos.fetch.out"
- "EXECUTE_PROCESS.+git.+extraTrilinosRepo.+extraTrilinosRepo.fetch.out"
- "Explicitly enabled packages on input .* 0"
- "Explicitly disabled packages on input .* Stokhos Stalix 2"
- "Enabling all SE packages that are not currently disabled because of Trilinos_ENABLE_ALL_PACKAGES=ON"
- "Final set of enabled packages: TrilinosFramework Teuchos RTOp Epetra Zoltan Shards Triutils Tpetra EpetraExt Sacado Thyra Isorropia AztecOO Galeri Amesos Intrepid Ifpack ML Belos Stratimikos RBGen Phalanx Panzer Teko ExtraPack 25"
- "Final set of non-enabled packages: Stokhos Stalix 2"
- "Trilinos_NUM_ENABLED_PACKAGES=25: Configuring packages!"
- "Processing current package ExtraPack: libs='ON', tests='ON'"
- "Configuring TRIBITS_PACKAGE='ExtraPack'"
- )
-
-
-CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE(
- PreExtraRepos_ExtraReposFile
- ARGS
- Trilinos_EXTRAREPOS_FILE="${CMAKE_CURRENT_SOURCE_DIR}/../core/DependencyUnitTests/PreAndExtraRepositoriesList.cmake"
- Trilinos_ENABLE_KNOWN_EXTERNAL_REPOS_TYPE=Continuous
- Trilinos_ENABLE_SECONDARY_TESTED_CODE=ON
- PASS_REGULAR_EXPRESSION_ALL
- "-- Adding PRE extra Continuous repository preRepoOnePackage"
- "-- Adding POST extra Continuous repository preCopyrightTrilinos"
- "-- Adding POST extra Continuous repository Dakota"
- "preRepoOnePackage: Doing GIT update from URL .url1:/git/preRepoOnePackage. to dir ..*/MockTrilinos/preRepoOnePackage."
- "-- Trilinos_PRE_REPOSITORIES=.preRepoOnePackage."
- "-- Trilinos_EXTRA_REPOSITORIES=.preCopyrightTrilinos[;]Dakota."
- "Reading list of PRE extra packages from .*/MockTrilinos/preRepoOnePackage/PackagesList.cmake"
- "Final set of enabled packages: preRepoOnePackage TrilinosFramework Teuchos .* Teko"
- "Processing current package preRepoOnePackage: libs=.ON., tests=.ON."
- "CONFIGURE_OPTIONS = ..*-DTrilinos_EXTRAREPOS_FILE:STRING=.*/DependencyUnitTests/PreAndExtraRepositoriesList.cmake.*-DTrilinos_ENABLE_preRepoOnePackage:BOOL=ON."
- )
-
-
-CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE(
- PreExtraRepos_ExtraReposFile_ExtraReposList
- ARGS
- Trilinos_EXTRAREPOS_FILE="${CMAKE_CURRENT_SOURCE_DIR}/../core/DependencyUnitTests/PreAndExtraRepositoriesList.cmake"
- Trilinos_PRE_REPOSITORIES=preRepoOnePackage
- Trilinos_EXTRA_REPOSITORIES=preCopyrightTrilinos,extraTrilinosRepo,Dakota
- Trilinos_ENABLE_KNOWN_EXTERNAL_REPOS_TYPE=Nightly
- Trilinos_ENABLE_SECONDARY_TESTED_CODE=ON
- PASS_REGULAR_EXPRESSION_ALL
- "-- Adding PRE extra Continuous repository preRepoOnePackage"
- "-- Adding POST extra Continuous repository preCopyrightTrilinos"
- "-- Adding POST extra Nightly repository extraTrilinosRepo"
- "-- Adding POST extra Continuous repository Dakota"
- "-- Trilinos_PRE_REPOSITORIES=.preRepoOnePackage."
- "-- Trilinos_EXTRA_REPOSITORIES=.preCopyrightTrilinos,extraTrilinosRepo,Dakota."
- "Reading list of PRE extra packages from .*/MockTrilinos/preRepoOnePackage/PackagesList.cmake"
- "Reading list of native packages from .*/MockTrilinos/PackagesList.cmake"
- "Reading list of POST extra packages from .*/preCopyrightTrilinos/PackagesList.cmake"
- "Reading list of POST extra packages from .*/extraTrilinosRepo/PackagesList.cmake"
- "Skipping reading packages and TPLs for POST extra repo Dakota because marked NOPACKAGES"
- "Final set of enabled packages: preRepoOnePackage TrilinosFramework Teuchos .* Teko"
- "Processing current package preRepoOnePackage: libs=.ON., tests=.ON."
- "CONFIGURE_OPTIONS = ..*-DTrilinos_EXTRAREPOS_FILE:STRING=.*/DependencyUnitTests/PreAndExtraRepositoriesList.cmake.*-DTrilinos_ENABLE_preRepoOnePackage:BOOL=ON."
- )
-
-
-CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE(
- PreExtraRepos_ExtraReposFile_ExtraReposListPartial
- ARGS
- Trilinos_EXTRAREPOS_FILE="${CMAKE_CURRENT_SOURCE_DIR}/../core/DependencyUnitTests/PreAndExtraRepositoriesList.cmake"
- Trilinos_PRE_REPOSITORIES=
- Trilinos_EXTRA_REPOSITORIES=preCopyrightTrilinos,Dakota
- Trilinos_ENABLE_KNOWN_EXTERNAL_REPOS_TYPE=Nightly
- Trilinos_ENABLE_SECONDARY_TESTED_CODE=ON
- PASS_REGULAR_EXPRESSION_ALL
- "-- Adding PRE extra Continuous repository preRepoOnePackage"
- "-- Adding POST extra Continuous repository preCopyrightTrilinos"
- "-- Adding POST extra Continuous repository Dakota"
- "-- Trilinos_PRE_REPOSITORIES=.preRepoOnePackage."
- "-- Trilinos_EXTRA_REPOSITORIES=.preCopyrightTrilinos,Dakota."
- "Reading list of PRE extra packages from .*/MockTrilinos/preRepoOnePackage/PackagesList.cmake"
- "Reading list of native packages from .*/MockTrilinos/PackagesList.cmake"
- "Reading list of POST extra packages from .*/preCopyrightTrilinos/PackagesList.cmake"
- "Skipping reading packages and TPLs for POST extra repo Dakota because marked NOPACKAGES"
- "Final set of enabled packages: preRepoOnePackage TrilinosFramework Teuchos .* Teko"
- "Processing current package preRepoOnePackage: libs=.ON., tests=.ON."
- "CONFIGURE_OPTIONS = ..*-DTrilinos_EXTRAREPOS_FILE:STRING=.*/DependencyUnitTests/PreAndExtraRepositoriesList.cmake.*-DTrilinos_ENABLE_preRepoOnePackage:BOOL=ON."
- )
-
-# ToDo: Add subset!
-
-
-#
-# Test enable logic based on modified files/packages
-#
-
-
-IF (PYTHON_EXECUTABLE)
-
- CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE(
- CI_EnableOnlyModified_ModifiedNone
- COPY_FILES
- ${CMAKE_CURRENT_SOURCE_DIR}/modifiedFiles.empty.txt modifiedFiles.txt
- ${CMAKE_CURRENT_SOURCE_DIR}/modifiedFiles.empty.txt modifiedFiles.preCopyrightTrilinos.txt
- ARGS Trilinos_ENABLE_SECONDARY_TESTED_CODE=ON
- CTEST_TEST_TYPE=Continuous CTEST_ENABLE_MODIFIED_PACKAGES_ONLY=ON
- PASS_REGULAR_EXPRESSION_ALL
- "Final set of enabled packages: 0"
- "MODIFIED_PACKAGES_LIST='': No modified packages to justify continuous integration test iteration"
- SKIP_STANDARD_DEPS_CHECK
- )
-
-
- CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE(
- CI_EnableOnlyModified_ModifiedTeuchos
- COPY_FILES
- ${CMAKE_CURRENT_SOURCE_DIR}/modifiedFiles.Teuchos.txt modifiedFiles.txt
- ${CMAKE_CURRENT_SOURCE_DIR}/modifiedFiles.empty.txt modifiedFiles.preCopyrightTrilinos.txt
- ARGS Trilinos_ENABLE_SECONDARY_TESTED_CODE=ON
- CTEST_TEST_TYPE=Continuous CTEST_ENABLE_MODIFIED_PACKAGES_ONLY=ON
- CTEST_UPDATE_RETURN_VAL=1
- PASS_REGULAR_EXPRESSION_ALL
- "Directly modified or failing non-disabled packages that need to be tested: Teuchos 1"
- "Explicitly enabled packages on input .* Teuchos 1"
- "Final set of enabled packages: Teuchos RTOp Epetra Zoltan Shards Triutils Tpetra EpetraExt Sacado Thyra Isorropia AztecOO Galeri Amesos Intrepid Ifpack ML Belos Stratimikos RBGen Phalanx Panzer Teko 23"
- "Final set of non-enabled packages: TrilinosFramework Stokhos Stalix 3"
- "CTEST_UPDATE.+ returned '1'"
- "Processing current package Teuchos: libs='ON', tests='ON'"
- "Processing current package Teko: libs='ON', tests='ON'"
- )
-
-
- CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE(
- CI_Nightly_EnableOnlyModified_ModifiedTeuchos
- COPY_FILES
- ${CMAKE_CURRENT_SOURCE_DIR}/modifiedFiles.Teuchos.txt modifiedFiles.txt
- ${CMAKE_CURRENT_SOURCE_DIR}/modifiedFiles.empty.txt modifiedFiles.preCopyrightTrilinos.txt
- ${CMAKE_CURRENT_SOURCE_DIR}/modifiedFiles.empty.txt modifiedFiles.extraTrilinosRepo.txt
- ARGS Trilinos_ENABLE_SECONDARY_TESTED_CODE=ON
- CTEST_TEST_TYPE=Continuous CTEST_ENABLE_MODIFIED_PACKAGES_ONLY=ON
- CTEST_START_WITH_EMPTY_BINARY_DIRECTORY=TRUE
- Trilinos_ENABLE_KNOWN_EXTERNAL_REPOS_TYPE=Nightly
- CTEST_UPDATE_RETURN_VAL=1
- PASS_REGULAR_EXPRESSION_ALL
- "Directly modified or failing non-disabled packages that need to be tested: Teuchos 1"
- "Explicitly enabled packages on input .* Teuchos 1"
- "Final set of enabled packages: Teuchos RTOp Epetra Zoltan Shards Triutils Tpetra EpetraExt Sacado Thyra Isorropia AztecOO Galeri Amesos Intrepid Ifpack ML Belos Stratimikos RBGen Phalanx Panzer Teko ExtraPack 24"
- "Final set of non-enabled packages: TrilinosFramework Stokhos Stalix 3"
- "CTEST_UPDATE.+ returned '1'"
- "Processing current package Teuchos: libs='ON', tests='ON'"
- "CONFIGURE_OPTIONS.+Trilinos_ENABLE_Teuchos:BOOL=ON"
- "Processing current package Zoltan: libs='ON', tests=''"
- "Processing current package Teko: libs='ON', tests='ON'"
- "Processing current package ExtraPack: libs='ON', tests='ON'"
- )
-
-
- CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE(
- CI_EnableOnlyModified_ModifiedThyra_NoEnableImplictlyEnabled
- COPY_FILES
- ${CMAKE_CURRENT_SOURCE_DIR}/modifiedFiles.Thyra.txt modifiedFiles.txt
- ${CMAKE_CURRENT_SOURCE_DIR}/modifiedFiles.empty.txt modifiedFiles.preCopyrightTrilinos.txt
- ${CMAKE_CURRENT_SOURCE_DIR}/modifiedFiles.empty.txt modifiedFiles.extraTrilinosRepo.txt
- ARGS Trilinos_ENABLE_SECONDARY_TESTED_CODE=ON
- CTEST_TEST_TYPE=Continuous CTEST_ENABLE_MODIFIED_PACKAGES_ONLY=ON
- CTEST_START_WITH_EMPTY_BINARY_DIRECTORY=FALSE
- CTEST_UPDATE_RETURN_VAL=1
- PASS_REGULAR_EXPRESSION_ALL
- "Directly modified or failing non-disabled packages that need to be tested: Thyra 1"
- "Explicitly enabled packages on input .* Thyra 1"
- "Final set of enabled packages: Teuchos RTOp Epetra Zoltan Shards Triutils Tpetra EpetraExt Sacado Thyra Isorropia AztecOO Galeri Amesos Intrepid Ifpack ML Belos Stratimikos Phalanx Panzer Teko 22"
- "Final set of non-enabled packages: TrilinosFramework Stokhos RBGen Stalix 4"
- "Final set of packages to be explicitly processed by CTest/CDash: Thyra Stratimikos Panzer Teko 4"
- "CTEST_UPDATE.+ returned '1'"
- "Processing current package Thyra: libs='ON', tests='ON'"
- "CONFIGURE_OPTIONS.+Trilinos_ENABLE_Thyra:BOOL=ON"
- "Processing current package Teko: libs='ON', tests='ON'"
- )
-
-
- CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE(
- CI_EnableOnlyModified_ModifiedThyraCoreLibs_NoEnableImplictlyEnabled
- COPY_FILES
- ${CMAKE_CURRENT_SOURCE_DIR}/modifiedFiles.ThyraCoreLibs.txt modifiedFiles.txt
- ${CMAKE_CURRENT_SOURCE_DIR}/modifiedFiles.empty.txt modifiedFiles.preCopyrightTrilinos.txt
- ${CMAKE_CURRENT_SOURCE_DIR}/modifiedFiles.empty.txt modifiedFiles.extraTrilinosRepo.txt
- ARGS Trilinos_ENABLE_SECONDARY_TESTED_CODE=ON
- CTEST_TEST_TYPE=Continuous CTEST_ENABLE_MODIFIED_PACKAGES_ONLY=ON
- CTEST_START_WITH_EMPTY_BINARY_DIRECTORY=FALSE
- CTEST_UPDATE_RETURN_VAL=1
- PASS_REGULAR_EXPRESSION_ALL
- "Directly modified or failing non-disabled packages that need to be tested: ThyraCoreLibs 1"
- "Explicitly enabled packages on input .* 0"
- "Explicitly enabled SE packages on input .* ThyraCoreLibs 1"
- "Final set of enabled packages: Teuchos RTOp Epetra Zoltan Shards Triutils Tpetra EpetraExt Sacado Thyra Isorropia AztecOO Galeri Amesos Intrepid Ifpack ML Belos Stratimikos Phalanx Panzer Teko 22"
- "Final set of non-enabled packages: TrilinosFramework Stokhos RBGen Stalix 4"
- "Final set of packages to be explicitly processed by CTest/CDash: Thyra Stratimikos Panzer Teko 4"
- "CTEST_UPDATE.+ returned '1'"
- "Processing current package Thyra: libs='ON', tests='ON'"
- "CONFIGURE_OPTIONS.+Trilinos_ENABLE_Thyra:BOOL=ON"
- "Processing current package Teko: libs='ON', tests='ON'"
- )
-
-
- CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE(
- CI_EnableOnlyModified_ModifiedTeko
- COPY_FILES
- ${CMAKE_CURRENT_SOURCE_DIR}/modifiedFiles.empty.txt modifiedFiles.txt
- ${CMAKE_CURRENT_SOURCE_DIR}/modifiedFiles.Teko.txt modifiedFiles.preCopyrightTrilinos.txt
- ARGS Trilinos_ENABLE_SECONDARY_TESTED_CODE=ON
- CTEST_TEST_TYPE=Continuous CTEST_ENABLE_MODIFIED_PACKAGES_ONLY=ON
- CTEST_START_WITH_EMPTY_BINARY_DIRECTORY=TRUE
- CTEST_UPDATE_RETURN_VAL=0 # Main update returns nothing for the main Trilinos repo!
- PASS_REGULAR_EXPRESSION_ALL
- "Directly modified or failing non-disabled packages that need to be tested: Teko 1"
- "Explicitly enabled packages on input .* Teko 1"
- "Final set of enabled packages: Teuchos RTOp Epetra Zoltan Triutils Tpetra EpetraExt Thyra Isorropia AztecOO Galeri Amesos Ifpack ML Belos Stratimikos Teko 17"
- "Final set of non-enabled packages: TrilinosFramework Shards Stokhos Sacado Intrepid RBGen Phalanx Panzer Stalix 9"
- "CTEST_UPDATE.+ returned '0'"
- "Processing current package Teuchos: libs='ON', tests=''"
- "CONFIGURE_OPTIONS.+Trilinos_ENABLE_Teuchos:BOOL=ON"
- "Processing current package Teko: libs='ON', tests='ON'"
- )
- # NOTE: The above unit test is critical because it shows that Teko will get
- # enabled and processed even though the main git update of the main Trilinos
- # repo returns no updated files. This ensures that if only extra repo
- # packages get modified then they will get picked up in CI testing and
- # processed correctly.
-
-
- CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE(
- CI_EnableOnlyModified_ModifiedTeuchosTeko
- COPY_FILES
- ${CMAKE_CURRENT_SOURCE_DIR}/modifiedFiles.Teuchos.txt modifiedFiles.txt
- ${CMAKE_CURRENT_SOURCE_DIR}/modifiedFiles.Teko.txt modifiedFiles.preCopyrightTrilinos.txt
- ARGS Trilinos_ENABLE_SECONDARY_TESTED_CODE=ON
- CTEST_TEST_TYPE=Continuous CTEST_ENABLE_MODIFIED_PACKAGES_ONLY=ON
- CTEST_UPDATE_RETURN_VAL=2
- PASS_REGULAR_EXPRESSION_ALL
- "MODIFIED_PACKAGES_LIST='Teuchos.Teko'"
- "Enabling modified package: Teuchos"
- "Enabling modified package: Teko"
- "Directly modified or failing non-disabled packages that need to be tested: Teuchos Teko 2"
- "Explicitly enabled packages on input .* Teuchos Teko 2"
- "Final set of enabled packages: Teuchos RTOp Epetra Zoltan Shards Triutils Tpetra EpetraExt Sacado Thyra Isorropia AztecOO Galeri Amesos Intrepid Ifpack ML Belos Stratimikos RBGen Phalanx Panzer Teko 23"
- "Final set of non-enabled packages: TrilinosFramework Stokhos Stalix 3"
- "CTEST_UPDATE.+ returned '2'"
- "Processing current package Teuchos: libs='ON', tests='ON'"
- "CONFIGURE_OPTIONS.+Trilinos_ENABLE_Teuchos:BOOL=ON"
- "Processing current package Teko: libs='ON', tests='ON'"
- "CONFIGURE_OPTIONS.+Trilinos_ENABLE_Teko:BOOL=ON"
- )
-
-
- CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE(
- CI_EnableOnlyModified_ModifiedStokhosStalix_FailedNone
- COPY_FILES
- ${CMAKE_CURRENT_SOURCE_DIR}/modifiedFiles.Stokhos.txt modifiedFiles.txt
- ${CMAKE_CURRENT_SOURCE_DIR}/modifiedFiles.Stalix.txt modifiedFiles.preCopyrightTrilinos.txt
- ${CMAKE_CURRENT_SOURCE_DIR}/failedPackages.none.txt failedPackages.txt
- ARGS Trilinos_ENABLE_SECONDARY_TESTED_CODE=ON
- CTEST_TEST_TYPE=Continuous CTEST_ENABLE_MODIFIED_PACKAGES_ONLY=ON
- CTEST_UPDATE_RETURN_VAL=1
- PASS_REGULAR_EXPRESSION_ALL
- "MODIFIED_PACKAGES_LIST='Stokhos.Stalix'"
- "FAILING_PACKAGES_LIST=''"
- "Not enabling explicitly disabled modified package: Stokhos"
- "Not enabling explicitly disabled modified package: Stalix"
- "Directly modified or failing non-disabled packages that need to be tested: 0"
- "Explicitly enabled packages on input .* 0"
- "Explicitly disabled packages on input .* Stokhos Stalix 2"
- "Final set of enabled packages: 0"
- "Final set of non-enabled packages: TrilinosFramework Teuchos RTOp Epetra Zoltan Shards Triutils Tpetra EpetraExt Stokhos Sacado Thyra Isorropia AztecOO Galeri Amesos Intrepid Ifpack ML Belos Stratimikos RBGen Phalanx Panzer Teko Stalix 26"
- "Trilinos_NUM_ENABLED_PACKAGES=0: Exiting the script!"
- )
-
-
- CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE(
- CI_EnableOnlyModified_ModifiedTeko_FailedThyraRBGen
- COPY_FILES
- ${CMAKE_CURRENT_SOURCE_DIR}/modifiedFiles.empty.txt modifiedFiles.txt
- ${CMAKE_CURRENT_SOURCE_DIR}/modifiedFiles.Teko.txt modifiedFiles.preCopyrightTrilinos.txt
- ${CMAKE_CURRENT_SOURCE_DIR}/failedPackages.Thyra.RBGen.txt failedPackages.txt
- ARGS Trilinos_ENABLE_SECONDARY_TESTED_CODE=ON
- CTEST_TEST_TYPE=Continuous CTEST_ENABLE_MODIFIED_PACKAGES_ONLY=ON
- CTEST_UPDATE_RETURN_VAL=0 # Main update returns nothing for the main Trilinos repo!
- PASS_REGULAR_EXPRESSION_ALL
- "MODIFIED_PACKAGES_LIST='Teko'"
- "FAILING_PACKAGES_LIST='Thyra.RBGen'"
- "Enabling modified package: Teko"
- "Enabling previously failing package: Thyra"
- "Enabling previously failing package: RBGen"
- "Directly modified or failing non-disabled packages that need to be tested: Thyra RBGen Teko 3"
- "Explicitly enabled packages on input .* Thyra RBGen Teko 3"
- "Explicitly disabled packages on input .* Stokhos Stalix 2"
- "Final set of enabled packages: Teuchos RTOp Epetra Zoltan Shards Triutils Tpetra EpetraExt Sacado Thyra Isorropia AztecOO Galeri Amesos Intrepid Ifpack ML Belos Stratimikos RBGen Phalanx Panzer Teko 23"
- "Final set of non-enabled packages: TrilinosFramework Stokhos Stalix 3"
- "Final set of packages to be explicitly processed by CTest/CDash: Thyra Stratimikos RBGen Panzer Teko 5"
- "CTEST_UPDATE.+ returned '0'"
- "Processing current package Thyra: libs='ON', tests='ON'"
- "Processing current package RBGen: libs='ON', tests='ON'"
- "Processing current package Teko: libs='ON', tests='ON'"
- )
-
-
- CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE(
- CI_EnableOnlyModified_ModifiedNone_FailedThyraRBGen
- COPY_FILES
- ${CMAKE_CURRENT_SOURCE_DIR}/modifiedFiles.empty.txt modifiedFiles.txt
- ${CMAKE_CURRENT_SOURCE_DIR}/modifiedFiles.empty.txt modifiedFiles.preCopyrightTrilinos.txt
- ${CMAKE_CURRENT_SOURCE_DIR}/failedPackages.Thyra.RBGen.txt failedPackages.txt
- ARGS Trilinos_ENABLE_SECONDARY_TESTED_CODE=ON
- CTEST_TEST_TYPE=Continuous CTEST_ENABLE_MODIFIED_PACKAGES_ONLY=ON
- CTEST_UPDATE_RETURN_VAL=0 # Main update returns nothing for the main Trilinos repo!
- PASS_REGULAR_EXPRESSION_ALL
- "CTEST_UPDATE.+ returned '0'"
- "MODIFIED_PACKAGES_LIST=''"
- "FAILING_PACKAGES_LIST='Thyra.RBGen'"
- "Directly modified or failing non-disabled packages that need to be tested: Thyra RBGen 2"
- "Explicitly enabled packages on input .* Thyra RBGen 2"
- "Final set of enabled packages: Teuchos RTOp Epetra Zoltan Shards Triutils Tpetra EpetraExt Sacado Thyra Isorropia AztecOO Galeri Amesos Intrepid Ifpack ML Belos Stratimikos RBGen Phalanx Panzer Teko 23"
- "MODIFIED_PACKAGES_LIST='': No modified packages to justify continuous integration test iteration"
- )
-
-
- CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE(
- CI_EnableOnlyModified_ModifiedNone_FailedStokhosStalix
- COPY_FILES
- ${CMAKE_CURRENT_SOURCE_DIR}/modifiedFiles.empty.txt modifiedFiles.txt
- ${CMAKE_CURRENT_SOURCE_DIR}/modifiedFiles.empty.txt modifiedFiles.preCopyrightTrilinos.txt
- ${CMAKE_CURRENT_SOURCE_DIR}/failedPackages.Stokhos.Stalix.txt failedPackages.txt
- ARGS Trilinos_ENABLE_SECONDARY_TESTED_CODE=ON
- CTEST_TEST_TYPE=Continuous CTEST_ENABLE_MODIFIED_PACKAGES_ONLY=ON
- CTEST_UPDATE_RETURN_VAL=0 # Main update returns nothing for the main Trilinos repo!
- PASS_REGULAR_EXPRESSION_ALL
- "CTEST_UPDATE.+ returned '0'"
- "MODIFIED_PACKAGES_LIST=''"
- "FAILING_PACKAGES_LIST='Stokhos.Stalix'"
- "Not enabling explicitly disabled previously failing package: Stokhos"
- "Not enabling explicitly disabled previously failing package: Stalix"
- "Directly modified or failing non-disabled packages that need to be tested: 0"
- "Explicitly enabled packages on input .* 0"
- "Explicitly disabled packages on input .* Stokhos Stalix 2"
- "Final set of enabled packages: 0"
- "Final set of non-enabled packages: TrilinosFramework Teuchos RTOp Epetra Zoltan Shards Triutils Tpetra EpetraExt Stokhos Sacado Thyra Isorropia AztecOO Galeri Amesos Intrepid Ifpack ML Belos Stratimikos RBGen Phalanx Panzer Teko Stalix 26"
- "MODIFIED_PACKAGES_LIST='': No modified packages to justify continuous integration test iteration"
- )
-
-
- # ToDo: Test modified package not to be implicitly enabled to not be enabled!
-
-ENDIF(PYTHON_EXECUTABLE)
-
-#
-# Test other behavior of TribitsCTestDriverCore
-#
-
-CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE(
- Override_MPI_EXEC_MAX_NUMPROCSS
- ARGS Trilinos_PACKAGES=Teuchos MPI_EXEC_MAX_NUMPROCS=6
- PASS_REGULAR_EXPRESSION_ALL
- "Processing current package Teuchos: libs='ON', tests='ON'"
- "CONFIGURE_OPTIONS = '.*-DMPI_EXEC_MAX_NUMPROCS:STRING=6.*'"
- )
-
-
-# ToDo: Test ???
+ADD_SUBDIRECTORY(MockCTestDriver)
+
+IF (
+ (CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux")
+ AND
+ (NOT CMAKE_VERSION VERSION_LESS "3.3.0")
+ )
+ ADD_SUBDIRECTORY(TribitsExampleProject)
+ # NOTE: For some reason, these tests do not work correctly when run with
+ # CMake 2.8.11. I tested them locally with CMake 3.3.2 and they worked
+ # locally at least.
+ENDIF()
diff --git a/test/ctest_driver/MockCTestDriver/CMakeLists.txt b/test/ctest_driver/MockCTestDriver/CMakeLists.txt
new file mode 100644
index 000000000..e7993f305
--- /dev/null
+++ b/test/ctest_driver/MockCTestDriver/CMakeLists.txt
@@ -0,0 +1,915 @@
+# @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
+
+
+
+INCLUDE(CMakeParseArguments)
+INCLUDE(AdvancedSet)
+
+
+ADVANCED_SET(Trilinos_CTEST_COMMAND ctest CACHE STRING
+ "CTest executable used to drive unit tests")
+
+# The mock test project
+SET(MOCK_PROJECT_NAME Trilinos)
+
+SET(TRIBITS_MOCK_TRILINOS_DIR "examples/MockTrilinos")
+
+SET(MOCK_TRILINOS_DIR ${${PROJECT_NAME}_TRIBITS_DIR}/${TRIBITS_MOCK_TRILINOS_DIR})
+
+
+FUNCTION(CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE TEST_NAME)
+
+ #MESSAGE("CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE: ${TEST_CASE} ${ARGN}")
+
+ CMAKE_PARSE_ARGUMENTS(
+ #prefix
+ PARSE
+ #options
+ "SKIP_STANDARD_DEPS_CHECK"
+ # one_value_keywords
+ ""
+ # multi_value_keywords
+ "COPY_FILES;ARGS;PASS_REGULAR_EXPRESSION_ALL;COMPARE_DEPS_FILE"
+ ${ARGN}
+ )
+
+ SET(TEST_CORE_NAME MockCTestDriver_${TEST_NAME})
+ SET(TEST_FULL_NAME ${PACKAGE_NAME}_${TEST_CORE_NAME})
+
+ SET(TEST_BLOCKS "")
+ SET(TEST_IDX 0)
+
+ IF (PARSE_COPY_FILES)
+
+ LIST(LENGTH PARSE_COPY_FILES COPY_FILES_LEN)
+ MATH(EXPR NUM_FILE_COPIES "${COPY_FILES_LEN}/2")
+ MATH(EXPR COPY_FILES_LAST_IDX "${NUM_FILE_COPIES}-1")
+
+ SET(NUM_COPY_FILE_ARGS 2)
+ SET(FILE_FROM_OFFSET 0)
+ SET(FILE_TO_OFFSET 1)
+
+ FOREACH(COPY_FILE_IDX RANGE ${COPY_FILES_LAST_IDX})
+
+ # FILE_FROM
+ MATH(EXPR FILE_FROM_IDX "${COPY_FILE_IDX}*${NUM_COPY_FILE_ARGS}+${FILE_FROM_OFFSET}")
+ LIST(GET PARSE_COPY_FILES ${FILE_FROM_IDX} FILE_FROM )
+ #PRINT_VAR(FILE_FROM)
+
+ # FILE_TO
+ MATH(EXPR FILE_TO_IDX "${COPY_FILE_IDX}*${NUM_COPY_FILE_ARGS}+${FILE_TO_OFFSET}")
+ LIST(GET PARSE_COPY_FILES ${FILE_TO_IDX} FILE_TO )
+ #PRINT_VAR(FILE_TO)
+
+ SET(TEST_BLOCKS ${TEST_BLOCKS}
+ TEST_${TEST_IDX} CMND ${CMAKE_COMMAND}
+ ARGS -E copy ${FILE_FROM} ${CMAKE_CURRENT_BINARY_DIR}/${TEST_FULL_NAME}/${FILE_TO}
+ )
+
+ MATH(EXPR TEST_IDX "${TEST_IDX}+1")
+
+ ENDFOREACH()
+
+ ENDIF()
+
+ SET(TEST_BLOCKS ${TEST_BLOCKS}
+ TEST_${TEST_IDX} CMND env
+ ARGS
+ ${MOCK_PROJECT_NAME}_TRIBITS_DIR=${${PROJECT_NAME}_TRIBITS_DIR}
+ CTEST_DEPENDENCY_HANDLING_UNIT_TESTING=ON
+ ${MOCK_PROJECT_NAME}_CTEST_COMMAND=${CMAKE_CTEST_COMMAND}
+ ${MOCK_PROJECT_NAME}_PACKAGES= # Set back to default
+ CTEST_EXPLICITLY_ENABLE_IMPLICITLY_ENABLED_PACKAGES= # Set back to default
+ CTEST_ENABLE_MODIFIED_PACKAGES_ONLY=OFF # Set back to default
+ ${MOCK_PROJECT_NAME}_PRE_REPOSITORIES= # Set back to default
+ ${MOCK_PROJECT_NAME}_EXTRA_REPOSITORIES= # Set back to default
+ CTEST_DO_UPDATES=ON # Set back to default
+ CTEST_DASHBOARD_ROOT= # Must be empty
+ CTEST_DO_SUBMIT=OFF # Must be off
+ CTEST_START_WITH_EMPTY_BINARY_DIRECTORY=OFF # Must be off!
+ ${PARSE_ARGS}
+ ${CMAKE_CTEST_COMMAND} -S ${CMAKE_CURRENT_SOURCE_DIR}/unit_test_driver.cmake
+ PASS_REGULAR_EXPRESSION_ALL ${PARSE_PASS_REGULAR_EXPRESSION_ALL}
+ )
+
+ MATH(EXPR TEST_IDX "${TEST_IDX}+1")
+
+ IF (PARSE_COMPARE_DEPS_FILE)
+ SET(TEST_BLOCKS ${TEST_BLOCKS}
+ TEST_${TEST_IDX} CMND ${CMAKE_COMMAND}
+ ARGS -E compare_files
+ "${PARSE_COMPARE_DEPS_FILE}"
+ "${CMAKE_CURRENT_BINARY_DIR}/${TEST_FULL_NAME}/TrilinosPackageDependencies.xml"
+ )
+ ENDIF()
+
+ TRIBITS_ADD_ADVANCED_TEST( ${TEST_CORE_NAME}
+ OVERALL_WORKING_DIRECTORY TEST_NAME
+ ${TEST_BLOCKS}
+ OVERALL_NUM_MPI_PROCS 1
+ )
+
+ENDFUNCTION()
+
+
+#
+# Test package enables/disables
+#
+
+
+CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE(
+ EnableAllDefault
+ PASS_REGULAR_EXPRESSION_ALL
+ "Enabling all SE packages that are not currently disabled because of Trilinos_ENABLE_ALL_PACKAGES=ON"
+ "Final set of enabled packages: TrilinosFramework Teuchos RTOp Epetra Zoltan Shards Triutils Tpetra EpetraExt Thyra Isorropia AztecOO Galeri Amesos Intrepid Ifpack ML Stratimikos RBGen 19"
+ "Final set of non-enabled packages: Stokhos Sacado Belos Phalanx Panzer 5"
+ COMPARE_DEPS_FILE
+ "${CMAKE_CURRENT_SOURCE_DIR}/TrilinosPackageDependencies.Trilinos.xml"
+ )
+
+
+CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE(
+ EnableAllSecondaryTested
+ ARGS Trilinos_ENABLE_SECONDARY_TESTED_CODE=ON
+ PASS_REGULAR_EXPRESSION_ALL
+ "Enabling all SE packages that are not currently disabled because of Trilinos_ENABLE_ALL_PACKAGES=ON"
+ "Final set of enabled packages: TrilinosFramework Teuchos RTOp Epetra Zoltan Shards Triutils Tpetra EpetraExt Sacado Thyra Isorropia AztecOO Galeri Amesos Intrepid Ifpack ML Belos Stratimikos RBGen Phalanx Panzer 23"
+ "Final set of non-enabled packages: Stokhos 1"
+ )
+
+
+CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE(
+ EnableTeuchos
+ ARGS Trilinos_PACKAGES=Teuchos Trilinos_ENABLE_KNOWN_EXTERNAL_REPOS_TYPE=Experimental
+ PASS_REGULAR_EXPRESSION_ALL
+ "Final set of enabled packages: Teuchos 1"
+ "Final set of non-enabled packages: TrilinosFramework RTOp Epetra Zoltan Shards Triutils Tpetra EpetraExt Stokhos Sacado Thyra Isorropia AztecOO Galeri Amesos Intrepid Ifpack ML Belos Stratimikos RBGen Phalanx Panzer 23"
+ "Processing current package Teuchos: libs='ON', tests='ON'"
+ "CONFIGURE_OPTIONS = '-DTrilinos_TRIBITS_DIR=.+.-DCTEST_USE_LAUNCHERS:BOOL=1.-DTrilinos_ENABLE_ALL_OPTIONAL_PACKAGES:BOOL=ON.-DTrilinos_WARNINGS_AS_ERRORS_FLAGS:STRING=-DummyErrFlags.-DTrilinos_ALLOW_NO_PACKAGES:BOOL=ON.-DTrilinos_DISABLE_ENABLED_FORWARD_DEP_PACKAGES=ON.-DTrilinos_ENABLE_SECONDARY_TESTED_CODE:BOOL=OFF.-DTrilinos_EXTRAREPOS_FILE:STRING=.*./MockTrilinos/cmake.ExtraRepositoriesList.cmake.-DTrilinos_IGNORE_MISSING_EXTRA_REPOSITORIES:BOOL=ON.-DTrilinos_ENABLE_KNOWN_EXTERNAL_REPOS_TYPE:STRING=Experimental.-DTrilinos_ENABLE_TESTS:BOOL=ON.-DTrilinos_ENABLE_Teuchos:BOOL=ON'"
+ )
+# NOTE: The above test pins down the form of the configure options passed to
+# different package configures to make sure everything in there.
+
+
+CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE(
+ EnableRTOp_DisableTeuchos
+ ARGS Trilinos_PACKAGES=RTOp Trilinos_EXCLUDE_PACKAGES=Teuchos
+ PASS_REGULAR_EXPRESSION_ALL
+ "Explicitly enabled packages on input .by user.: RTOp 1"
+ "WARNING: Setting Trilinos_ENABLE_RTOp=OFF which was 'ON' because RTOp has a required library dependence on disabled package Teuchos but Trilinos_DISABLE_ENABLED_FORWARD_DEP_PACKAGES=ON!"
+ "Final set of enabled packages: 0"
+ "Trilinos_NUM_ENABLED_PACKAGES=0: Exiting the script!"
+ )
+# NOTE: The above test ensures that disabled packages turn off explicitly
+# enabled downstream packages.
+
+
+CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE(
+ EnableTeuchosRTOp_DisableRTOp
+ ARGS Trilinos_PACKAGES="Teuchos,RTOp" Trilinos_EXCLUDE_PACKAGES=RTOp
+ PASS_REGULAR_EXPRESSION_ALL
+ "Disabling excluded package RTOp ..."
+ "Enabling explicitly set package Teuchos ..."
+ "NOT enabling explicitly set package RTOp since it was explicitly excluded"
+ "Explicitly enabled packages on input .by user.: Teuchos 1"
+ "Final set of enabled packages: Teuchos 1"
+ "Trilinos_NUM_ENABLED_PACKAGES=1: Configuring packages!"
+ )
+# NOTE: The above test ensures that disabled packages turn off explicitly
+# enabled downstream packages.
+
+
+CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE(
+ EnableTeuchos_DisableTPLBLAS
+ ARGS Trilinos_PACKAGES=Teuchos Trilinos_EXCLUDE_TPLS=BLAS
+ PASS_REGULAR_EXPRESSION_ALL
+ "Explicitly enabled packages on input .by user.: Teuchos 1"
+ "Explicitly disabled TPLs on input .by user or by default.: BLAS 1"
+ "WARNING: Setting Trilinos_ENABLE_Teuchos=OFF which was 'ON' because Teuchos has a required library dependence on disabled TPL BLAS but Trilinos_DISABLE_ENABLED_FORWARD_DEP_PACKAGES=ON!"
+ "Final set of enabled packages: 0"
+ "Trilinos_NUM_ENABLED_PACKAGES=0: Exiting the script!"
+ )
+# NOTE: The above test ensures that disabled TPLS turn off explicitly
+# enabled downstream packages.
+
+
+CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE(
+ EnableThyra
+ ARGS Trilinos_PACKAGES=Thyra Trilinos_ENABLE_KNOWN_EXTERNAL_REPOS_TYPE=Experimental
+ PASS_REGULAR_EXPRESSION_ALL
+ "Final set of enabled packages: Teuchos RTOp Epetra Zoltan Triutils Tpetra EpetraExt Thyra 8"
+ "Final set of non-enabled packages: TrilinosFramework Shards Stokhos Sacado Isorropia AztecOO Galeri Amesos Intrepid Ifpack ML Belos Stratimikos RBGen Phalanx Panzer 16"
+ "Processing current package Teuchos: libs='ON', tests=''"
+ "CONFIGURE_OPTIONS = '-DTrilinos_TRIBITS_DIR=.+-DCTEST_USE_LAUNCHERS:BOOL=1.-DTrilinos_ENABLE_ALL_OPTIONAL_PACKAGES:BOOL=ON.-DTrilinos_WARNINGS_AS_ERRORS_FLAGS:STRING=-DummyErrFlags.-DTrilinos_ALLOW_NO_PACKAGES:BOOL=ON.-DTrilinos_DISABLE_ENABLED_FORWARD_DEP_PACKAGES=ON.-DTrilinos_ENABLE_SECONDARY_TESTED_CODE:BOOL=OFF.-DTrilinos_EXTRAREPOS_FILE:STRING=.+/examples/MockTrilinos/cmake/ExtraRepositoriesList.cmake.-DTrilinos_IGNORE_MISSING_EXTRA_REPOSITORIES:BOOL=ON.-DTrilinos_ENABLE_KNOWN_EXTERNAL_REPOS_TYPE:STRING=Experimental.-DTrilinos_ENABLE_TESTS:BOOL=.-DTrilinos_ENABLE_Teuchos:BOOL=ON'"
+ "Processing current package Epetra: libs='ON', tests=''"
+ "Processing current package Thyra: libs='ON', tests='ON'"
+ "CONFIGURE_OPTIONS = '-DTrilinos_TRIBITS_DIR=.+-DCTEST_USE_LAUNCHERS:BOOL=1.-DTrilinos_ENABLE_ALL_OPTIONAL_PACKAGES:BOOL=ON.-DTrilinos_WARNINGS_AS_ERRORS_FLAGS:STRING=-DummyErrFlags.-DTrilinos_ALLOW_NO_PACKAGES:BOOL=ON.-DTrilinos_DISABLE_ENABLED_FORWARD_DEP_PACKAGES=ON.-DTrilinos_ENABLE_SECONDARY_TESTED_CODE:BOOL=OFF.-DTrilinos_EXTRAREPOS_FILE:STRING=.+/examples/MockTrilinos/cmake/ExtraRepositoriesList.cmake.-DTrilinos_IGNORE_MISSING_EXTRA_REPOSITORIES:BOOL=ON.-DTrilinos_ENABLE_KNOWN_EXTERNAL_REPOS_TYPE:STRING=Experimental.-DTrilinos_ENABLE_TESTS:BOOL=ON.-DTrilinos_ENABLE_EpetraExt:BOOL=.-DTrilinos_ENABLE_Thyra:BOOL=ON'"
+ )
+# NOTE: The above test pins down the form of the configure options passed to
+# different package configures to make sure everything in there.
+
+
+CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE(
+ EnableEpetraThyra_NoProcessImplicitlyEnabled
+ ARGS Trilinos_PACKAGES=Epetra,Thyra
+ CTEST_EXPLICITLY_ENABLE_IMPLICITLY_ENABLED_PACKAGES=OFF
+ PASS_REGULAR_EXPRESSION_ALL
+ "Final set of enabled packages: Teuchos RTOp Epetra Zoltan Triutils Tpetra EpetraExt Thyra 8"
+ "Final set of packages to be explicitly processed by CTest/CDash: Epetra Thyra 2"
+ "0. Processing current package Epetra: libs=.ON., tests=.ON."
+ "1. Processing current package Thyra: libs=.ON., tests=.ON."
+ )
+# NOTE: The above test shows that ony
+
+
+CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE(
+ EnableThyra_ExcludeEpetra
+ ARGS Trilinos_PACKAGES=Thyra Trilinos_EXCLUDE_PACKAGES=Epetra
+ PASS_REGULAR_EXPRESSION_ALL
+ "Explicitly enabled packages on input .* Thyra 1"
+ "Explicitly disabled packages on input .* Epetra Stokhos 2"
+ "Final set of enabled packages: Teuchos RTOp Tpetra Thyra 4"
+ "Final set of non-enabled packages: TrilinosFramework Epetra Zoltan Shards Triutils EpetraExt Stokhos Sacado Isorropia AztecOO Galeri Amesos Intrepid Ifpack ML Belos Stratimikos RBGen Phalanx Panzer 20"
+ "Processing current package Teuchos: libs='ON', tests=''"
+ "Processing current package Thyra: libs='ON', tests='ON'"
+ )
+
+
+CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE(
+ EnableAll_EnablePhalanx
+ ARGS Trilinos_ADDITIONAL_PACKAGES=Phalanx
+ PASS_REGULAR_EXPRESSION_ALL
+ "Enabling explicitly set package Phalanx"
+ "Explicitly enabled packages on input .* Phalanx 1"
+ "Explicitly disabled packages on input .* Stokhos 1"
+ "Enabling all SE packages that are not currently disabled because of Trilinos_ENABLE_ALL_PACKAGES=ON"
+ "Final set of enabled packages: TrilinosFramework Teuchos RTOp Epetra Zoltan Shards Triutils Tpetra EpetraExt Sacado Thyra Isorropia AztecOO Galeri Amesos Intrepid Ifpack ML Stratimikos RBGen Phalanx 21"
+ "Final set of non-enabled packages: Stokhos Belos Panzer 3"
+ "Processing current package RBGen: libs='ON', tests='ON'"
+ "Processing current package Phalanx: libs='ON', tests='ON'"
+ )
+
+
+CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE(
+ EnableAll_EnableStokhos
+ ARGS Trilinos_ADDITIONAL_PACKAGES=Stokhos
+ PASS_REGULAR_EXPRESSION_ALL
+ "Enabling explicitly set package Stokhos which was default or otherwise disabed!"
+ "Explicitly enabled packages on input .* Stokhos 1"
+ "Explicitly disabled packages on input .* 0"
+ "Enabling all SE packages that are not currently disabled because of Trilinos_ENABLE_ALL_PACKAGES=ON"
+ "Final set of enabled packages: TrilinosFramework Teuchos RTOp Epetra Zoltan Shards Triutils Tpetra EpetraExt Stokhos Thyra Isorropia AztecOO Galeri Amesos Intrepid Ifpack ML Stratimikos RBGen 20"
+ "Final set of non-enabled packages: Sacado Belos Phalanx Panzer 4"
+ "Processing current package Stokhos: libs='ON', tests='ON'"
+ "Processing current package RBGen: libs='ON', tests='ON'"
+ )
+
+
+CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE(
+ EnableAllSecondaryTested_EnableStokhos
+ ARGS Trilinos_ENABLE_SECONDARY_TESTED_CODE=ON Trilinos_ADDITIONAL_PACKAGES=Stokhos
+ PASS_REGULAR_EXPRESSION_ALL
+ "Enabling explicitly set package Stokhos"
+ "Explicitly enabled packages on input .* Stokhos 1"
+ "Explicitly disabled packages on input .* 0"
+ "Enabling all SE packages that are not currently disabled because of Trilinos_ENABLE_ALL_PACKAGES=ON"
+ "Final set of enabled packages: TrilinosFramework Teuchos RTOp Epetra Zoltan Shards Triutils Tpetra EpetraExt Stokhos Sacado Thyra Isorropia AztecOO Galeri Amesos Intrepid Ifpack ML Belos Stratimikos RBGen Phalanx Panzer 24"
+ "Final set of non-enabled packages: 0"
+ "Processing current package Stokhos: libs='ON', tests='ON'"
+ "Processing current package RBGen: libs='ON', tests='ON'"
+ "Processing current package Phalanx: libs='ON', tests='ON'"
+ )
+
+
+CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE(
+ CI_EnableAllSecondaryTestedOff
+ ARGS Trilinos_ENABLE_SECONDARY_TESTED_CODE=OFF Trilinos_ENABLE_KNOWN_EXTERNAL_REPOS_TYPE=Continuous
+ PASS_REGULAR_EXPRESSION_ALL
+ "EXECUTE_PROCESS.+git.+preCopyrightTrilinos.+preCopyrightTrilinos.fetch.out"
+ "Explicitly enabled packages on input .* 0"
+ "Explicitly disabled packages on input .* Stokhos Stalix 2"
+ "Enabling all SE packages that are not currently disabled because of Trilinos_ENABLE_ALL_PACKAGES=ON"
+ "WARNING: Not Setting Trilinos_ENABLE_Belos=ON even though Stratimikos has an optional dependence on Belos because Trilinos_ENABLE_SECONDARY_TESTED_CODE=OFF"
+ "Final set of enabled packages: TrilinosFramework Teuchos RTOp Epetra Zoltan Shards Triutils Tpetra EpetraExt Thyra Isorropia AztecOO Galeri Amesos Intrepid Ifpack ML Stratimikos RBGen 19"
+ "Final set of packages to be explicitly processed by CTest/CDash: TrilinosFramework Teuchos RTOp Epetra Zoltan Shards Triutils Tpetra EpetraExt Thyra Isorropia AztecOO Galeri Amesos Intrepid Ifpack ML Stratimikos RBGen 19"
+ "Final set of non-enabled packages: Stokhos Sacado Belos Phalanx Panzer Teko Stalix 7"
+ "CONFIGURE_OPTIONS.+Trilinos_ENABLE_SECONDARY_TESTED_CODE:BOOL=OFF.+-DTrilinos_ENABLE_KNOWN_EXTERNAL_REPOS_TYPE:STRING=Continuous.+"
+ "Processing current package Teuchos: libs='ON', tests='ON'"
+ "CONFIGURE_OPTIONS.+Trilinos_ENABLE_Teuchos:BOOL=ON"
+ COMPARE_DEPS_FILE
+ "${CMAKE_CURRENT_SOURCE_DIR}/TrilinosPackageDependencies.Continuos.xml"
+ )
+
+
+CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE(
+ CI_EnableAllSecondaryTested
+ ARGS Trilinos_ENABLE_SECONDARY_TESTED_CODE=ON Trilinos_ENABLE_KNOWN_EXTERNAL_REPOS_TYPE=Continuous
+ PASS_REGULAR_EXPRESSION_ALL
+ "EXECUTE_PROCESS.+git.+preCopyrightTrilinos.+preCopyrightTrilinos.fetch.out"
+ "Explicitly enabled packages on input .* 0"
+ "Explicitly disabled packages on input .* Stokhos Stalix 2"
+ "Enabling all SE packages that are not currently disabled because of Trilinos_ENABLE_ALL_PACKAGES=ON"
+ "Final set of enabled packages: TrilinosFramework Teuchos RTOp Epetra Zoltan Shards Triutils Tpetra EpetraExt Sacado Thyra Isorropia AztecOO Galeri Amesos Intrepid Ifpack ML Belos Stratimikos RBGen Phalanx Panzer Teko 24"
+ "Final set of packages to be explicitly processed by CTest/CDash: TrilinosFramework Teuchos RTOp Epetra Zoltan Shards Triutils Tpetra EpetraExt Sacado Thyra Isorropia AztecOO Galeri Amesos Intrepid Ifpack ML Belos Stratimikos RBGen Phalanx Panzer Teko 24"
+ "Final set of non-enabled packages: Stokhos Stalix 2"
+ "CONFIGURE_OPTIONS.+Trilinos_ENABLE_SECONDARY_TESTED_CODE:BOOL=ON.+-DTrilinos_ENABLE_KNOWN_EXTERNAL_REPOS_TYPE:STRING=Continuous.+"
+ "Processing current package Teuchos: libs='ON', tests='ON'"
+ "CONFIGURE_OPTIONS.+Trilinos_ENABLE_Teuchos:BOOL=ON"
+ "Processing current package Phalanx: libs='ON', tests='ON'"
+ COMPARE_DEPS_FILE
+ "${CMAKE_CURRENT_SOURCE_DIR}/TrilinosPackageDependencies.Continuos.xml"
+ )
+
+
+# Check with an extra repo enabled and assert all of the internal logic
+CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE(
+ CI_EnableAllSecondaryTested_EnableStalix
+ ARGS Trilinos_ENABLE_SECONDARY_TESTED_CODE=ON Trilinos_ENABLE_KNOWN_EXTERNAL_REPOS_TYPE=Continuous
+ Trilinos_ADDITIONAL_PACKAGES=Stalix
+ PASS_REGULAR_EXPRESSION_ALL
+ "Explicitly enabled packages on input .* Stalix 1"
+ "Explicitly disabled packages on input .* Stokhos 1"
+ "Enabling all SE packages that are not currently disabled because of Trilinos_ENABLE_ALL_PACKAGES=ON"
+ "Final set of enabled packages: TrilinosFramework Teuchos RTOp Epetra Zoltan Shards Triutils Tpetra EpetraExt Sacado Thyra Isorropia AztecOO Galeri Amesos Intrepid Ifpack ML Belos Stratimikos RBGen Phalanx Panzer Teko Stalix 25"
+ "Final set of non-enabled packages: Stokhos 1"
+ "Processing current package Phalanx: libs='ON', tests='ON'"
+ "Processing current package Stalix: libs='ON', tests='ON'"
+ )
+
+
+# Check repo operations for an update
+CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE(
+ CI_TestGitUpdateCommands
+ ARGS Trilinos_ENABLE_SECONDARY_TESTED_CODE=ON Trilinos_ENABLE_KNOWN_EXTERNAL_REPOS_TYPE=Continuous
+ Trilinos_ADDITIONAL_PACKAGES=Stalix
+ PASS_REGULAR_EXPRESSION_ALL
+ "preCopyrightTrilinos: Doing GIT update from URL 'url1:/git/preCopyrightTrilinos' to dir '.*/MockTrilinos/preCopyrightTrilinos'"
+ "EXECUTE_PROCESS.COMMAND./somebasedir/git[;]clean[;]-fdx[;]WORKING_DIRECTORY[;].*/MockTrilinos/preCopyrightTrilinos.OUTPUT_FILE[;].*/test/ctest_driver/MockCTestDriver/TriBITS_MockCTestDriver_CI_TestGitUpdateCommands/preCopyrightTrilinos.clean.out."
+ "EXECUTE_PROCESS.COMMAND./somebasedir/git[;]reset[;]--hard[;]HEAD[;]WORKING_DIRECTORY[;].*/MockTrilinos/preCopyrightTrilinos.OUTPUT_FILE[;].*/test/ctest_driver/MockCTestDriver/TriBITS_MockCTestDriver_CI_TestGitUpdateCommands/preCopyrightTrilinos.reset.out."
+ "EXECUTE_PROCESS.COMMAND./somebasedir/git[;]fetch[;]origin[;]TIMEOUT[;]600[;]WORKING_DIRECTORY[;].*/MockTrilinos/preCopyrightTrilinos.OUTPUT_FILE[;].*/test/ctest_driver/MockCTestDriver/TriBITS_MockCTestDriver_CI_TestGitUpdateCommands/preCopyrightTrilinos.fetch.out."
+ "EXECUTE_PROCESS.COMMAND./somebasedir/git[;]reset[;]--hard[;]tracking/branch[;]WORKING_DIRECTORY[;].*/MockTrilinos/preCopyrightTrilinos.OUTPUT_FILE[;].*/test/ctest_driver/MockCTestDriver/TriBITS_MockCTestDriver_CI_TestGitUpdateCommands/preCopyrightTrilinos.set_branch.out."
+ "Dakota: Doing initial GIT clone/checkout from URL 'url3:/git/Dakota' to dir 'packages/TriKota/Dakota' ..."
+ "EXECUTE_PROCESS.COMMAND[;]/somebasedir/git[;]clone[;]url3:/git/Dakota[;]packages/TriKota/Dakota[;]WORKING_DIRECTORY[;].*/tribits/examples/MockTrilinos[;]OUTPUT_FILE[;].*/TriBITS_MockCTestDriver_CI_TestGitUpdateCommands/Dakota.clone.out"
+ "EXECUTE_PROCESS.COMMAND[;]/somebasedir/git[;]clean[;]-fdx[;]WORKING_DIRECTORY[;].*/MockTrilinos/packages/TriKota/Dakota[;]OUTPUT_FILE[;].*/TriBITS_MockCTestDriver_CI_TestGitUpdateCommands/Dakota.clean.out"
+ "EXECUTE_PROCESS.COMMAND[;]/somebasedir/git[;]reset[;]--hard[;]HEAD[;]WORKING_DIRECTORY[;].*/MockTrilinos/packages/TriKota/Dakota[;]OUTPUT_FILE[;].*/TriBITS_MockCTestDriver_CI_TestGitUpdateCommands/Dakota.reset.out"
+ "EXECUTE_PROCESS.COMMAND[;]/somebasedir/git[;]fetch[;]origin[;]TIMEOUT[;]600[;]WORKING_DIRECTORY[;].*/MockTrilinos/packages/TriKota/Dakota[;]OUTPUT_FILE[;].*/TriBITS_MockCTestDriver_CI_TestGitUpdateCommands/Dakota.fetch.out"
+ "EXECUTE_PROCESS.COMMAND[;]/somebasedir/git[;]reset[;]--hard[;]tracking/branch[;]WORKING_DIRECTORY[;].*/MockTrilinos/packages/TriKota/Dakota[;]OUTPUT_FILE[;].*/TriBITS_MockCTestDriver_CI_TestGitUpdateCommands/Dakota.set_branch.out"
+ "Dakota: Doing initial GIT clone/checkout from URL 'url3:/git/Dakota' to dir 'packages/TriKota/Dakota' ..."
+ "EXECUTE_PROCESS.COMMAND[;].*/python.*[;].*/python_utils/gitdist[;]--dist-no-color[;]log[;]--pretty=format.*[;]--name-status[;]-C[;]ORIG_HEAD..HEAD[;]WORKING_DIRECTORY[;].*/examples/MockTrilinos[;]OUTPUT_FILE[;].*/TriBITS_MockCTestDriver_CI_TestGitUpdateCommands/Updates.txt"
+ "Adding POST extra Continuous repository preCopyrightTrilinos"
+ "Adding POST extra Continuous repository Dakota"
+ "Trilinos_NUM_PACKAGES='24'"
+ "Trilinos_NUM_TPLS='19'"
+ "Reading list of POST extra packages from .*/MockTrilinos/preCopyrightTrilinos/PackagesList.cmake"
+ "Trilinos_NUM_PACKAGES='26'"
+ "Trilinos_NUM_TPLS='20'"
+ "Skipping reading packages and TPLs for POST extra repo Dakota because marked NOPACKAGES"
+ )
+
+
+# Test repo operations for Trilinos_BRANCH=other-branch (#130)
+CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE(
+ CI_TestGitUpdateCommands_Branch
+ ARGS Trilinos_ENABLE_SECONDARY_TESTED_CODE=ON Trilinos_ENABLE_KNOWN_EXTERNAL_REPOS_TYPE=Continuous
+ Trilinos_ADDITIONAL_PACKAGES=Stalix
+ Trilinos_BRANCH=other-branch
+ PASS_REGULAR_EXPRESSION_ALL
+ "For base repo, doing switch to branch other-branch"
+ "EXECUTE_PROCESS.COMMAND[;]/somebasedir/git[;]checkout[;]-B[;]other-branch[;]--track[;]origin/other-branch[;]WORKING_DIRECTORY[;].*/MockTrilinos[;]RESULT_VARIABLE[;]GIT_CHECKOUT_RETURN_VAL[;]OUTPUT_VARIABLE[;]BRANCH_OUTPUT[;]ERROR_VARIABLE[;]BRANCH_ERROR"
+ "For extra repos, doing switch to branch other-branch"
+ "preCopyrightTrilinos: Doing GIT update from URL 'url1:/git/preCopyrightTrilinos' to dir '.*/MockTrilinos/preCopyrightTrilinos'"
+ "EXECUTE_PROCESS.COMMAND./somebasedir/git[;]clean[;]-fdx[;]WORKING_DIRECTORY[;].*/MockTrilinos/preCopyrightTrilinos.OUTPUT_FILE[;].*/test/ctest_driver/MockCTestDriver/TriBITS_MockCTestDriver_CI_TestGitUpdateCommands_Branch/preCopyrightTrilinos.clean.out."
+ "EXECUTE_PROCESS.COMMAND./somebasedir/git[;]reset[;]--hard[;]HEAD[;]WORKING_DIRECTORY[;].*/MockTrilinos/preCopyrightTrilinos.OUTPUT_FILE[;].*/test/ctest_driver/MockCTestDriver/TriBITS_MockCTestDriver_CI_TestGitUpdateCommands_Branch/preCopyrightTrilinos.reset.out."
+ "EXECUTE_PROCESS.COMMAND./somebasedir/git[;]fetch[;]origin[;]TIMEOUT[;]600[;]WORKING_DIRECTORY[;].*/MockTrilinos/preCopyrightTrilinos.OUTPUT_FILE[;].*/test/ctest_driver/MockCTestDriver/TriBITS_MockCTestDriver_CI_TestGitUpdateCommands_Branch/preCopyrightTrilinos.fetch.out."
+ "EXECUTE_PROCESS.COMMAND./somebasedir/git[;]checkout[;]-B[;]other-branch[;]--track[;]origin/other-branch[;]WORKING_DIRECTORY[;].*/MockTrilinos/preCopyrightTrilinos.OUTPUT_FILE[;].*/test/ctest_driver/MockCTestDriver/TriBITS_MockCTestDriver_CI_TestGitUpdateCommands_Branch/preCopyrightTrilinos.set_branch.out."
+ "Dakota: Doing initial GIT clone/checkout from URL 'url3:/git/Dakota' to dir 'packages/TriKota/Dakota' ..."
+ "EXECUTE_PROCESS.COMMAND[;]/somebasedir/git[;]clone[;]url3:/git/Dakota[;]packages/TriKota/Dakota[;]WORKING_DIRECTORY[;].*/tribits/examples/MockTrilinos[;]OUTPUT_FILE[;].*/TriBITS_MockCTestDriver_CI_TestGitUpdateCommands_Branch/Dakota.clone.out"
+ "EXECUTE_PROCESS.COMMAND[;]/somebasedir/git[;]clean[;]-fdx[;]WORKING_DIRECTORY[;].*/MockTrilinos/packages/TriKota/Dakota[;]OUTPUT_FILE[;].*/TriBITS_MockCTestDriver_CI_TestGitUpdateCommands_Branch/Dakota.clean.out"
+ "EXECUTE_PROCESS.COMMAND[;]/somebasedir/git[;]reset[;]--hard[;]HEAD[;]WORKING_DIRECTORY[;].*/MockTrilinos/packages/TriKota/Dakota[;]OUTPUT_FILE[;].*/TriBITS_MockCTestDriver_CI_TestGitUpdateCommands_Branch/Dakota.reset.out"
+ "EXECUTE_PROCESS.COMMAND[;]/somebasedir/git[;]fetch[;]origin[;]TIMEOUT[;]600[;]WORKING_DIRECTORY[;].*/MockTrilinos/packages/TriKota/Dakota[;]OUTPUT_FILE[;].*/TriBITS_MockCTestDriver_CI_TestGitUpdateCommands_Branch/Dakota.fetch.out"
+ "EXECUTE_PROCESS.COMMAND[;]/somebasedir/git[;]checkout[;]-B[;]other-branch[;]--track[;]origin/other-branch[;]WORKING_DIRECTORY[;].*/MockTrilinos/packages/TriKota/Dakota[;]OUTPUT_FILE[;].*/TriBITS_MockCTestDriver_CI_TestGitUpdateCommands_Branch/Dakota.set_branch.out"
+ "Adding POST extra Continuous repository preCopyrightTrilinos"
+ "Adding POST extra Continuous repository Dakota"
+ "Trilinos_NUM_PACKAGES='24'"
+ "Trilinos_NUM_TPLS='19'"
+ "Reading list of POST extra packages from .*/MockTrilinos/preCopyrightTrilinos/PackagesList.cmake"
+ "Trilinos_NUM_PACKAGES='26'"
+ "Trilinos_NUM_TPLS='20'"
+ "Skipping reading packages and TPLs for POST extra repo Dakota because marked NOPACKAGES"
+ )
+
+
+# Test repo operations Trilinos_BRANCH=other-branch, Trilinos_EXTRAREPOS_BRANCH=yet-other-branch
+CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE(
+ CI_TestGitUpdateCommands_Branch_ExtraReposBranch
+ ARGS Trilinos_ENABLE_SECONDARY_TESTED_CODE=ON Trilinos_ENABLE_KNOWN_EXTERNAL_REPOS_TYPE=Continuous
+ Trilinos_ADDITIONAL_PACKAGES=Stalix
+ Trilinos_BRANCH=other-branch Trilinos_EXTRAREPOS_BRANCH=yet-other-branch
+ PASS_REGULAR_EXPRESSION_ALL
+ "For base repo, doing switch to branch other-branch"
+ "EXECUTE_PROCESS.COMMAND[;]/somebasedir/git[;]checkout[;]-B[;]other-branch[;]--track[;]origin/other-branch[;]WORKING_DIRECTORY[;].*/MockTrilinos[;]RESULT_VARIABLE[;]GIT_CHECKOUT_RETURN_VAL[;]OUTPUT_VARIABLE[;]BRANCH_OUTPUT[;]ERROR_VARIABLE[;]BRANCH_ERROR"
+ "For extra repos, doing switch to branch yet-other-branch"
+ "preCopyrightTrilinos: Doing GIT update from URL 'url1:/git/preCopyrightTrilinos' to dir '.*/MockTrilinos/preCopyrightTrilinos'"
+ "EXECUTE_PROCESS.COMMAND./somebasedir/git[;]clean[;]-fdx[;]WORKING_DIRECTORY[;].*/MockTrilinos/preCopyrightTrilinos.OUTPUT_FILE[;].*/test/ctest_driver/MockCTestDriver/TriBITS_MockCTestDriver_CI_TestGitUpdateCommands_Branch_ExtraReposBranch/preCopyrightTrilinos.clean.out."
+ "EXECUTE_PROCESS.COMMAND./somebasedir/git[;]reset[;]--hard[;]HEAD[;]WORKING_DIRECTORY[;].*/MockTrilinos/preCopyrightTrilinos.OUTPUT_FILE[;].*/test/ctest_driver/MockCTestDriver/TriBITS_MockCTestDriver_CI_TestGitUpdateCommands_Branch_ExtraReposBranch/preCopyrightTrilinos.reset.out."
+ "EXECUTE_PROCESS.COMMAND./somebasedir/git[;]fetch[;]origin[;]TIMEOUT[;]600[;]WORKING_DIRECTORY[;].*/MockTrilinos/preCopyrightTrilinos.OUTPUT_FILE[;].*/test/ctest_driver/MockCTestDriver/TriBITS_MockCTestDriver_CI_TestGitUpdateCommands_Branch_ExtraReposBranch/preCopyrightTrilinos.fetch.out."
+ "EXECUTE_PROCESS.COMMAND./somebasedir/git[;]checkout[;]-B[;]yet-other-branch[;]--track[;]origin/yet-other-branch[;]WORKING_DIRECTORY[;].*/MockTrilinos/preCopyrightTrilinos.OUTPUT_FILE[;].*/test/ctest_driver/MockCTestDriver/TriBITS_MockCTestDriver_CI_TestGitUpdateCommands_Branch_ExtraReposBranch/preCopyrightTrilinos.set_branch.out."
+ "Dakota: Doing initial GIT clone/checkout from URL 'url3:/git/Dakota' to dir 'packages/TriKota/Dakota' ..."
+ "EXECUTE_PROCESS.COMMAND[;]/somebasedir/git[;]clone[;]url3:/git/Dakota[;]packages/TriKota/Dakota[;]WORKING_DIRECTORY[;].*/tribits/examples/MockTrilinos[;]OUTPUT_FILE[;].*/TriBITS_MockCTestDriver_CI_TestGitUpdateCommands_Branch_ExtraReposBranch/Dakota.clone.out"
+ "EXECUTE_PROCESS.COMMAND[;]/somebasedir/git[;]clean[;]-fdx[;]WORKING_DIRECTORY[;].*/MockTrilinos/packages/TriKota/Dakota[;]OUTPUT_FILE[;].*/TriBITS_MockCTestDriver_CI_TestGitUpdateCommands_Branch_ExtraReposBranch/Dakota.clean.out"
+ "EXECUTE_PROCESS.COMMAND[;]/somebasedir/git[;]reset[;]--hard[;]HEAD[;]WORKING_DIRECTORY[;].*/MockTrilinos/packages/TriKota/Dakota[;]OUTPUT_FILE[;].*/TriBITS_MockCTestDriver_CI_TestGitUpdateCommands_Branch_ExtraReposBranch/Dakota.reset.out"
+ "EXECUTE_PROCESS.COMMAND[;]/somebasedir/git[;]fetch[;]origin[;]TIMEOUT[;]600[;]WORKING_DIRECTORY[;].*/MockTrilinos/packages/TriKota/Dakota[;]OUTPUT_FILE[;].*/TriBITS_MockCTestDriver_CI_TestGitUpdateCommands_Branch_ExtraReposBranch/Dakota.fetch.out"
+ "EXECUTE_PROCESS.COMMAND[;]/somebasedir/git[;]checkout[;]-B[;]yet-other-branch[;]--track[;]origin/yet-other-branch[;]WORKING_DIRECTORY[;].*/MockTrilinos/packages/TriKota/Dakota[;]OUTPUT_FILE[;].*/TriBITS_MockCTestDriver_CI_TestGitUpdateCommands_Branch_ExtraReposBranch/Dakota.set_branch.out"
+ "Adding POST extra Continuous repository preCopyrightTrilinos"
+ "Adding POST extra Continuous repository Dakota"
+ "Trilinos_NUM_PACKAGES='24'"
+ "Trilinos_NUM_TPLS='19'"
+ "Reading list of POST extra packages from .*/MockTrilinos/preCopyrightTrilinos/PackagesList.cmake"
+ "Trilinos_NUM_PACKAGES='26'"
+ "Trilinos_NUM_TPLS='20'"
+ "Skipping reading packages and TPLs for POST extra repo Dakota because marked NOPACKAGES"
+ )
+
+
+CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE(
+ Nightly_EnableAllSecondaryTested
+ ARGS Trilinos_ENABLE_SECONDARY_TESTED_CODE=ON Trilinos_ENABLE_KNOWN_EXTERNAL_REPOS_TYPE=Nightly
+ PASS_REGULAR_EXPRESSION_ALL
+ "EXECUTE_PROCESS.+git.+preCopyrightTrilinos.+preCopyrightTrilinos.fetch.out"
+ "EXECUTE_PROCESS.+git.+extraTrilinosRepo.+extraTrilinosRepo.fetch.out"
+ "Explicitly enabled packages on input .* 0"
+ "Explicitly disabled packages on input .* Stokhos Stalix 2"
+ "Enabling all SE packages that are not currently disabled because of Trilinos_ENABLE_ALL_PACKAGES=ON"
+ "Final set of enabled packages: TrilinosFramework Teuchos RTOp Epetra Zoltan Shards Triutils Tpetra EpetraExt Sacado Thyra Isorropia AztecOO Galeri Amesos Intrepid Ifpack ML Belos Stratimikos RBGen Phalanx Panzer Teko ExtraPack 25"
+ "Final set of non-enabled packages: Stokhos Stalix 2"
+ "Trilinos_NUM_ENABLED_PACKAGES=25: Configuring packages!"
+ "Processing current package ExtraPack: libs='ON', tests='ON'"
+ "Configuring TRIBITS_PACKAGE='ExtraPack'"
+ )
+
+
+CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE(
+ PreExtraRepos_ExtraReposFile
+ ARGS
+ Trilinos_EXTRAREPOS_FILE="${CMAKE_CURRENT_SOURCE_DIR}/../../core/DependencyUnitTests/PreAndExtraRepositoriesList.cmake"
+ Trilinos_ENABLE_KNOWN_EXTERNAL_REPOS_TYPE=Continuous
+ Trilinos_ENABLE_SECONDARY_TESTED_CODE=ON
+ PASS_REGULAR_EXPRESSION_ALL
+ "-- Adding PRE extra Continuous repository preRepoOnePackage"
+ "-- Adding POST extra Continuous repository preCopyrightTrilinos"
+ "-- Adding POST extra Continuous repository Dakota"
+ "preRepoOnePackage: Doing GIT update from URL .url1:/git/preRepoOnePackage. to dir ..*/MockTrilinos/preRepoOnePackage."
+ "-- Trilinos_PRE_REPOSITORIES=.preRepoOnePackage."
+ "-- Trilinos_EXTRA_REPOSITORIES=.preCopyrightTrilinos[;]Dakota."
+ "Reading list of PRE extra packages from .*/MockTrilinos/preRepoOnePackage/PackagesList.cmake"
+ "Final set of enabled packages: preRepoOnePackage TrilinosFramework Teuchos .* Teko"
+ "Processing current package preRepoOnePackage: libs=.ON., tests=.ON."
+ "CONFIGURE_OPTIONS = ..*-DTrilinos_EXTRAREPOS_FILE:STRING=.*/DependencyUnitTests/PreAndExtraRepositoriesList.cmake.*-DTrilinos_ENABLE_preRepoOnePackage:BOOL=ON."
+ )
+
+
+CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE(
+ PreExtraRepos_ExtraReposFile_ExtraReposList
+ ARGS
+ Trilinos_EXTRAREPOS_FILE="${CMAKE_CURRENT_SOURCE_DIR}/../../core/DependencyUnitTests/PreAndExtraRepositoriesList.cmake"
+ Trilinos_PRE_REPOSITORIES=preRepoOnePackage
+ Trilinos_EXTRA_REPOSITORIES=preCopyrightTrilinos,extraTrilinosRepo,Dakota
+ Trilinos_ENABLE_KNOWN_EXTERNAL_REPOS_TYPE=Nightly
+ Trilinos_ENABLE_SECONDARY_TESTED_CODE=ON
+ PASS_REGULAR_EXPRESSION_ALL
+ "-- Adding PRE extra Continuous repository preRepoOnePackage"
+ "-- Adding POST extra Continuous repository preCopyrightTrilinos"
+ "-- Adding POST extra Nightly repository extraTrilinosRepo"
+ "-- Adding POST extra Continuous repository Dakota"
+ "-- Trilinos_PRE_REPOSITORIES=.preRepoOnePackage."
+ "-- Trilinos_EXTRA_REPOSITORIES=.preCopyrightTrilinos,extraTrilinosRepo,Dakota."
+ "Reading list of PRE extra packages from .*/MockTrilinos/preRepoOnePackage/PackagesList.cmake"
+ "Reading list of native packages from .*/MockTrilinos/PackagesList.cmake"
+ "Reading list of POST extra packages from .*/preCopyrightTrilinos/PackagesList.cmake"
+ "Reading list of POST extra packages from .*/extraTrilinosRepo/PackagesList.cmake"
+ "Skipping reading packages and TPLs for POST extra repo Dakota because marked NOPACKAGES"
+ "Final set of enabled packages: preRepoOnePackage TrilinosFramework Teuchos .* Teko"
+ "Processing current package preRepoOnePackage: libs=.ON., tests=.ON."
+ "CONFIGURE_OPTIONS = ..*-DTrilinos_EXTRAREPOS_FILE:STRING=.*/DependencyUnitTests/PreAndExtraRepositoriesList.cmake.*-DTrilinos_ENABLE_preRepoOnePackage:BOOL=ON."
+ )
+
+
+CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE(
+ PreExtraRepos_ExtraReposFile_ExtraReposListPartial
+ ARGS
+ Trilinos_EXTRAREPOS_FILE="${CMAKE_CURRENT_SOURCE_DIR}/../../core/DependencyUnitTests/PreAndExtraRepositoriesList.cmake"
+ Trilinos_PRE_REPOSITORIES=
+ Trilinos_EXTRA_REPOSITORIES=preCopyrightTrilinos,Dakota
+ Trilinos_ENABLE_KNOWN_EXTERNAL_REPOS_TYPE=Nightly
+ Trilinos_ENABLE_SECONDARY_TESTED_CODE=ON
+ PASS_REGULAR_EXPRESSION_ALL
+ "-- Adding PRE extra Continuous repository preRepoOnePackage"
+ "-- Adding POST extra Continuous repository preCopyrightTrilinos"
+ "-- Adding POST extra Continuous repository Dakota"
+ "-- Trilinos_PRE_REPOSITORIES=.preRepoOnePackage."
+ "-- Trilinos_EXTRA_REPOSITORIES=.preCopyrightTrilinos,Dakota."
+ "Reading list of PRE extra packages from .*/MockTrilinos/preRepoOnePackage/PackagesList.cmake"
+ "Reading list of native packages from .*/MockTrilinos/PackagesList.cmake"
+ "Reading list of POST extra packages from .*/preCopyrightTrilinos/PackagesList.cmake"
+ "Skipping reading packages and TPLs for POST extra repo Dakota because marked NOPACKAGES"
+ "Final set of enabled packages: preRepoOnePackage TrilinosFramework Teuchos .* Teko"
+ "Processing current package preRepoOnePackage: libs=.ON., tests=.ON."
+ "CONFIGURE_OPTIONS = ..*-DTrilinos_EXTRAREPOS_FILE:STRING=.*/DependencyUnitTests/PreAndExtraRepositoriesList.cmake.*-DTrilinos_ENABLE_preRepoOnePackage:BOOL=ON."
+ )
+
+# ToDo: Add subset!
+
+
+#
+# Test enable logic based on modified files/packages
+#
+
+
+IF (PYTHON_EXECUTABLE)
+
+ CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE(
+ CI_EnableOnlyModified_ModifiedNone
+ COPY_FILES
+ ${CMAKE_CURRENT_SOURCE_DIR}/modifiedFiles.empty.txt modifiedFiles.txt
+ ${CMAKE_CURRENT_SOURCE_DIR}/modifiedFiles.empty.txt modifiedFiles.preCopyrightTrilinos.txt
+ ARGS Trilinos_ENABLE_SECONDARY_TESTED_CODE=ON
+ CTEST_TEST_TYPE=Continuous CTEST_ENABLE_MODIFIED_PACKAGES_ONLY=ON
+ PASS_REGULAR_EXPRESSION_ALL
+ "Final set of enabled packages: 0"
+ "Trilinos_NUM_ENABLED_PACKAGES=0: Exiting the script"
+ SKIP_STANDARD_DEPS_CHECK
+ )
+
+
+ CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE(
+ CI_EnableOnlyModified_ModifiedTeuchos
+ COPY_FILES
+ ${CMAKE_CURRENT_SOURCE_DIR}/modifiedFiles.Teuchos.txt modifiedFiles.txt
+ ${CMAKE_CURRENT_SOURCE_DIR}/modifiedFiles.empty.txt modifiedFiles.preCopyrightTrilinos.txt
+ ARGS Trilinos_ENABLE_SECONDARY_TESTED_CODE=ON
+ CTEST_TEST_TYPE=Continuous CTEST_ENABLE_MODIFIED_PACKAGES_ONLY=ON
+ CTEST_UPDATE_RETURN_VAL=1
+ PASS_REGULAR_EXPRESSION_ALL
+ "Directly modified or failing non-disabled packages that need to be tested: Teuchos 1"
+ "Explicitly enabled packages on input .* Teuchos 1"
+ "Final set of enabled packages: Teuchos RTOp Epetra Zoltan Shards Triutils Tpetra EpetraExt Sacado Thyra Isorropia AztecOO Galeri Amesos Intrepid Ifpack ML Belos Stratimikos RBGen Phalanx Panzer Teko 23"
+ "Final set of non-enabled packages: TrilinosFramework Stokhos Stalix 3"
+ "CTEST_UPDATE.+ returned '1'"
+ "Processing current package Teuchos: libs='ON', tests='ON'"
+ "Processing current package Teko: libs='ON', tests='ON'"
+ )
+
+
+ CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE(
+ CI_Nightly_EnableOnlyModified_ModifiedTeuchos
+ COPY_FILES
+ ${CMAKE_CURRENT_SOURCE_DIR}/modifiedFiles.Teuchos.txt modifiedFiles.txt
+ ${CMAKE_CURRENT_SOURCE_DIR}/modifiedFiles.empty.txt modifiedFiles.preCopyrightTrilinos.txt
+ ${CMAKE_CURRENT_SOURCE_DIR}/modifiedFiles.empty.txt modifiedFiles.extraTrilinosRepo.txt
+ ARGS Trilinos_ENABLE_SECONDARY_TESTED_CODE=ON
+ CTEST_TEST_TYPE=Continuous CTEST_ENABLE_MODIFIED_PACKAGES_ONLY=ON
+ CTEST_START_WITH_EMPTY_BINARY_DIRECTORY=TRUE
+ Trilinos_ENABLE_KNOWN_EXTERNAL_REPOS_TYPE=Nightly
+ CTEST_UPDATE_RETURN_VAL=1
+ PASS_REGULAR_EXPRESSION_ALL
+ "Directly modified or failing non-disabled packages that need to be tested: Teuchos 1"
+ "Explicitly enabled packages on input .* Teuchos 1"
+ "Final set of enabled packages: Teuchos RTOp Epetra Zoltan Shards Triutils Tpetra EpetraExt Sacado Thyra Isorropia AztecOO Galeri Amesos Intrepid Ifpack ML Belos Stratimikos RBGen Phalanx Panzer Teko ExtraPack 24"
+ "Final set of non-enabled packages: TrilinosFramework Stokhos Stalix 3"
+ "CTEST_UPDATE.+ returned '1'"
+ "Processing current package Teuchos: libs='ON', tests='ON'"
+ "CONFIGURE_OPTIONS.+Trilinos_ENABLE_Teuchos:BOOL=ON"
+ "Processing current package Zoltan: libs='ON', tests=''"
+ "Processing current package Teko: libs='ON', tests='ON'"
+ "Processing current package ExtraPack: libs='ON', tests='ON'"
+ )
+
+
+ CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE(
+ CI_EnableOnlyModified_ModifiedThyra_NoEnableImplictlyEnabled
+ COPY_FILES
+ ${CMAKE_CURRENT_SOURCE_DIR}/modifiedFiles.Thyra.txt modifiedFiles.txt
+ ${CMAKE_CURRENT_SOURCE_DIR}/modifiedFiles.empty.txt modifiedFiles.preCopyrightTrilinos.txt
+ ${CMAKE_CURRENT_SOURCE_DIR}/modifiedFiles.empty.txt modifiedFiles.extraTrilinosRepo.txt
+ ARGS Trilinos_ENABLE_SECONDARY_TESTED_CODE=ON
+ CTEST_TEST_TYPE=Continuous CTEST_ENABLE_MODIFIED_PACKAGES_ONLY=ON
+ CTEST_START_WITH_EMPTY_BINARY_DIRECTORY=FALSE
+ CTEST_UPDATE_RETURN_VAL=1
+ PASS_REGULAR_EXPRESSION_ALL
+ "Directly modified or failing non-disabled packages that need to be tested: Thyra 1"
+ "Explicitly enabled packages on input .* Thyra 1"
+ "Final set of enabled packages: Teuchos RTOp Epetra Zoltan Shards Triutils Tpetra EpetraExt Sacado Thyra Isorropia AztecOO Galeri Amesos Intrepid Ifpack ML Belos Stratimikos Phalanx Panzer Teko 22"
+ "Final set of non-enabled packages: TrilinosFramework Stokhos RBGen Stalix 4"
+ "Final set of packages to be explicitly processed by CTest/CDash: Thyra Stratimikos Panzer Teko 4"
+ "CTEST_UPDATE.+ returned '1'"
+ "Processing current package Thyra: libs='ON', tests='ON'"
+ "CONFIGURE_OPTIONS.+Trilinos_ENABLE_Thyra:BOOL=ON"
+ "Processing current package Teko: libs='ON', tests='ON'"
+ )
+
+
+ CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE(
+ CI_EnableOnlyModified_ModifiedThyraCoreLibs_NoEnableImplictlyEnabled
+ COPY_FILES
+ ${CMAKE_CURRENT_SOURCE_DIR}/modifiedFiles.ThyraCoreLibs.txt modifiedFiles.txt
+ ${CMAKE_CURRENT_SOURCE_DIR}/modifiedFiles.empty.txt modifiedFiles.preCopyrightTrilinos.txt
+ ${CMAKE_CURRENT_SOURCE_DIR}/modifiedFiles.empty.txt modifiedFiles.extraTrilinosRepo.txt
+ ARGS Trilinos_ENABLE_SECONDARY_TESTED_CODE=ON
+ CTEST_TEST_TYPE=Continuous CTEST_ENABLE_MODIFIED_PACKAGES_ONLY=ON
+ CTEST_START_WITH_EMPTY_BINARY_DIRECTORY=FALSE
+ CTEST_UPDATE_RETURN_VAL=1
+ PASS_REGULAR_EXPRESSION_ALL
+ "Directly modified or failing non-disabled packages that need to be tested: ThyraCoreLibs 1"
+ "Explicitly enabled packages on input .* 0"
+ "Explicitly enabled SE packages on input .* ThyraCoreLibs 1"
+ "Final set of enabled packages: Teuchos RTOp Epetra Zoltan Shards Triutils Tpetra EpetraExt Sacado Thyra Isorropia AztecOO Galeri Amesos Intrepid Ifpack ML Belos Stratimikos Phalanx Panzer Teko 22"
+ "Final set of non-enabled packages: TrilinosFramework Stokhos RBGen Stalix 4"
+ "Final set of packages to be explicitly processed by CTest/CDash: Thyra Stratimikos Panzer Teko 4"
+ "CTEST_UPDATE.+ returned '1'"
+ "Processing current package Thyra: libs='ON', tests='ON'"
+ "CONFIGURE_OPTIONS.+Trilinos_ENABLE_Thyra:BOOL=ON"
+ "Processing current package Teko: libs='ON', tests='ON'"
+ )
+
+
+ CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE(
+ CI_EnableOnlyModified_ModifiedTeko
+ COPY_FILES
+ ${CMAKE_CURRENT_SOURCE_DIR}/modifiedFiles.empty.txt modifiedFiles.txt
+ ${CMAKE_CURRENT_SOURCE_DIR}/modifiedFiles.Teko.txt modifiedFiles.preCopyrightTrilinos.txt
+ ARGS Trilinos_ENABLE_SECONDARY_TESTED_CODE=ON
+ CTEST_TEST_TYPE=Continuous CTEST_ENABLE_MODIFIED_PACKAGES_ONLY=ON
+ CTEST_START_WITH_EMPTY_BINARY_DIRECTORY=TRUE
+ CTEST_UPDATE_RETURN_VAL=0 # Main update returns nothing for the main Trilinos repo!
+ PASS_REGULAR_EXPRESSION_ALL
+ "Directly modified or failing non-disabled packages that need to be tested: Teko 1"
+ "Explicitly enabled packages on input .* Teko 1"
+ "Final set of enabled packages: Teuchos RTOp Epetra Zoltan Triutils Tpetra EpetraExt Thyra Isorropia AztecOO Galeri Amesos Ifpack ML Belos Stratimikos Teko 17"
+ "Final set of non-enabled packages: TrilinosFramework Shards Stokhos Sacado Intrepid RBGen Phalanx Panzer Stalix 9"
+ "CTEST_UPDATE.+ returned '0'"
+ "Processing current package Teuchos: libs='ON', tests=''"
+ "CONFIGURE_OPTIONS.+Trilinos_ENABLE_Teuchos:BOOL=ON"
+ "Processing current package Teko: libs='ON', tests='ON'"
+ )
+ # NOTE: The above unit test is critical because it shows that Teko will get
+ # enabled and processed even though the main git update of the main Trilinos
+ # repo returns no updated files. This ensures that if only extra repo
+ # packages get modified then they will get picked up in CI testing and
+ # processed correctly.
+
+
+ CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE(
+ CI_EnableOnlyModified_ModifiedTeko_OnlyPrimaryTestedCode
+ COPY_FILES
+ ${CMAKE_CURRENT_SOURCE_DIR}/modifiedFiles.empty.txt modifiedFiles.txt
+ ${CMAKE_CURRENT_SOURCE_DIR}/modifiedFiles.Teko.txt modifiedFiles.preCopyrightTrilinos.txt
+ ARGS Trilinos_ENABLE_SECONDARY_TESTED_CODE=OFF
+ CTEST_TEST_TYPE=Continuous CTEST_ENABLE_MODIFIED_PACKAGES_ONLY=ON
+ CTEST_START_WITH_EMPTY_BINARY_DIRECTORY=TRUE
+ CTEST_UPDATE_RETURN_VAL=0 # Main update returns nothing for the main Trilinos repo!
+ PASS_REGULAR_EXPRESSION_ALL
+ "-- MODIFIED_PACKAGES_LIST='Teko'"
+ "NOT enabling modified ST package: Teko"
+ "Directly modified or failing non-disabled packages that need to be tested: 0"
+ "Explicitly enabled packages on input .by user.: 0"
+ "Final set of enabled packages: 0"
+ "Directly modified or failing non-disabled packages that need to be tested: 0"
+ "Trilinos_NUM_ENABLED_PACKAGES=0: Exiting the script"
+ )
+ # NOTE: The above test ensures that if an ST package is changed but only PT
+ # packages are enabled, then it will not be enabled.
+
+
+ CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE(
+ CI_EnableOnlyModified_ModifiedTeuchosTeko
+ COPY_FILES
+ ${CMAKE_CURRENT_SOURCE_DIR}/modifiedFiles.Teuchos.txt modifiedFiles.txt
+ ${CMAKE_CURRENT_SOURCE_DIR}/modifiedFiles.Teko.txt modifiedFiles.preCopyrightTrilinos.txt
+ ARGS Trilinos_ENABLE_SECONDARY_TESTED_CODE=ON
+ CTEST_TEST_TYPE=Continuous CTEST_ENABLE_MODIFIED_PACKAGES_ONLY=ON
+ CTEST_UPDATE_RETURN_VAL=2
+ PASS_REGULAR_EXPRESSION_ALL
+ "MODIFIED_PACKAGES_LIST='Teuchos.Teko'"
+ "Enabling modified package: Teuchos"
+ "Enabling modified package: Teko"
+ "Directly modified or failing non-disabled packages that need to be tested: Teuchos Teko 2"
+ "Explicitly enabled packages on input .* Teuchos Teko 2"
+ "Final set of enabled packages: Teuchos RTOp Epetra Zoltan Shards Triutils Tpetra EpetraExt Sacado Thyra Isorropia AztecOO Galeri Amesos Intrepid Ifpack ML Belos Stratimikos RBGen Phalanx Panzer Teko 23"
+ "Final set of non-enabled packages: TrilinosFramework Stokhos Stalix 3"
+ "CTEST_UPDATE.+ returned '2'"
+ "Processing current package Teuchos: libs='ON', tests='ON'"
+ "CONFIGURE_OPTIONS.+Trilinos_ENABLE_Teuchos:BOOL=ON"
+ "Processing current package Teko: libs='ON', tests='ON'"
+ "CONFIGURE_OPTIONS.+Trilinos_ENABLE_Teko:BOOL=ON"
+ )
+
+
+ CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE(
+ CI_EnableOnlyModified_ModifiedStokhosStalix_FailedNone
+ COPY_FILES
+ ${CMAKE_CURRENT_SOURCE_DIR}/modifiedFiles.Stokhos.txt modifiedFiles.txt
+ ${CMAKE_CURRENT_SOURCE_DIR}/modifiedFiles.Stalix.txt modifiedFiles.preCopyrightTrilinos.txt
+ ${CMAKE_CURRENT_SOURCE_DIR}/failedPackages.none.txt failedPackages.txt
+ ARGS Trilinos_ENABLE_SECONDARY_TESTED_CODE=ON
+ CTEST_TEST_TYPE=Continuous CTEST_ENABLE_MODIFIED_PACKAGES_ONLY=ON
+ CTEST_UPDATE_RETURN_VAL=1
+ PASS_REGULAR_EXPRESSION_ALL
+ "MODIFIED_PACKAGES_LIST='Stokhos.Stalix'"
+ "FAILING_PACKAGES_LIST=''"
+ "Not enabling explicitly disabled modified package: Stokhos"
+ "Not enabling explicitly disabled modified package: Stalix"
+ "Directly modified or failing non-disabled packages that need to be tested: 0"
+ "Explicitly enabled packages on input .* 0"
+ "Explicitly disabled packages on input .* Stokhos Stalix 2"
+ "Final set of enabled packages: 0"
+ "Final set of non-enabled packages: TrilinosFramework Teuchos RTOp Epetra Zoltan Shards Triutils Tpetra EpetraExt Stokhos Sacado Thyra Isorropia AztecOO Galeri Amesos Intrepid Ifpack ML Belos Stratimikos RBGen Phalanx Panzer Teko Stalix 26"
+ "Trilinos_NUM_ENABLED_PACKAGES=0: Exiting the script!"
+ )
+
+
+ CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE(
+ CI_EnableOnlyModified_ModifiedTeko_FailedThyraRBGen
+ COPY_FILES
+ ${CMAKE_CURRENT_SOURCE_DIR}/modifiedFiles.empty.txt modifiedFiles.txt
+ ${CMAKE_CURRENT_SOURCE_DIR}/modifiedFiles.Teko.txt modifiedFiles.preCopyrightTrilinos.txt
+ ${CMAKE_CURRENT_SOURCE_DIR}/failedPackages.Thyra.RBGen.txt failedPackages.txt
+ ARGS Trilinos_ENABLE_SECONDARY_TESTED_CODE=ON
+ CTEST_TEST_TYPE=Continuous CTEST_ENABLE_MODIFIED_PACKAGES_ONLY=ON
+ CTEST_UPDATE_RETURN_VAL=0 # Main update returns nothing for the main Trilinos repo!
+ PASS_REGULAR_EXPRESSION_ALL
+ "MODIFIED_PACKAGES_LIST='Teko'"
+ "FAILING_PACKAGES_LIST='Thyra.RBGen'"
+ "Enabling modified package: Teko"
+ "Enabling previously failing package: Thyra"
+ "Enabling previously failing package: RBGen"
+ "Directly modified or failing non-disabled packages that need to be tested: Thyra RBGen Teko 3"
+ "Explicitly enabled packages on input .* Thyra RBGen Teko 3"
+ "Explicitly disabled packages on input .* Stokhos Stalix 2"
+ "Final set of enabled packages: Teuchos RTOp Epetra Zoltan Shards Triutils Tpetra EpetraExt Sacado Thyra Isorropia AztecOO Galeri Amesos Intrepid Ifpack ML Belos Stratimikos RBGen Phalanx Panzer Teko 23"
+ "Final set of non-enabled packages: TrilinosFramework Stokhos Stalix 3"
+ "Final set of packages to be explicitly processed by CTest/CDash: Thyra Stratimikos RBGen Panzer Teko 5"
+ "CTEST_UPDATE.+ returned '0'"
+ "Processing current package Thyra: libs='ON', tests='ON'"
+ "Processing current package RBGen: libs='ON', tests='ON'"
+ "Processing current package Teko: libs='ON', tests='ON'"
+ )
+
+
+ CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE(
+ CI_AAO_EnableOnlyModified_ModifiedTeko_FailedAllPackages
+ COPY_FILES
+ ${CMAKE_CURRENT_SOURCE_DIR}/modifiedFiles.empty.txt modifiedFiles.txt
+ ${CMAKE_CURRENT_SOURCE_DIR}/modifiedFiles.Teko.txt modifiedFiles.preCopyrightTrilinos.txt
+ ${CMAKE_CURRENT_SOURCE_DIR}/failedPackages.ALL_PACKAGES.txt failedPackages.txt
+ ARGS Trilinos_ENABLE_SECONDARY_TESTED_CODE=ON
+ Trilinos_CTEST_DO_ALL_AT_ONCE=TRUE
+ CTEST_TEST_TYPE=Continuous
+ CTEST_ENABLE_MODIFIED_PACKAGES_ONLY=ON
+ CTEST_UPDATE_RETURN_VAL=0 # Main update returns nothing for the main Trilinos repo!
+ PASS_REGULAR_EXPRESSION_ALL
+ "MODIFIED_PACKAGES_LIST='Teko'"
+ "FAILING_PACKAGES_LIST='ALL_PACKAGES'"
+ "Enabling modified package: Teko"
+ "Enabling previously failing ALL_PACKAGES"
+ "Directly modified or failing non-disabled packages that need to be tested: ALL_PACKAGES"
+ "Explicitly enabled packages on input .* Teko 1"
+ "Explicitly disabled packages on input .* Stokhos Stalix 2"
+ "Enabling all SE packages that are not currently disabled because of Trilinos_ENABLE_ALL_PACKAGES=ON .Trilinos_ENABLE_SECONDARY_TESTED_CODE=ON."
+ "Final set of non-enabled packages: Stokhos Stalix 2"
+ "Final set of packages to be explicitly processed by CTest/CDash: TrilinosFramework Teuchos RTOp Epetra Zoltan Shards Triutils Tpetra EpetraExt Sacado Thyra Isorropia AztecOO Galeri Amesos Intrepid Ifpack ML Belos Stratimikos RBGen Phalanx Panzer Teko 24"
+ "CTEST_UPDATE.[.][.][.]. returned '0'"
+ "Configure, build, test, and submit results for Trilinos packages"
+ "CONFIGURE_OPTIONS = '-DTrilinos_TRIBITS_DIR=.*[;]-DTrilinos_ENABLE_ALL_PACKAGES=ON[;]-DTrilinos_ENABLE_TESTS:BOOL=ON'"
+ "Skipping actual ctest_configure.. because CTEST_DEPENDENCY_HANDLING_UNIT_TESTING='ON'"
+ "Skipping build because CTEST_DEPENDENCY_HANDLING_UNIT_TESTING='ON'"
+ "Skipping testing because CTEST_DEPENDENCY_HANDLING_UNIT_TESTING='ON'"
+ "Done with the all-at-once configure, build, test, ans submit of Trilinos packages"
+ "TRIBITS_CTEST_DRIVER: OVERALL: ALL PASSSED"
+ )
+ # NOTE: The above test is for the all-at-once appraoch that checks for the
+ # ALL_PACKAGES value in failedPackages.txt. That value can be returned from
+ # a configure failure in a previous all-at-once CI build. This test makes
+ # sure that all packages will get enabled in the follow-up CI iteration in
+ # that case.
+
+
+ CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE(
+ CI_EnableOnlyModified_ModifiedNone_FailedTeko_OnlyPrimaryStableCode
+ COPY_FILES
+ ${CMAKE_CURRENT_SOURCE_DIR}/modifiedFiles.empty.txt modifiedFiles.txt
+ ${CMAKE_CURRENT_SOURCE_DIR}/modifiedFiles.empty.txt modifiedFiles.preCopyrightTrilinos.txt
+ ${CMAKE_CURRENT_SOURCE_DIR}/failedPackages.Teko.txt failedPackages.txt
+ ARGS Trilinos_ENABLE_SECONDARY_TESTED_CODE=OFF
+ CTEST_TEST_TYPE=Continuous CTEST_ENABLE_MODIFIED_PACKAGES_ONLY=ON
+ CTEST_UPDATE_RETURN_VAL=0 # Main update returns nothing for the main Trilinos repo!
+ PASS_REGULAR_EXPRESSION_ALL
+ "MODIFIED_PACKAGES_LIST=''"
+ "FAILING_PACKAGES_LIST='Teko'"
+ "NOT enabling previously failing ST package: Teko"
+ "Directly modified or failing non-disabled packages that need to be tested: 0"
+ "Explicitly enabled packages on input .* 0"
+ "Final set of enabled packages: 0"
+ "Final set of packages to be explicitly processed by CTest/CDash: 0"
+ "Trilinos_NUM_ENABLED_PACKAGES=0: Exiting the script"
+ )
+
+
+ CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE(
+ CI_EnableOnlyModified_ModifiedNone_FailedThyraRBGen
+ COPY_FILES
+ ${CMAKE_CURRENT_SOURCE_DIR}/modifiedFiles.empty.txt modifiedFiles.txt
+ ${CMAKE_CURRENT_SOURCE_DIR}/modifiedFiles.empty.txt modifiedFiles.preCopyrightTrilinos.txt
+ ${CMAKE_CURRENT_SOURCE_DIR}/failedPackages.Thyra.RBGen.txt failedPackages.txt
+ ARGS Trilinos_ENABLE_SECONDARY_TESTED_CODE=ON
+ CTEST_TEST_TYPE=Continuous CTEST_ENABLE_MODIFIED_PACKAGES_ONLY=ON
+ CTEST_UPDATE_RETURN_VAL=0 # Main update returns nothing for the main Trilinos repo!
+ PASS_REGULAR_EXPRESSION_ALL
+ "CTEST_UPDATE.+ returned '0'"
+ "MODIFIED_PACKAGES_LIST=''"
+ "FAILING_PACKAGES_LIST='Thyra.RBGen'"
+ "Enabling previously failing package: Thyra"
+ "Enabling previously failing package: RBGen"
+ "Directly modified or failing non-disabled packages that need to be tested: Thyra RBGen 2"
+ "Explicitly enabled packages on input .* Thyra RBGen 2"
+ "Final set of enabled packages: Teuchos RTOp Epetra Zoltan Shards Triutils Tpetra EpetraExt Sacado Thyra Isorropia AztecOO Galeri Amesos Intrepid Ifpack ML Belos Stratimikos RBGen Phalanx Panzer Teko 23"
+ )
+
+
+ CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE(
+ CI_EnableOnlyModified_ModifiedNone_FailedStokhosStalix
+ COPY_FILES
+ ${CMAKE_CURRENT_SOURCE_DIR}/modifiedFiles.empty.txt modifiedFiles.txt
+ ${CMAKE_CURRENT_SOURCE_DIR}/modifiedFiles.empty.txt modifiedFiles.preCopyrightTrilinos.txt
+ ${CMAKE_CURRENT_SOURCE_DIR}/failedPackages.Stokhos.Stalix.txt failedPackages.txt
+ ARGS Trilinos_ENABLE_SECONDARY_TESTED_CODE=ON
+ CTEST_TEST_TYPE=Continuous CTEST_ENABLE_MODIFIED_PACKAGES_ONLY=ON
+ CTEST_UPDATE_RETURN_VAL=0 # Main update returns nothing for the main Trilinos repo!
+ PASS_REGULAR_EXPRESSION_ALL
+ "CTEST_UPDATE.+ returned '0'"
+ "MODIFIED_PACKAGES_LIST=''"
+ "FAILING_PACKAGES_LIST='Stokhos.Stalix'"
+ "Not enabling explicitly disabled previously failing package: Stokhos"
+ "Not enabling explicitly disabled previously failing package: Stalix"
+ "Directly modified or failing non-disabled packages that need to be tested: 0"
+ "Explicitly enabled packages on input .* 0"
+ "Explicitly disabled packages on input .* Stokhos Stalix 2"
+ "Final set of enabled packages: 0"
+ "Trilinos_NUM_ENABLED_PACKAGES=0: Exiting the script"
+ )
+
+
+ # ToDo: Test modified package not to be implicitly enabled to not be enabled!
+
+ENDIF(PYTHON_EXECUTABLE)
+
+#
+# Test other behavior of TribitsCTestDriverCore
+#
+
+CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE(
+ Override_MPI_EXEC_MAX_NUMPROCSS
+ ARGS Trilinos_PACKAGES=Teuchos MPI_EXEC_MAX_NUMPROCS=6
+ PASS_REGULAR_EXPRESSION_ALL
+ "Processing current package Teuchos: libs='ON', tests='ON'"
+ "CONFIGURE_OPTIONS = '.*-DMPI_EXEC_MAX_NUMPROCS:STRING=6.*'"
+ )
+
+
+# ToDo: Test ???
diff --git a/test/ctest_driver/TrilinosPackageDependencies.Continuos.xml b/test/ctest_driver/MockCTestDriver/TrilinosPackageDependencies.Continuos.xml
similarity index 99%
rename from test/ctest_driver/TrilinosPackageDependencies.Continuos.xml
rename to test/ctest_driver/MockCTestDriver/TrilinosPackageDependencies.Continuos.xml
index e4f30a02c..23daadc3b 100644
--- a/test/ctest_driver/TrilinosPackageDependencies.Continuos.xml
+++ b/test/ctest_driver/MockCTestDriver/TrilinosPackageDependencies.Continuos.xml
@@ -1,4 +1,4 @@
-
+
diff --git a/test/ctest_driver/TrilinosPackageDependencies.Trilinos.xml b/test/ctest_driver/MockCTestDriver/TrilinosPackageDependencies.Trilinos.xml
similarity index 99%
rename from test/ctest_driver/TrilinosPackageDependencies.Trilinos.xml
rename to test/ctest_driver/MockCTestDriver/TrilinosPackageDependencies.Trilinos.xml
index 647fe5cfd..6db9c6c42 100644
--- a/test/ctest_driver/TrilinosPackageDependencies.Trilinos.xml
+++ b/test/ctest_driver/MockCTestDriver/TrilinosPackageDependencies.Trilinos.xml
@@ -1,4 +1,4 @@
-
+
diff --git a/test/ctest_driver/MockCTestDriver/failedPackages.ALL_PACKAGES.txt b/test/ctest_driver/MockCTestDriver/failedPackages.ALL_PACKAGES.txt
new file mode 100644
index 000000000..f26fb003d
--- /dev/null
+++ b/test/ctest_driver/MockCTestDriver/failedPackages.ALL_PACKAGES.txt
@@ -0,0 +1 @@
+ALL_PACKAGES
diff --git a/test/ctest_driver/failedPackages.Stokhos.Stalix.txt b/test/ctest_driver/MockCTestDriver/failedPackages.Stokhos.Stalix.txt
similarity index 100%
rename from test/ctest_driver/failedPackages.Stokhos.Stalix.txt
rename to test/ctest_driver/MockCTestDriver/failedPackages.Stokhos.Stalix.txt
diff --git a/test/ctest_driver/MockCTestDriver/failedPackages.Teko.txt b/test/ctest_driver/MockCTestDriver/failedPackages.Teko.txt
new file mode 100644
index 000000000..c193bd71a
--- /dev/null
+++ b/test/ctest_driver/MockCTestDriver/failedPackages.Teko.txt
@@ -0,0 +1 @@
+Teko
diff --git a/test/ctest_driver/failedPackages.Thyra.RBGen.txt b/test/ctest_driver/MockCTestDriver/failedPackages.Thyra.RBGen.txt
similarity index 100%
rename from test/ctest_driver/failedPackages.Thyra.RBGen.txt
rename to test/ctest_driver/MockCTestDriver/failedPackages.Thyra.RBGen.txt
diff --git a/test/ctest_driver/failedPackages.none.txt b/test/ctest_driver/MockCTestDriver/failedPackages.none.txt
similarity index 100%
rename from test/ctest_driver/failedPackages.none.txt
rename to test/ctest_driver/MockCTestDriver/failedPackages.none.txt
diff --git a/test/ctest_driver/modifiedFiles.Stalix.txt b/test/ctest_driver/MockCTestDriver/modifiedFiles.Stalix.txt
similarity index 100%
rename from test/ctest_driver/modifiedFiles.Stalix.txt
rename to test/ctest_driver/MockCTestDriver/modifiedFiles.Stalix.txt
diff --git a/test/ctest_driver/modifiedFiles.Stokhos.txt b/test/ctest_driver/MockCTestDriver/modifiedFiles.Stokhos.txt
similarity index 100%
rename from test/ctest_driver/modifiedFiles.Stokhos.txt
rename to test/ctest_driver/MockCTestDriver/modifiedFiles.Stokhos.txt
diff --git a/test/ctest_driver/modifiedFiles.Teko.txt b/test/ctest_driver/MockCTestDriver/modifiedFiles.Teko.txt
similarity index 100%
rename from test/ctest_driver/modifiedFiles.Teko.txt
rename to test/ctest_driver/MockCTestDriver/modifiedFiles.Teko.txt
diff --git a/test/ctest_driver/modifiedFiles.Teuchos.txt b/test/ctest_driver/MockCTestDriver/modifiedFiles.Teuchos.txt
similarity index 100%
rename from test/ctest_driver/modifiedFiles.Teuchos.txt
rename to test/ctest_driver/MockCTestDriver/modifiedFiles.Teuchos.txt
diff --git a/test/ctest_driver/modifiedFiles.Thyra.txt b/test/ctest_driver/MockCTestDriver/modifiedFiles.Thyra.txt
similarity index 100%
rename from test/ctest_driver/modifiedFiles.Thyra.txt
rename to test/ctest_driver/MockCTestDriver/modifiedFiles.Thyra.txt
diff --git a/test/ctest_driver/modifiedFiles.ThyraCoreLibs.txt b/test/ctest_driver/MockCTestDriver/modifiedFiles.ThyraCoreLibs.txt
similarity index 100%
rename from test/ctest_driver/modifiedFiles.ThyraCoreLibs.txt
rename to test/ctest_driver/MockCTestDriver/modifiedFiles.ThyraCoreLibs.txt
diff --git a/test/ctest_driver/modifiedFiles.empty.txt b/test/ctest_driver/MockCTestDriver/modifiedFiles.empty.txt
similarity index 100%
rename from test/ctest_driver/modifiedFiles.empty.txt
rename to test/ctest_driver/MockCTestDriver/modifiedFiles.empty.txt
diff --git a/test/ctest_driver/unit_test_driver.cmake b/test/ctest_driver/MockCTestDriver/unit_test_driver.cmake
similarity index 98%
rename from test/ctest_driver/unit_test_driver.cmake
rename to test/ctest_driver/MockCTestDriver/unit_test_driver.cmake
index 45a77b307..6fc265382 100644
--- a/test/ctest_driver/unit_test_driver.cmake
+++ b/test/ctest_driver/MockCTestDriver/unit_test_driver.cmake
@@ -59,7 +59,7 @@ MESSAGE("CTEST_SCRIPT_DIRECTORY = '${CTEST_SCRIPT_DIRECTORY}'")
SET(MOCK_PROJECT_NAME Trilinos)
GET_FILENAME_COMPONENT(${MOCK_PROJECT_NAME}_TRIBITS_DIR
- "${CTEST_SCRIPT_DIRECTORY}/../../tribits" ABSOLUTE)
+ "${CTEST_SCRIPT_DIRECTORY}/../../../tribits" ABSOLUTE)
MESSAGE("${MOCK_PROJECT_NAME}_TRIBITS_DIR = '${${MOCK_PROJECT_NAME}_TRIBITS_DIR}'")
SET(TRIBITS_PROJECT_ROOT "${${MOCK_PROJECT_NAME}_TRIBITS_DIR}/examples/MockTrilinos")
diff --git a/test/ctest_driver/TribitsExampleProject/CMakeLists.txt b/test/ctest_driver/TribitsExampleProject/CMakeLists.txt
new file mode 100644
index 000000000..c547187d0
--- /dev/null
+++ b/test/ctest_driver/TribitsExampleProject/CMakeLists.txt
@@ -0,0 +1,1350 @@
+# @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
+
+
+###############################################################################
+#
+# Strong automated testing of TribitsCTestDriverCore.cmake and
+# 'dashboard' target using real TribitsExampleProject.
+#
+# The tests in this CMakeLists.txt file use the TribitsExampleProject to do
+# real testing of TribitsCTestDriverCore.cmake using real CTest -S script
+# functions and can submit to a CDash site. By default, these tests don't
+# submit to CDash. To get them to submit to CDash, you must configure this
+# TriBITS project with::
+#
+# -D${PACKAGE_NAME}_CTEST_DRIVER_SUBMIT_TO=
+#
+# where ```` is one of the following values:
+#
+# * Empty "" (the default)
+#
+# * "MY_CDASH" (submits to the default TribitsExProj project site on
+# my.cdash.org)
+#
+# * "TRILINOS_CDASH" (submits to TribitsExProj project on
+# testing.sandia.gov/cdash/)
+#
+# * "EXP_CDASH" (submits to TribitsExProj on exp.cdash.org)
+#
+# In addition, tests can also be added to test coverage testing and memory
+# testing.
+#
+# To enable the coverage testing tests (which assumes gcov and GCC), use:
+#
+# -D${PACKAGE_NAME}_CTEST_DRIVER_COVERAGE_TESTS=ON
+#
+# To enable the memory testing tests (which assumes valgrind is set up to be
+# used), use:
+#
+# -D${PACKAGE_NAME}_ENABLE_CTEST_DRIVER_MEMORY_TESTS=ON
+#
+###############################################################################
+
+SET(${PACKAGE_NAME}_CTEST_DRIVER_SUBMIT_TO ""
+ CACHE STRING
+ "Determines where CTestDriver test results are submitted to CDash (chose '' (nowhere), 'MY_CDASH', 'TRILINOS_CDASH', or 'EXP_CDASH'"
+ )
+
+SET(${PACKAGE_NAME}_CTEST_DRIVER_COVERAGE_TESTS OFF
+ CACHE BOOL
+ "Determine if coverage CTestDriver tests are run (requires gcov on local system)"
+ )
+
+SET(${PACKAGE_NAME}_CTEST_DRIVER_MEMORY_TESTS OFF
+ CACHE BOOL
+ "Determine if memory CTestDriver tests are run (requires valgrind on local system)"
+ )
+
+#
+# Set up common vars/args for all direct CTest Driver tests
+#
+
+SET(TribitsExProj_DIR "${${PROJECT_NAME}_TRIBITS_DIR}/examples/TribitsExampleProject")
+
+SET(PBP_COMMON_ENV_ARGS
+ # Set back to default
+ TribitsExProj_PACKAGES=
+ CTEST_EXPLICITLY_ENABLE_IMPLICITLY_ENABLED_PACKAGES=
+ CTEST_ENABLE_MODIFIED_PACKAGES_ONLY=OFF
+ TribitsExProj_PRE_REPOSITORIES=
+ TribitsExProj_EXTRA_REPOSITORIES=
+ # Other args
+ TribitsExProj_TRIBITS_DIR=${${PROJECT_NAME}_TRIBITS_DIR}
+ TribitsExProj_EXTRAREPOS_FILE=NONE
+ CTEST_DO_UPDATES=OFF
+ CTEST_DO_SUBMIT=OFF
+ )
+
+SET(CTEST_S_SCRIPT_ARGS
+ ${CMAKE_CTEST_COMMAND} -V -S
+ ${TribitsExProj_DIR}/cmake/ctest/general_gcc/ctest_serial_debug.cmake
+ )
+
+#
+# Set up to submit to CDash if reqeusted
+#
+
+IF ("${${PACKAGE_NAME}_CTEST_DRIVER_SUBMIT_TO}" STREQUAL "")
+ SET(${PACKAGE_NAME}_CTEST_DRIVER_SUBMIT_TO
+ $ENV{${PACKAGE_NAME}_CTEST_DRIVER_SUBMIT_TO} )
+ENDIF()
+
+IF ("${${PACKAGE_NAME}_CTEST_DRIVER_SUBMIT_TO}" STREQUAL "")
+ SET(CTEST_DROP_SITE_ENV_ARGS
+ CTEST_DO_SUBMIT=OFF
+ )
+ELSEIF (${PACKAGE_NAME}_CTEST_DRIVER_SUBMIT_TO STREQUAL "MY_CDASH")
+ SET(CTEST_DROP_SITE_ENV_ARGS CTEST_DO_SUBMIT=TRUE)
+ELSEIF (${PACKAGE_NAME}_CTEST_DRIVER_SUBMIT_TO STREQUAL "TRILINOS_CDASH")
+ SET(CTEST_DROP_SITE_ENV_ARGS
+ CTEST_DO_SUBMIT=TRUE
+ CTEST_DROP_SITE="testing.sandia.gov/cdash"
+ CTEST_PROJECT_NAME="TribitsExProj"
+ CTEST_DROP_LOCATION="/submit.php?project=TribitsExProj"
+ )
+ELSEIF (${PACKAGE_NAME}_CTEST_DRIVER_SUBMIT_TO STREQUAL "EXP_CDASH")
+ SET(CTEST_DROP_SITE_ENV_ARGS
+ CTEST_DO_SUBMIT=TRUE
+ CTEST_DROP_SITE="exp.cdash.org"
+ CTEST_PROJECT_NAME="TribitsExProj"
+ CTEST_DROP_LOCATION="/submit.php?project=TribitsExProj"
+ )
+ELSEIF (${PACKAGE_NAME}_CTEST_DRIVER_SUBMIT_TO STREQUAL "TESTING_VM_SANDIA_CDASH")
+ SET(CTEST_DROP_SITE_ENV_ARGS
+ CTEST_DO_SUBMIT=TRUE
+ CTEST_DROP_SITE="testing-vm.sandia.gov"
+ CTEST_PROJECT_NAME="TribitsExProj"
+ CTEST_DROP_LOCATION="/CDash/submit.php?project=TribitsExProj"
+ )
+ELSE()
+ MESSAGE(FATAL_ERROR "Error, the value"
+ " ${PACKAGE_NAME}_CTEST_DRIVER_SUBMIT_TO='${${PACKAGE_NAME}_CTEST_DRIVER_SUBMIT_TO}'"
+ " is invalid! Valid choices are '', 'MY_CDASH', 'TRILINOS_CDASH', 'EXP_CDASH',"
+ " and 'TESTING_VM_SANDIA_CDASH'!"
+ )
+ENDIF()
+
+IF (NOT "${${PACKAGE_NAME}_CTEST_DRIVER_SUBMIT_TO}" STREQUAL "")
+ MESSAGE(
+ "NOTE: The tests ${PACKAGE_NAME}_CTestDriver_XXX are set up to submit CDash!"
+ " (See the test details for what CDash site is being targeted!)"
+ )
+ENDIF()
+
+
+#
+# Set up arguments for direct configures of TribitsExamleProject to test the
+# 'dashboard' target.
+#
+
+INCLUDE("${CMAKE_CURRENT_LIST_DIR}/../../core/ExamplesUnitTests/GetCompilerPassthroughArgs.cmake")
+
+
+SET(CTEST_DROP_SITE_CONFIG_ARGS)
+FOREACH (CTEST_DROP_SITE_ENV_ARG ${CTEST_DROP_SITE_ENV_ARGS})
+ LIST(APPEND CTEST_DROP_SITE_CONFIG_ARGS "-D${CTEST_DROP_SITE_ENV_ARG}")
+ENDFOREACH()
+
+SET(TribitsExampleProject_COMMON_CONFIG_ARGS
+ ${COMMON_ENV_ARGS_PASSTHROUGH}
+ -DTribitsExProj_ENABLE_Fortran=${${PROJECT_NAME}_ENABLE_Fortran}
+ ${CTEST_DROP_SITE_CONFIG_ARGS}
+ )
+
+
+######################################################################
+#
+# Test package-by-package mode for TribitsCTestDriverCore.cmake
+#
+######################################################################
+
+
+TRIBITS_ADD_ADVANCED_TEST( CTestDriver_PBP_ST_ALL_PASS
+ OVERALL_WORKING_DIRECTORY TEST_NAME
+ OVERALL_NUM_MPI_PROCS 1
+ TEST_0
+ MESSAGE "Symlink TribitsExampleProject so no need to clone (which would not work)."
+ CMND ln
+ ARGS -s ${TribitsExProj_DIR} .
+ TEST_1
+ MESSAGE "Run ctest driver testing everyting but no push."
+ CMND env
+ ARGS
+ CTEST_DASHBOARD_ROOT=PWD
+ ${PBP_COMMON_ENV_ARGS}
+ TribitsExProj_ENABLE_SECONDARY_TESTED_CODE=TRUE
+ ${CTEST_DROP_SITE_ENV_ARGS}
+ CTEST_BUILD_NAME=${PACKAGE_NAME}_CTestDriver_PBP_ST_ALL_PASS
+ ${CTEST_S_SCRIPT_ARGS}
+ PASS_REGULAR_EXPRESSION_ALL
+ "NONE does not exist, skipping extra repositories"
+ "Setting TribitsExProj_ENABLE_ALL_PACKAGES=ON since TribitsExProj_PACKAGES_USER_SELECTED=''"
+ "Final set of enabled packages: SimpleCxx MixedLang WithSubpackages WrapExternal 4"
+ "Final set of enabled SE packages: SimpleCxx MixedLang WithSubpackagesA WithSubpackagesB WithSubpackagesC WithSubpackages WrapExternal"
+ "SimpleCxx: Configure passed"
+ "SimpleCxx: Libs build passed"
+ "SimpleCxx: All build passed"
+ "SimpleCxx_HelloWorldProg [.]+ +Passed"
+ "MixedLang: Configure passed"
+ "MixedLang: Libs build passed"
+ "MixedLang: All build passed"
+ "MixedLang_RayTracerTests [.]+ +Passed"
+ "WithSubpackages: Configure passed"
+ "WithSubpackages: Libs build passed"
+ "WithSubpackages: All build passed"
+ "WithSubpackagesA_test_of_a [.]+ +Passed"
+ "WithSubpackagesB_test_of_b [.]+ +Passed"
+ "WithSubpackagesC_test_of_c_util [.]+ +Passed"
+ "WithSubpackagesC_test_of_c_b_mixed_lang [.]+ +Passed"
+ "WrapExternal: Configure passed"
+ "WrapExternal: Libs build passed"
+ "WrapExternal: All build passed"
+ "WrapExternal_run_external_func [.]+ +Passed"
+ "TRIBITS_CTEST_DRIVER: OVERALL: ALL PASSSED"
+ ALWAYS_FAIL_ON_NONZERO_RETURN
+ )
+ # NOTE: The above test is the basic mode of testing everything and making
+ # sure that the configure, build, and tests all run correctly. The names of
+ # passing tests are grepped for to make sure they run and pass. And a
+ # non-zero return code is mandated.
+
+
+TRIBITS_ADD_ADVANCED_TEST( CTestDriver_PBP_GlobalConfigureFail
+ OVERALL_WORKING_DIRECTORY TEST_NAME
+ OVERALL_NUM_MPI_PROCS 1
+ TEST_0
+ MESSAGE "Copy the project dir so I can break it!"
+ CMND cp
+ ARGS -r ${TribitsExProj_DIR} .
+ TEST_1
+ MESSAGE "Break the outer configure"
+ CMND ${CMAKE_CURRENT_SOURCE_DIR}/append_file_with_line.sh
+ ARGS TribitsExampleProject/CMakeLists.txt "The outer configure is broken!"
+ TEST_2
+ MESSAGE "Run ctest driver which should show a failed configure for every package!"
+ CMND env
+ ARGS
+ CTEST_DASHBOARD_ROOT=PWD
+ ${PBP_COMMON_ENV_ARGS}
+ ${CTEST_DROP_SITE_ENV_ARGS}
+ CTEST_BUILD_NAME=${PACKAGE_NAME}_CTestDriver_PBP_GlobalConfigureFail
+ ${CTEST_S_SCRIPT_ARGS}
+ PASS_REGULAR_EXPRESSION_ALL
+ "SimpleCxx FAILED to configure"
+ "MixedLang FAILED to configure"
+ "WithSubpackages FAILED to configure"
+ "TRIBITS_CTEST_DRIVER: OVERALL: ALL FAILED"
+ "Final set packages that failed to configure or have the libraries build: 'SimpleCxx[;]MixedLang[;]WithSubpackages'"
+ ALWAYS_FAIL_ON_ZERO_RETURN
+ )
+ # NOTE: The above test ensures that a global configure failures breaks the
+ # configure for all of the packages that are tried.
+
+
+TRIBITS_ADD_ADVANCED_TEST( CTestDriver_PBP_ST_BreakConfigureOptionalPkg
+ OVERALL_WORKING_DIRECTORY TEST_NAME
+ OVERALL_NUM_MPI_PROCS 1
+ TEST_0
+ MESSAGE "Copy the project dir so I can break it!"
+ CMND cp
+ ARGS -r ${TribitsExProj_DIR} .
+ TEST_1
+ MESSAGE "Break the confgiure for just the optional MixLang package"
+ CMND ${CMAKE_CURRENT_SOURCE_DIR}/append_file_with_line.sh
+ ARGS TribitsExampleProject/packages/mixed_lang/CMakeLists.txt
+ "Configure of mixed_lang is broken!"
+ TEST_2
+ MESSAGE "Run ctest driver which should show a failed configure for just the MixedLang package!"
+ CMND env
+ ARGS
+ CTEST_DASHBOARD_ROOT=PWD
+ ${PBP_COMMON_ENV_ARGS}
+ TribitsExProj_ENABLE_SECONDARY_TESTED_CODE=TRUE
+ ${CTEST_DROP_SITE_ENV_ARGS}
+ CTEST_BUILD_NAME=${PACKAGE_NAME}_CTestDriver_PBP_ST_BreakConfigureOptionalPkg
+ ${CTEST_S_SCRIPT_ARGS}
+ PASS_REGULAR_EXPRESSION_ALL
+ "Final set of enabled SE packages: SimpleCxx MixedLang WithSubpackagesA WithSubpackagesB WithSubpackagesC WithSubpackages WrapExternal 7"
+ "SimpleCxx: Configure passed"
+ "SimpleCxx_HelloWorldProg [.]+ +Passed"
+ "MixedLang FAILED to configure"
+ "CONFIGURE_OPTIONS = '.*[;]-DTribitsExProj_ENABLE_MixedLang:BOOL=OFF[;].*[;]-DTribitsExProj_ENABLE_WithSubpackages:BOOL=ON'"
+ "WithSubpackages: Configure passed"
+ "WithSubpackagesA_test_of_a [.]+ +Passed"
+ "CONFIGURE_OPTIONS = '.*[;]-DTribitsExProj_ENABLE_MixedLang:BOOL=OFF[;].*[;]-DTribitsExProj_ENABLE_WrapExternal:BOOL=ON'"
+ "WrapExternal: Configure passed"
+ "Final set packages that failed to configure or have the libraries build: 'MixedLang'"
+ "Final set packages that had any failures: 'MixedLang'"
+ "TRIBITS_CTEST_DRIVER: OVERALL: ALL FAILED"
+ ALWAYS_FAIL_ON_ZERO_RETURN
+ )
+ # NOTE: The above test ensures that the configure failure of an upstream
+ # optional package does not break the configure, build, or tests of
+ # downstream packages. It only disables the broken upstream package in
+ # downstream packages.
+
+
+TRIBITS_ADD_ADVANCED_TEST( CTestDriver_PBP_ST_BreakBuildLibOptionalPkg
+ OVERALL_WORKING_DIRECTORY TEST_NAME
+ OVERALL_NUM_MPI_PROCS 1
+ TEST_0
+ MESSAGE "Copy the project dir so I can break it!"
+ CMND cp
+ ARGS -r ${TribitsExProj_DIR} .
+ TEST_1
+ MESSAGE "Break the library build for optional MixLang package"
+ CMND ${CMAKE_CURRENT_SOURCE_DIR}/append_file_with_line.sh
+ ARGS TribitsExampleProject/packages/mixed_lang/src/MixedLang.cpp
+ "Build mixed_lang lib is broken!"
+ TEST_2
+ MESSAGE "Run ctest driver which should show a failed libray build for just the MixedLang package!"
+ CMND env
+ ARGS
+ CTEST_DASHBOARD_ROOT=PWD
+ ${PBP_COMMON_ENV_ARGS}
+ TribitsExProj_ENABLE_SECONDARY_TESTED_CODE=TRUE
+ ${CTEST_DROP_SITE_ENV_ARGS}
+ CTEST_BUILD_NAME=${PACKAGE_NAME}_CTestDriver_PBP_ST_BreakBuildLibOptionalPkg
+ ${CTEST_S_SCRIPT_ARGS}
+ PASS_REGULAR_EXPRESSION_ALL
+ "Final set of enabled SE packages: SimpleCxx MixedLang WithSubpackagesA WithSubpackagesB WithSubpackagesC WithSubpackages WrapExternal 7"
+ "SimpleCxx: Configure passed"
+ "SimpleCxx_HelloWorldProg [.]+ +Passed"
+ "MixedLang: Configure passed"
+ "FAILED library build for package 'MixedLang'"
+ "CONFIGURE_OPTIONS = '.*[;]-DTribitsExProj_ENABLE_MixedLang:BOOL=OFF[;].*[;]-DTribitsExProj_ENABLE_WithSubpackages:BOOL=ON'"
+ "WithSubpackages: Configure passed"
+ "WithSubpackagesA_test_of_a [.]+ +Passed"
+ "CONFIGURE_OPTIONS = '.*[;]-DTribitsExProj_ENABLE_MixedLang:BOOL=OFF[;].*[;]-DTribitsExProj_ENABLE_WrapExternal:BOOL=ON'"
+ "WrapExternal: Configure passed"
+ "Final set packages that failed to configure or have the libraries build: 'MixedLang'"
+ "Final set packages that had any failures: 'MixedLang'"
+ "CMake Error at .*/TribitsCTestDriverCore.cmake"
+ "TRIBITS_CTEST_DRIVER: OVERALL: ALL FAILED"
+ ALWAYS_FAIL_ON_ZERO_RETURN
+ )
+ # NOTE: The above test ensures that the library build failure of an optional
+ # upstream package does not break downstream packages. It only disables the
+ # optional upstream package in downstream packages.
+
+
+TRIBITS_ADD_ADVANCED_TEST( CTestDriver_PBP_ST_BreakBuildAllOptionalPkg
+ OVERALL_WORKING_DIRECTORY TEST_NAME
+ OVERALL_NUM_MPI_PROCS 1
+ TEST_0
+ MESSAGE "Copy the project dir so I can break it!"
+ CMND cp
+ ARGS -r ${TribitsExProj_DIR} .
+ TEST_1
+ MESSAGE "Break a test build file only (not the library build)"
+ CMND ${CMAKE_CURRENT_SOURCE_DIR}/append_file_with_line.sh
+ ARGS TribitsExampleProject/packages/mixed_lang/test/tstRay_Tracer.cc
+ "Build mixed_lang test is broken!"
+ TEST_2
+ MESSAGE "Run ctest driver which should show a failed ALL build (but not a failed lib build) for just the MixedLang package!"
+ CMND env
+ ARGS
+ CTEST_DASHBOARD_ROOT=PWD
+ ${PBP_COMMON_ENV_ARGS}
+ TribitsExProj_ENABLE_SECONDARY_TESTED_CODE=TRUE
+ ${CTEST_DROP_SITE_ENV_ARGS}
+ CTEST_BUILD_NAME=${PACKAGE_NAME}_CTestDriver_PBP_ST_BreakBuildAllOptionalPkg
+ ${CTEST_S_SCRIPT_ARGS}
+ PASS_REGULAR_EXPRESSION_ALL
+ "Final set of enabled SE packages: SimpleCxx MixedLang WithSubpackagesA WithSubpackagesB WithSubpackagesC WithSubpackages WrapExternal 7"
+ "SimpleCxx: Configure passed"
+ "SimpleCxx_HelloWorldProg [.]+ +Passed"
+ "MixedLang: Configure passed"
+ "MixedLang: Libs build passed"
+ "MixedLang: All build FAILED"
+ "MixedLang_RayTracerTests .*[*][*][*]Not Run"
+ "WithSubpackages: Configure passed"
+ "WithSubpackagesA_test_of_a [.]+ +Passed"
+ "WithSubpackagesC_test_of_c_b_mixed_lang [.]+ +Passed"
+ "WrapExternal: Configure passed"
+ "Final set packages that had any failures: 'MixedLang'"
+ "CMake Error at .*/TribitsCTestDriverCore.cmake"
+ "TRIBITS_CTEST_DRIVER: OVERALL: ALL FAILED"
+ FAIL_REGULAR_EXPRESSION
+ "CONFIGURE_OPTIONS = '.*[;]-DTribitsExProj_ENABLE_MixedLang:BOOL=OFF[;]"
+ ALWAYS_FAIL_ON_ZERO_RETURN
+ )
+ # NOTE: The above test ensures that the ALL build failure (but not the
+ # library build failure) of an optional upstream package does not break
+ # downstream packages in any way and does not disable the upstream package.
+
+
+TRIBITS_ADD_ADVANCED_TEST( CTestDriver_PBP_ST_BreakBuildTestPkg
+ OVERALL_WORKING_DIRECTORY TEST_NAME
+ OVERALL_NUM_MPI_PROCS 1
+ TEST_0
+ MESSAGE "Copy the project dir so I can break it!"
+ CMND cp
+ ARGS -r ${TribitsExProj_DIR} .
+ TEST_1
+ MESSAGE "Break a test only (no build failure)"
+ CMND ${CMAKE_CURRENT_SOURCE_DIR}/replace_string_in_file.sh
+ ARGS TribitsExampleProject/packages/simple_cxx/test/CMakeLists.txt
+ "Hello World" "Hellos World"
+ TEST_2
+ MESSAGE "Run ctest driver which should show a test for the package SimpleCxx!"
+ CMND env
+ ARGS
+ CTEST_DASHBOARD_ROOT=PWD
+ ${PBP_COMMON_ENV_ARGS}
+ TribitsExProj_ENABLE_SECONDARY_TESTED_CODE=TRUE
+ ${CTEST_DROP_SITE_ENV_ARGS}
+ CTEST_BUILD_NAME=${PACKAGE_NAME}_CTestDriver_PBP_ST_BreakBuildTestPkg
+ ${CTEST_S_SCRIPT_ARGS}
+ PASS_REGULAR_EXPRESSION_ALL
+ "Final set of enabled SE packages: SimpleCxx MixedLang WithSubpackagesA WithSubpackagesB WithSubpackagesC WithSubpackages WrapExternal 7"
+ "SimpleCxx: Configure passed"
+ "SimpleCxx_HelloWorldTests [.]+ +Passed"
+ "SimpleCxx_HelloWorldProg [.]+[*][*][*]Failed Required regular expression not found.Regex=.Hellos World"
+ "SimpleCxx: File '.*/TriBITS_CTestDriver_PBP_ST_BreakBuildTestPkg/.*/LastTestsFailed_.*.log' exists so there were failed tests"
+ "MixedLang: All build passed"
+ "MixedLang_RayTracerTests [.]+ +Passed"
+ "WithSubpackages: All build passed"
+ "WithSubpackages: Configure passed"
+ "WithSubpackagesA_test_of_a [.]+ +Passed"
+ "WithSubpackagesC_test_of_c_b_mixed_lang [.]+ +Passed"
+ "WrapExternal: All build passed"
+ "WrapExternal_run_external_func [.]+ +Passed"
+ "Final set packages that had any failures: 'SimpleCxx'"
+ "CMake Error at .*/TribitsCTestDriverCore.cmake"
+ "TRIBITS_CTEST_DRIVER: OVERALL: ALL FAILED"
+ FAIL_REGULAR_EXPRESSION
+ "CONFIGURE_OPTIONS = '.*[;]-DTribitsExProj_ENABLE_SimpleCxx:BOOL=OFF[;]"
+ ALWAYS_FAIL_ON_ZERO_RETURN
+ )
+ # NOTE: The above test ensures that a test failure in a package is caught
+ # and reported correctly.
+
+
+TRIBITS_ADD_ADVANCED_TEST( CTestDriver_PBP_ST_BreakConfigureRequiredPkg
+ OVERALL_WORKING_DIRECTORY TEST_NAME
+ OVERALL_NUM_MPI_PROCS 1
+ TEST_0
+ MESSAGE "Copy the project dir so I can break it!"
+ CMND cp
+ ARGS -r ${TribitsExProj_DIR} .
+ TEST_1
+ MESSAGE "Break the confgiure for just the required SimpleCxx package"
+ CMND ${CMAKE_CURRENT_SOURCE_DIR}/append_file_with_line.sh
+ ARGS TribitsExampleProject/packages/simple_cxx/CMakeLists.txt
+ "Configure of SimpleCxx is broken!"
+ TEST_2
+ MESSAGE "Run ctest driver which should show a failed configure for just the SimpleCxx package!"
+ CMND env
+ ARGS
+ CTEST_DASHBOARD_ROOT=PWD
+ ${PBP_COMMON_ENV_ARGS}
+ TribitsExProj_ENABLE_SECONDARY_TESTED_CODE=TRUE
+ ${CTEST_DROP_SITE_ENV_ARGS}
+ CTEST_BUILD_NAME=${PACKAGE_NAME}_CTestDriver_PBP_ST_BreakConfigureRequiredPkg
+ ${CTEST_S_SCRIPT_ARGS}
+ PASS_REGULAR_EXPRESSION_ALL
+ "Final set of enabled SE packages: SimpleCxx MixedLang WithSubpackagesA WithSubpackagesB WithSubpackagesC WithSubpackages WrapExternal 7"
+ "SimpleCxx FAILED to configure"
+ "CONFIGURE_OPTIONS = '.*[;]-DTribitsExProj_ENABLE_SimpleCxx:BOOL=OFF[;].*[;]-DTribitsExProj_ENABLE_MixedLang:BOOL=ON'"
+ "MixedLang: Configure passed"
+ "MixedLang: Libs build passed"
+ "MixedLang_RayTracerTests [.]+ +Passed"
+ "CONFIGURE_OPTIONS = '.*[;]-DTribitsExProj_ENABLE_SimpleCxx:BOOL=OFF[;].*[;]-DTribitsExProj_ENABLE_WithSubpackages:BOOL=ON'"
+ "WithSubpackages: Configure passed"
+ "WithSubpackages: Libs build passed"
+ "WithSubpackages: All build passed"
+ "No tests were found" # Can't tell which package :-(
+ "CONFIGURE_OPTIONS = '.*[;]-DTribitsExProj_ENABLE_SimpleCxx:BOOL=OFF[;].*[;]-DTribitsExProj_ENABLE_WrapExternal:BOOL=ON'"
+ "WrapExternal: Configure passed"
+ "WrapExternal: All build passed"
+ "Final set packages that failed to configure or have the libraries build: 'SimpleCxx'"
+ "Final set packages that had any failures: 'SimpleCxx'"
+ "TRIBITS_CTEST_DRIVER: OVERALL: ALL FAILED"
+ ALWAYS_FAIL_ON_ZERO_RETURN
+ )
+ # NOTE: The above test ensures that the configure failure of an upstream
+ # optional package does not break the configure, build, or tests of
+ # downstream packages. It only disables the broken upstream package in
+ # downstream packages.
+
+
+TRIBITS_ADD_ADVANCED_TEST( CTestDriver_PBP_ST_ALL_COVERAGE
+ OVERALL_WORKING_DIRECTORY TEST_NAME
+ EXCLUDE_IF_NOT_TRUE ${PACKAGE_NAME}_CTEST_DRIVER_COVERAGE_TESTS
+ OVERALL_NUM_MPI_PROCS 1
+ TEST_0
+ MESSAGE "Symlink TribitsExampleProject so no need to clone (which would not work)."
+ CMND ln
+ ARGS -s ${TribitsExProj_DIR} .
+ TEST_1
+ MESSAGE "Run ctest driver testing everyting but no push."
+ CMND env
+ ARGS
+ CTEST_DASHBOARD_ROOT=PWD
+ ${PBP_COMMON_ENV_ARGS}
+ TribitsExProj_ENABLE_SECONDARY_TESTED_CODE=TRUE
+ CTEST_DO_COVERAGE_TESTING=TRUE
+ ${CTEST_DROP_SITE_ENV_ARGS}
+ CTEST_BUILD_NAME=${PACKAGE_NAME}_CTestDriver_PBP_ST_ALL_COVERAGE
+ ${CTEST_S_SCRIPT_ARGS}
+ PASS_REGULAR_EXPRESSION_ALL
+ "CTEST_DO_COVERAGE_TESTING='TRUE'"
+ "Loop through TribitsExProj packages to configure, build, and test"
+ "Final set of packages to be explicitly processed by CTest/CDash: SimpleCxx MixedLang WithSubpackages WrapExternal 4"
+ "Running coverage for package 'SimpleCxx'"
+ "Running coverage for package 'MixedLang'"
+ "Running coverage for package 'WithSubpackages'"
+ "Running coverage for package 'WrapExternal'"
+ "TRIBITS_CTEST_DRIVER: OVERALL: ALL PASSSED"
+ ALWAYS_FAIL_ON_NONZERO_RETURN
+ )
+ # NOTE: The above test is the only coverage test for PBP.
+
+
+TRIBITS_ADD_ADVANCED_TEST( CTestDriver_PBP_ST_ALL_MEMORY
+ OVERALL_WORKING_DIRECTORY TEST_NAME
+ EXCLUDE_IF_NOT_TRUE ${PACKAGE_NAME}_CTEST_DRIVER_MEMORY_TESTS
+ OVERALL_NUM_MPI_PROCS 1
+ TEST_0
+ MESSAGE "Symlink TribitsExampleProject so no need to clone (which would not work)."
+ CMND ln
+ ARGS -s ${TribitsExProj_DIR} .
+ TEST_1
+ MESSAGE "Run ctest driver testing everyting but no push."
+ CMND env
+ ARGS
+ CTEST_DASHBOARD_ROOT=PWD
+ ${PBP_COMMON_ENV_ARGS}
+ TribitsExProj_ENABLE_SECONDARY_TESTED_CODE=TRUE
+ CTEST_DO_MEMORY_TESTING=TRUE
+ ${CTEST_DROP_SITE_ENV_ARGS}
+ CTEST_BUILD_NAME=${PACKAGE_NAME}_CTestDriver_PBP_ST_ALL_MEMORY
+ ${CTEST_S_SCRIPT_ARGS}
+ PASS_REGULAR_EXPRESSION_ALL
+ "CTEST_DO_MEMORY_TESTING='TRUE'"
+ "Loop through TribitsExProj packages to configure, build, and test"
+ "Final set of packages to be explicitly processed by CTest/CDash: SimpleCxx MixedLang WithSubpackages WrapExternal 4"
+ "Running memory testing for package 'SimpleCxx'"
+ "MemCheck .+: SimpleCxx_HelloWorldTests [.]+ +Passed"
+ "Running memory testing for package 'MixedLang'"
+ "MemCheck .+: MixedLang_RayTracerTests [.]+ +Passed"
+ "Running memory testing for package 'WithSubpackages'"
+ "MemCheck .+: WithSubpackagesA_test_of_a [.]+ +Passed"
+ "Running memory testing for package 'WrapExternal'"
+ "MemCheck .+: WrapExternal_run_external_func [.]+ +Passed"
+ "TRIBITS_CTEST_DRIVER: OVERALL: ALL PASSSED"
+ ALWAYS_FAIL_ON_NONZERO_RETURN
+ )
+ # NOTE: The above test is the only memory test for PBP.
+
+
+TRIBITS_ADD_ADVANCED_TEST( CTestDriver_PBP_Dashboard_ST_ALL_PASS
+ OVERALL_WORKING_DIRECTORY TEST_NAME
+ OVERALL_NUM_MPI_PROCS 1
+ EXCLUDE_IF_NOT_TRUE ${PROJECT_NAME}_ENABLE_Fortran
+ TEST_0 CMND ${CMAKE_COMMAND}
+ MESSAGE "Do the initial configure"
+ ARGS
+ ${TribitsExampleProject_COMMON_CONFIG_ARGS}
+ -DTribitsExProj_TRIBITS_DIR=${${PROJECT_NAME}_TRIBITS_DIR}
+ -DTribitsExProj_ENABLE_Fortran=ON
+ -DTribitsExProj_ENABLE_ALL_PACKAGES=ON
+ -DTribitsExProj_ENABLE_TESTS=ON
+ -DTribitsExProj_ENABLE_SECONDARY_TESTED_CODE=ON
+ ${${PROJECT_NAME}_TRIBITS_DIR}/examples/TribitsExampleProject
+ PASS_REGULAR_EXPRESSION_ALL
+ "Final set of enabled SE packages: SimpleCxx MixedLang WithSubpackagesA WithSubpackagesB WithSubpackagesC WithSubpackages WrapExternal 7"
+ "Finished configuring TribitsExProj"
+ "Generating done"
+ ALWAYS_FAIL_ON_NONZERO_RETURN
+ TEST_1
+ MESSAGE "Run the dashboard target"
+ CMND env
+ ARGS
+ CTEST_BUILD_NAME=${PROJECT_NAME}_CTestDriver_PBP_Dashboard_ST_ALL_PASS
+ make dashboard
+ PASS_REGULAR_EXPRESSION_ALL
+ "Running package-by-package experimental dashboard"
+ "A[)] Clean out the list of packages"
+ "B[)] Run the dashboard command setting the list of packages"
+ "Final set of packages to be explicitly processed by CTest/CDash: SimpleCxx MixedLang WithSubpackages WrapExternal 4"
+ "Loop through TribitsExProj packages to configure, build, and test"
+ "0. Processing current package SimpleCxx: libs='ON', tests='ON'"
+ "1. Processing current package MixedLang: libs='ON', tests='ON'"
+ "2. Processing current package WithSubpackages: libs='ON', tests='ON'"
+ "3. Processing current package WrapExternal: libs='ON', tests='ON'"
+ "Done with the incremental building and testing of TribitsExProj packages"
+ "TRIBITS_CTEST_DRIVER_ERROR_QUEUE is empty. All is well."
+ "TRIBITS_CTEST_DRIVER: OVERALL: ALL PASSSED"
+ "C[)] Clean out the list of packages again to clean the cache file"
+ "D[)] Reconfigure with the original package list"
+ ALWAYS_FAIL_ON_NONZERO_RETURN
+ TEST_2
+ MESSAGE "Verify that the right set of packages are set"
+ CMND ${CMAKE_COMMAND} ARGS .
+ PASS_REGULAR_EXPRESSION_ALL
+ "Enabling all required .and optional since TribitsExProj_ENABLE_ALL_OPTIONAL_PACKAGES=ON. upstream SE packages for current set of enabled packages .TribitsExProj_ENABLE_SECONDARY_TESTED_CODE=ON."
+ "Final set of enabled packages: SimpleCxx MixedLang WithSubpackages WrapExternal 4"
+ "Generating done"
+ ALWAYS_FAIL_ON_NONZERO_RETURN
+ )
+ # The above test does a lot of checking to really pin down the behavior of
+ # the TRIBITS_CTEST_DRIVER() function run from the basic 'dashboard' target.
+ # Follow-on tests will not check so much output.
+
+
+TRIBITS_ADD_ADVANCED_TEST( CTestDriver_PBP_Dashboard_ST_PackagesSubset_PASS
+ OVERALL_WORKING_DIRECTORY TEST_NAME
+ OVERALL_NUM_MPI_PROCS 1
+ EXCLUDE_IF_NOT_TRUE ${PROJECT_NAME}_ENABLE_Fortran
+ TEST_0 CMND ${CMAKE_COMMAND}
+ MESSAGE "Do the initial configure"
+ ARGS
+ ${TribitsExampleProject_COMMON_CONFIG_ARGS}
+ -DTribitsExProj_TRIBITS_DIR=${${PROJECT_NAME}_TRIBITS_DIR}
+ -DTribitsExProj_ENABLE_Fortran=ON
+ -DTribitsExProj_ENABLE_SimpleCxx=ON
+ -DTribitsExProj_ENABLE_WrapExternal=ON
+ -DTribitsExProj_ENABLE_TESTS=ON
+ -DTribitsExProj_ENABLE_SECONDARY_TESTED_CODE=ON
+ ${${PROJECT_NAME}_TRIBITS_DIR}/examples/TribitsExampleProject
+ PASS_REGULAR_EXPRESSION_ALL
+ "Setting SimpleCxx_ENABLE_TESTS=ON"
+ "Setting WrapExternal_ENABLE_TESTS=ON"
+ "Final set of enabled SE packages: SimpleCxx MixedLang WithSubpackagesA WithSubpackages WrapExternal 5"
+ "Processing enabled package: SimpleCxx [(]Libs, Tests, Examples[)]"
+ "Processing enabled package: MixedLang [(]Libs[)]"
+ "Processing enabled package: WithSubpackages [(]A[)]"
+ "Processing enabled package: WrapExternal [(]Libs, Tests, Examples[)]"
+ "Generating done"
+ ALWAYS_FAIL_ON_NONZERO_RETURN
+ TEST_1
+ MESSAGE "Run the dashboard target"
+ CMND env
+ ARGS
+ CTEST_BUILD_NAME=${PROJECT_NAME}_CTestDriver_PBP_Dashboard_ST_PackagesSubset_PASS
+ make dashboard
+ PASS_REGULAR_EXPRESSION_ALL
+ "Final set of packages to be explicitly processed by CTest/CDash: SimpleCxx WrapExternal 2"
+ "Loop through TribitsExProj packages to configure, build, and test"
+ "0. Processing current package SimpleCxx: libs='ON', tests='ON'"
+ "1. Processing current package WrapExternal: libs='ON', tests='ON'"
+ "Done with the incremental building and testing of TribitsExProj packages"
+ "TRIBITS_CTEST_DRIVER_ERROR_QUEUE is empty. All is well."
+ "TRIBITS_CTEST_DRIVER: OVERALL: ALL PASSSED"
+ ALWAYS_FAIL_ON_NONZERO_RETURN
+ TEST_2
+ MESSAGE "Verify that the right set of packages are set"
+ CMND ${CMAKE_COMMAND} ARGS .
+ PASS_REGULAR_EXPRESSION_ALL
+ "Final set of enabled SE packages: SimpleCxx MixedLang WithSubpackagesA WithSubpackages WrapExternal 5"
+ "Processing enabled package: SimpleCxx [(]Libs, Tests, Examples[)]"
+ "Processing enabled package: MixedLang [(]Libs[)]"
+ "Processing enabled package: WithSubpackages [(]A[)]"
+ "Processing enabled package: WrapExternal [(]Libs, Tests, Examples[)]"
+ "Generating done"
+ "Generating done"
+ ALWAYS_FAIL_ON_NONZERO_RETURN
+ )
+ # The above test makes sure that TRIBITS_CTEST_DRIVER() function run from
+ # the basic 'dashboard' target only tests the explicitly enabled and tested
+ # packages. It also makes sure that when the project is reconfigured at the
+ # end, that it gives the same set of package enables.
+
+
+######################################################################
+#
+# Test all-at-once mode for TribitsCTestDriverCore.cmake
+#
+######################################################################
+
+
+FUNCTION(GENERATE_AAO_TESTS USE_NEW_AAO_CTEST_CDASH_FEATURES)
+
+ SET(TribitsExampleProject_AAO_COMMON_CONFIG_ARGS
+ ${TribitsExampleProject_COMMON_CONFIG_ARGS}
+ -DTribitsExProj_CTEST_DO_ALL_AT_ONCE=TRUE
+ )
+
+ SET( AAO_COMMON_ENV_ARGS
+ ${PBP_COMMON_ENV_ARGS}
+ TribitsExProj_CTEST_DO_ALL_AT_ONCE=TRUE
+ )
+
+ IF (USE_NEW_AAO_CTEST_CDASH_FEATURES)
+ SET(AAO_POSTFIX "P")
+ LIST(APPEND AAO_COMMON_ENV_ARGS
+ TribitsExProj_CTEST_USE_NEW_AAO_FEATURES=TRUE )
+ LIST(APPEND TribitsExampleProject_AAO_COMMON_CONFIG_ARGS
+ -DTribitsExProj_CTEST_USE_NEW_AAO_FEATURES=TRUE )
+ SET(CONFIGURE_OPTIONS_MATCH_CTEST_USE_NEW_AAO_FEATURES
+ "-DTribitsExProj_CTEST_USE_NEW_AAO_FEATURES:BOOL=TRUE[;]" )
+ ELSE()
+ SET(AAO_POSTFIX "")
+ ENDIF()
+
+ TRIBITS_ADD_ADVANCED_TEST( CTestDriver_AAO${AAO_POSTFIX}_ST_ALL_PASS
+ OVERALL_WORKING_DIRECTORY TEST_NAME
+ OVERALL_NUM_MPI_PROCS 1
+ TEST_0
+ MESSAGE "Symlink TribitsExampleProject so no need to clone (which would not work)."
+ CMND ln
+ ARGS -s ${TribitsExProj_DIR} .
+ TEST_1
+ MESSAGE "Run ctest driver testing everyting but no push."
+ CMND env
+ ARGS
+ CTEST_DASHBOARD_ROOT=PWD
+ ${AAO_COMMON_ENV_ARGS}
+ TribitsExProj_ENABLE_SECONDARY_TESTED_CODE=TRUE
+ ${CTEST_DROP_SITE_ENV_ARGS}
+ CTEST_BUILD_NAME=${PACKAGE_NAME}_CTestDriver_AAO${AAO_POSTFIX}_ST_ALL_PASS
+ ${CTEST_S_SCRIPT_ARGS}
+ PASS_REGULAR_EXPRESSION_ALL
+ "NONE does not exist, skipping extra repositories"
+ "Setting TribitsExProj_ENABLE_ALL_PACKAGES=ON since TribitsExProj_PACKAGES_USER_SELECTED=''"
+ "Final set of enabled packages: SimpleCxx MixedLang WithSubpackages WrapExternal 4"
+ "Final set of enabled SE packages: SimpleCxx MixedLang WithSubpackagesA WithSubpackagesB WithSubpackagesC WithSubpackages WrapExternal"
+ "Final set of packages to be explicitly processed by CTest/CDash: SimpleCxx MixedLang WithSubpackages WrapExternal 4"
+ "Configure, build, test and submit results all-at-once for all enabled packages"
+ "CTEST_LABELS_FOR_SUBPROJECTS='SimpleCxx[;]MixedLang[;]WithSubpackages[;]WrapExternal'"
+ "Configuring [.][.][.]"
+ "CONFIGURE_OPTIONS = '-DTribitsExProj_TRIBITS_DIR=.*/tribits[;]-DCTEST_USE_LAUNCHERS:BOOL=1[;]-DTribitsExProj_ENABLE_ALL_OPTIONAL_PACKAGES:BOOL=ON[;]-DTribitsExProj_WARNINGS_AS_ERRORS_FLAGS:STRING=[;]-DTribitsExProj_ALLOW_NO_PACKAGES:BOOL=ON[;]-DTribitsExProj_DISABLE_ENABLED_FORWARD_DEP_PACKAGES=ON[;]-DTribitsExProj_DEPS_XML_OUTPUT_FILE:FILEPATH=[;]-DTribitsExProj_ENABLE_SECONDARY_TESTED_CODE:BOOL=TRUE[;]-DTribitsExProj_EXTRAREPOS_FILE:STRING=[;]-DTribitsExProj_IGNORE_MISSING_EXTRA_REPOSITORIES:BOOL=ON[;]-DTribitsExProj_ENABLE_KNOWN_EXTERNAL_REPOS_TYPE:STRING=Continuous[;]${CONFIGURE_OPTIONS_MATCH_CTEST_USE_NEW_AAO_FEATURES}-DTribitsExProj_ENABLE_ALL_PACKAGES=ON[;]-DTribitsExProj_ENABLE_TESTS:BOOL=ON[;]-DBUILD_SHARED_LIBS:BOOL=ON[;]-DCMAKE_BUILD_TYPE=DEBUG[;]-DCMAKE_C_COMPILER=gcc[;]-DCMAKE_CXX_COMPILER=g[+][+][;]-DCMAKE_Fortran_COMPILER=gfortran[;]-DTribitsExProj_ENABLE_Fortran=ON[;]-DTribitsExProj_TRACE_ADD_TEST=ON'"
+ "Configure PASSED"
+ "Building all targets [.][.][.]"
+ "Build output: BUILD_ALL_NUM_ERRORS='0',BUILD_ALL_RETURN_VAL='0'"
+ "Build PASSED"
+ "Running tests .parallel level 1."
+ "SimpleCxx_HelloWorldTests [.]+ +Passed"
+ "SimpleCxx_HelloWorldProg [.]+ +Passed"
+ "WithSubpackagesA_test_of_a [.]+ +Passed"
+ "WithSubpackagesB_test_of_b [.]+ +Passed"
+ "WithSubpackagesC_test_of_c_util [.]+ +Passed"
+ "WithSubpackagesC_test_of_c_b_mixed_lang [.]+ +Passed"
+ "WrapExternal_run_external_func [.]+ +Passed"
+ "Skipping converage tests because CTEST_DO_COVERAGE_TESTING='FALSE'"
+ "Skipping memory testing because CTEST_DO_MEMORY_TESTING='FALSE'"
+ "File '' does NOT exist so all tests passed"
+ "TRIBITS_CTEST_DRIVER: OVERALL: ALL PASSSED"
+ ALWAYS_FAIL_ON_NONZERO_RETURN
+ )
+ # NOTE: The above test is the basic mode of testing all packages and making
+ # sure that the configure, build, and tests all run correctly for
+ # everything. The names of passing tests are grepped for to make sure they
+ # run and pass. And a non-zero return code is mandated. Also, the full
+ # CONFIGURE_OPTIONS list is checked to make sure that it does not change
+ # without being noticed. Follow-on tests will not check all of that.
+
+ TRIBITS_ADD_ADVANCED_TEST( CTestDriver_AAO${AAO_POSTFIX}_ST_SimpleCxx_PASS
+ OVERALL_WORKING_DIRECTORY TEST_NAME
+ OVERALL_NUM_MPI_PROCS 1
+ TEST_0
+ MESSAGE "Symlink TribitsExampleProject so no need to clone (which would not work)."
+ CMND ln
+ ARGS -s ${TribitsExProj_DIR} .
+ TEST_1
+ MESSAGE "Run ctest driver testing everyting but no push."
+ CMND env
+ ARGS
+ CTEST_DASHBOARD_ROOT=PWD
+ ${AAO_COMMON_ENV_ARGS}
+ TribitsExProj_ENABLE_SECONDARY_TESTED_CODE=TRUE
+ TribitsExProj_PACKAGES=SimpleCxx
+ CTEST_EXPLICITLY_ENABLE_IMPLICITLY_ENABLED_PACKAGES=FALSE
+ ${CTEST_DROP_SITE_ENV_ARGS}
+ CTEST_BUILD_NAME=${PACKAGE_NAME}_CTestDriver_AAO${AAO_POSTFIX}_ST_SimpleCxx_PASS
+ ${CTEST_S_SCRIPT_ARGS}
+ PASS_REGULAR_EXPRESSION_ALL
+ "NONE does not exist, skipping extra repositories"
+ "Setting SimpleCxx_ENABLE_TESTS=ON"
+ "Final set of enabled packages: SimpleCxx 1"
+ "Final set of enabled SE packages: SimpleCxx 1"
+ "Final set of non-enabled SE packages: MixedLang WithSubpackagesA WithSubpackagesB WithSubpackagesC WithSubpackages WrapExternal 6"
+ "Final set of packages to be explicitly processed by CTest/CDash: SimpleCxx 1"
+ "Configure, build, test and submit results all-at-once for all enabled packages"
+ "CTEST_LABELS_FOR_SUBPROJECTS='SimpleCxx'"
+ "Configuring [.][.][.]"
+ "CONFIGURE_OPTIONS = '-DTribitsExProj_TRIBITS_DIR=.*/tribits[;].+[;]${CONFIGURE_OPTIONS_MATCH_CTEST_USE_NEW_AAO_FEATURES}-DTribitsExProj_ENABLE_SimpleCxx=ON[;]-DTribitsExProj_ENABLE_TESTS:BOOL=ON[;]-DBUILD_SHARED_LIBS:BOOL=ON[;].+'"
+ "Configure PASSED"
+ "Building all targets [.][.][.]"
+ "Build output: BUILD_ALL_NUM_ERRORS='0',BUILD_ALL_RETURN_VAL='0'"
+ "Build PASSED"
+ "Running tests .parallel level 1."
+ "SimpleCxx_HelloWorldTests [.]+ +Passed"
+ "SimpleCxx_HelloWorldProg [.]+ +Passed"
+ "File '' does NOT exist so all tests passed"
+ "TRIBITS_CTEST_DRIVER: OVERALL: ALL PASSSED"
+ ALWAYS_FAIL_ON_NONZERO_RETURN
+ )
+ # NOTE: The above test enables just one package with no upstream packages
+ # at all. It should display just a single row on CDash. We can't detect
+ # that here but this submits the data so we can inspect that on CDash.
+
+ TRIBITS_ADD_ADVANCED_TEST( CTestDriver_AAO${AAO_POSTFIX}_ST_PackagesSubset_PASS
+ OVERALL_WORKING_DIRECTORY TEST_NAME
+ OVERALL_NUM_MPI_PROCS 1
+ TEST_0
+ MESSAGE "Symlink TribitsExampleProject so no need to clone (which would not work)."
+ CMND ln
+ ARGS -s ${TribitsExProj_DIR} .
+ TEST_1
+ MESSAGE "Run ctest driver testing everyting but no push."
+ CMND env
+ ARGS
+ CTEST_DASHBOARD_ROOT=PWD
+ ${AAO_COMMON_ENV_ARGS}
+ TribitsExProj_ENABLE_SECONDARY_TESTED_CODE=TRUE
+ TribitsExProj_PACKAGES=SimpleCxx,WrapExternal
+ CTEST_EXPLICITLY_ENABLE_IMPLICITLY_ENABLED_PACKAGES=FALSE
+ ${CTEST_DROP_SITE_ENV_ARGS}
+ CTEST_BUILD_NAME=${PACKAGE_NAME}_CTestDriver_AAO${AAO_POSTFIX}_ST_PackagesSubset_PASS
+ ${CTEST_S_SCRIPT_ARGS}
+ PASS_REGULAR_EXPRESSION_ALL
+ "NONE does not exist, skipping extra repositories"
+ "Setting SimpleCxx_ENABLE_TESTS=ON"
+ "Setting WrapExternal_ENABLE_TESTS=ON"
+ "Final set of enabled packages: SimpleCxx MixedLang WithSubpackages WrapExternal 4"
+ "Final set of enabled SE packages: SimpleCxx MixedLang WithSubpackagesA WithSubpackages WrapExternal 5"
+ "Final set of non-enabled SE packages: WithSubpackagesB WithSubpackagesC 2"
+ "Final set of packages to be explicitly processed by CTest/CDash: SimpleCxx WrapExternal 2"
+ "Configure, build, test and submit results all-at-once for all enabled packages"
+ "CTEST_LABELS_FOR_SUBPROJECTS='SimpleCxx[;]WrapExternal'"
+ "Configuring [.][.][.]"
+ "CONFIGURE_OPTIONS = '-DTribitsExProj_TRIBITS_DIR=.*/tribits[;].+[;]${CONFIGURE_OPTIONS_MATCH_CTEST_USE_NEW_AAO_FEATURES}-DTribitsExProj_ENABLE_SimpleCxx=ON[;]-DTribitsExProj_ENABLE_WrapExternal=ON[;]-DTribitsExProj_ENABLE_TESTS:BOOL=ON[;]-DBUILD_SHARED_LIBS:BOOL=ON[;].+'"
+ "Configure PASSED"
+ "Building all targets [.][.][.]"
+ "Build output: BUILD_ALL_NUM_ERRORS='0',BUILD_ALL_RETURN_VAL='0'"
+ "Build PASSED"
+ "Running tests .parallel level 1."
+ "SimpleCxx_HelloWorldTests [.]+ +Passed"
+ "SimpleCxx_HelloWorldProg [.]+ +Passed"
+ "WrapExternal_run_external_func [.]+ +Passed"
+ "File '' does NOT exist so all tests passed"
+ "TRIBITS_CTEST_DRIVER: OVERALL: ALL PASSSED"
+ ALWAYS_FAIL_ON_NONZERO_RETURN
+ )
+ # NOTE: The above test makes sure that requesting a subset of packages build
+ # will only enable and test that subset of packages. Any extra dependency
+ # enable/disable type of testing should be done with the much cheaper
+ # dependency testing in the file ../MockCTestDriver/CMakeLists.txt.
+
+ TRIBITS_ADD_ADVANCED_TEST( CTestDriver_AAO${AAO_POSTFIX}_GlobalConfigureFail
+ OVERALL_WORKING_DIRECTORY TEST_NAME
+ OVERALL_NUM_MPI_PROCS 1
+ TEST_0
+ MESSAGE "Copy the project dir so I can break it!"
+ CMND cp
+ ARGS -r ${TribitsExProj_DIR} .
+ TEST_1
+ MESSAGE "Break the outer configure"
+ CMND ${CMAKE_CURRENT_SOURCE_DIR}/append_file_with_line.sh
+ ARGS TribitsExampleProject/CMakeLists.txt "The outer configure is broken!"
+ TEST_2
+ MESSAGE "Run ctest driver which should show a failed configure!"
+ CMND env
+ ARGS
+ CTEST_DASHBOARD_ROOT=PWD
+ ${AAO_COMMON_ENV_ARGS}
+ ${CTEST_DROP_SITE_ENV_ARGS}
+ CTEST_BUILD_NAME=${PACKAGE_NAME}_CTestDriver_AAO${AAO_POSTFIX}_GlobalConfigureFail
+ ${CTEST_S_SCRIPT_ARGS}
+ PASS_REGULAR_EXPRESSION_ALL
+ "Configure FAILED"
+ "Skipping build because configure failed"
+ "Skipping tests because configure failed"
+ "Done with the all-at-once configure, build, test, ans submit of TribitsExProj packages"
+ "Final set packages that had any failures: 'ALL_PACKAGES'"
+ "TRIBITS_CTEST_DRIVER: OVERALL: ALL FAILED"
+ ALWAYS_FAIL_ON_ZERO_RETURN
+ TEST_3
+ MESSAGE "Make sure the failedPackages.txt file has the right contects!"
+ CMND cat
+ ARGS
+ BUILD/failedPackages.txt
+ PASS_REGULAR_EXPRESSION_ALL
+ "ALL_PACKAGES"
+ ALWAYS_FAIL_ON_NONZERO_RETURN
+ )
+ # NOTE: The above test ensures that a configure failure is correctly
+ # interpreted and processed.
+
+ TRIBITS_ADD_ADVANCED_TEST( CTestDriver_AAO${AAO_POSTFIX}_ST_PackagesSubset_GlobalConfigureFail
+ OVERALL_WORKING_DIRECTORY TEST_NAME
+ OVERALL_NUM_MPI_PROCS 1
+ TEST_0
+ MESSAGE "Copy the project dir so I can break it!"
+ CMND cp
+ ARGS -r ${TribitsExProj_DIR} .
+ TEST_1
+ MESSAGE "Break the outer configure"
+ CMND ${CMAKE_CURRENT_SOURCE_DIR}/append_file_with_line.sh
+ ARGS TribitsExampleProject/CMakeLists.txt "The outer configure is broken!"
+ TEST_2
+ MESSAGE "Run ctest driver which should show a failed configure!"
+ CMND env
+ ARGS
+ CTEST_DASHBOARD_ROOT=PWD
+ ${AAO_COMMON_ENV_ARGS}
+ TribitsExProj_ENABLE_SECONDARY_TESTED_CODE=TRUE
+ TribitsExProj_PACKAGES=SimpleCxx,WrapExternal
+ CTEST_EXPLICITLY_ENABLE_IMPLICITLY_ENABLED_PACKAGES=FALSE
+ ${CTEST_DROP_SITE_ENV_ARGS}
+ CTEST_BUILD_NAME=${PACKAGE_NAME}_CTestDriver_AAO${AAO_POSTFIX}_ST_PackagesSubset_GlobalConfigureFail
+ ${CTEST_S_SCRIPT_ARGS}
+ PASS_REGULAR_EXPRESSION_ALL
+ "Configure FAILED"
+ "Skipping build because configure failed"
+ "Skipping tests because configure failed"
+ "Done with the all-at-once configure, build, test, ans submit of TribitsExProj packages"
+ "Final set packages that had any failures: 'SimpleCxx[;]WrapExternal'"
+ "TRIBITS_CTEST_DRIVER: OVERALL: ALL FAILED"
+ ALWAYS_FAIL_ON_ZERO_RETURN
+ )
+ # NOTE: The above test ensures that a configure failure is correctly
+ # interpreted and processed.
+
+ TRIBITS_ADD_ADVANCED_TEST( CTestDriver_AAO${AAO_POSTFIX}_ST_ALL_BreakWithSubpackagesALib
+ OVERALL_WORKING_DIRECTORY TEST_NAME
+ OVERALL_NUM_MPI_PROCS 1
+ TEST_0
+ MESSAGE "Copy the project dir so I can break it!"
+ CMND cp
+ ARGS -r ${TribitsExProj_DIR} .
+ TEST_1
+ MESSAGE "Break the library build WithSubpackageA"
+ CMND ${CMAKE_CURRENT_SOURCE_DIR}/append_file_with_line.sh
+ ARGS TribitsExampleProject/packages/with_subpackages/a/A.cpp
+ "Build of A.cpp lib is broken!"
+ TEST_2
+ MESSAGE "Run ctest driver which should show a failed libray build for just the MixedLang package!"
+ CMND env
+ ARGS
+ CTEST_DASHBOARD_ROOT=PWD
+ ${AAO_COMMON_ENV_ARGS}
+ TribitsExProj_ENABLE_SECONDARY_TESTED_CODE=TRUE
+ ${CTEST_DROP_SITE_ENV_ARGS}
+ CTEST_BUILD_NAME=${PACKAGE_NAME}_CTestDriver_AAO${AAO_POSTFIX}_ST_ALL_BreakWithSubpackagesALib
+ ${CTEST_S_SCRIPT_ARGS}
+ PASS_REGULAR_EXPRESSION_ALL
+ "Final set of enabled SE packages: SimpleCxx MixedLang WithSubpackagesA WithSubpackagesB WithSubpackagesC WithSubpackages WrapExternal 7"
+ "Final set of packages to be explicitly processed by CTest/CDash: SimpleCxx MixedLang WithSubpackages WrapExternal 4"
+ "Configure PASSED"
+ "Build output: BUILD_ALL_NUM_ERRORS='2',BUILD_ALL_RETURN_VAL='0'"
+ "Build FAILED"
+ "SimpleCxx_HelloWorldTests [.]+ +Passed"
+ "SimpleCxx_HelloWorldProg [.]+ +Passed"
+ "MixedLang_RayTracerTests [.]+ +Passed"
+ "WithSubpackagesA_test_of_a [.]+[*][*][*]Not Run"
+ "WithSubpackagesB_test_of_b [.]+[*][*][*]Not Run"
+ "WithSubpackagesB_test_of_b_mixed_lang [.]+[*][*][*]Not Run"
+ "WithSubpackagesC_test_of_c_util [.]+[*][*][*]Not Run"
+ "WithSubpackagesC_test_of_c [.]+[*][*][*]Not Run"
+ "WithSubpackagesC_test_of_c_b_mixed_lang [.]+[*][*][*]Not Run"
+ "WrapExternal_run_external_func [.]+[*][*][*]Not Run"
+ "File '.+/${PACKAGE_NAME}_CTestDriver_AAO${AAO_POSTFIX}_ST_ALL_BreakWithSubpackagesALib/BUILD/Testing/Temporary/LastTestsFailed_.+.log' exists so there were non-passing tests"
+ "Final set packages that had any failures: 'WithSubpackages[;]WrapExternal'"
+ "TRIBITS_CTEST_DRIVER: OVERALL: ALL FAILED"
+ ALWAYS_FAIL_ON_ZERO_RETURN
+ TEST_3
+ MESSAGE "Make sure the failedPackages.txt file has the right contects!"
+ CMND cat
+ ARGS
+ BUILD/failedPackages.txt
+ PASS_REGULAR_EXPRESSION_ALL
+ "WithSubpackages[;]WrapExternal"
+ ALWAYS_FAIL_ON_NONZERO_RETURN
+ )
+ # NOTE: The above test ensures that the library build failure of an
+ # upstream package is detected in that package and in all all downstream
+ # packages. For CI testing it is fine if downstream package enables are
+ # triggered. Also note that the contents of the failedPackages.txt file
+ # is checked to make sure that it is getting written correctly. That is
+ # important for CI servers.
+
+ TRIBITS_ADD_ADVANCED_TEST( CTestDriver_AAO${AAO_POSTFIX}_ST_PackagesSubset_BreakWithSubpackagesALib
+ OVERALL_WORKING_DIRECTORY TEST_NAME
+ OVERALL_NUM_MPI_PROCS 1
+ TEST_0
+ MESSAGE "Copy the project dir so I can break it!"
+ CMND cp
+ ARGS -r ${TribitsExProj_DIR} .
+ TEST_1
+ MESSAGE "Break the library build WithSubpackageA"
+ CMND ${CMAKE_CURRENT_SOURCE_DIR}/append_file_with_line.sh
+ ARGS TribitsExampleProject/packages/with_subpackages/a/A.cpp
+ "Build of A.cpp lib is broken!"
+ TEST_2
+ MESSAGE "Run ctest driver which should show a failed libray build for just the MixedLang package!"
+ CMND env
+ ARGS
+ CTEST_DASHBOARD_ROOT=PWD
+ ${AAO_COMMON_ENV_ARGS}
+ TribitsExProj_ENABLE_SECONDARY_TESTED_CODE=TRUE
+ TribitsExProj_PACKAGES=SimpleCxx,WrapExternal
+ CTEST_EXPLICITLY_ENABLE_IMPLICITLY_ENABLED_PACKAGES=FALSE
+ ${CTEST_DROP_SITE_ENV_ARGS}
+ CTEST_BUILD_NAME=${PACKAGE_NAME}_CTestDriver_AAO${AAO_POSTFIX}_ST_PackagesSubset_BreakWithSubpackagesALib
+ ${CTEST_S_SCRIPT_ARGS}
+ PASS_REGULAR_EXPRESSION_ALL
+ "Final set of enabled SE packages: SimpleCxx MixedLang WithSubpackagesA WithSubpackages WrapExternal 5"
+ "Final set of packages to be explicitly processed by CTest/CDash: SimpleCxx WrapExternal 2"
+ "Configure PASSED"
+ "Build output: BUILD_ALL_NUM_ERRORS='2',BUILD_ALL_RETURN_VAL='0'"
+ "Build FAILED"
+ "SimpleCxx_HelloWorldTests [.]+ +Passed"
+ "SimpleCxx_HelloWorldProg [.]+ +Passed"
+ "WrapExternal_run_external_func [.]+[*][*][*]Not Run"
+ "File '.+/${PACKAGE_NAME}_CTestDriver_AAO${AAO_POSTFIX}_ST_PackagesSubset_BreakWithSubpackagesALib/BUILD/Testing/Temporary/LastTestsFailed_.+.log' exists so there were non-passing tests"
+ "Final set packages that had any failures: 'WrapExternal'"
+ "TRIBITS_CTEST_DRIVER: OVERALL: ALL FAILED"
+ ALWAYS_FAIL_ON_ZERO_RETURN
+ )
+ # NOTE: The above test ensures that the library build failure of an
+ # upstream package is detected as a break in all downstream packages even
+ # though that upstream package is not directly shown on CDash.
+
+ TRIBITS_ADD_ADVANCED_TEST( CTestDriver_AAO${AAO_POSTFIX}_ST_ALL_BreakSimpleCxxTestBuild
+ OVERALL_WORKING_DIRECTORY TEST_NAME
+ OVERALL_NUM_MPI_PROCS 1
+ TEST_0
+ MESSAGE "Copy the project dir so I can break it!"
+ CMND cp
+ ARGS -r ${TribitsExProj_DIR} .
+ TEST_1
+ MESSAGE "Break the build of a test only (no lib build failure)"
+ CMND ${CMAKE_CURRENT_SOURCE_DIR}/append_file_with_line.sh
+ ARGS TribitsExampleProject/packages/simple_cxx/test/SimpleCxx_HelloWorld_Tests.cpp
+ "Build of SimpleCxx_HelloWorld_Tests.cpp lib is broken!"
+ TEST_2
+ MESSAGE "Run ctest driver which should show build failure and failing test"
+ CMND env
+ ARGS
+ CTEST_DASHBOARD_ROOT=PWD
+ ${AAO_COMMON_ENV_ARGS}
+ TribitsExProj_ENABLE_SECONDARY_TESTED_CODE=TRUE
+ ${CTEST_DROP_SITE_ENV_ARGS}
+ CTEST_BUILD_NAME=${PACKAGE_NAME}_CTestDriver_AAO${AAO_POSTFIX}_ST_ALL_BreakSimpleCxxTestBuild
+ ${CTEST_S_SCRIPT_ARGS}
+ PASS_REGULAR_EXPRESSION_ALL
+ "Final set of packages to be explicitly processed by CTest/CDash: SimpleCxx MixedLang WithSubpackages WrapExternal 4"
+ "Configure PASSED"
+ "Build output: BUILD_ALL_NUM_ERRORS='2',BUILD_ALL_RETURN_VAL='0'"
+ "Build FAILED"
+ "SimpleCxx_HelloWorldTests [.]+[*][*][*]Not Run"
+ "SimpleCxx_HelloWorldProg [.]+ +Passed"
+ "WithSubpackagesA_test_of_a [.]+ +Passed"
+ "WithSubpackagesB_test_of_b [.]+ +Passed"
+ "WithSubpackagesC_test_of_c_util [.]+ +Passed"
+ "WithSubpackagesC_test_of_c_b_mixed_lang [.]+ +Passed"
+ "WrapExternal_run_external_func [.]+ +Passed"
+ "Final set packages that had any failures: 'SimpleCxx'"
+ "TRIBITS_CTEST_DRIVER: OVERALL: ALL FAILED"
+ ALWAYS_FAIL_ON_ZERO_RETURN
+ )
+ # NOTE: The above test ensures that a build failure in the test of an
+ # upstream package will be caught but will not impact break downstream
+ # packages and tests.
+
+ TRIBITS_ADD_ADVANCED_TEST( CTestDriver_AAO${AAO_POSTFIX}_ST_ALL_BreakSimpleCxxTestRun
+ OVERALL_WORKING_DIRECTORY TEST_NAME
+ OVERALL_NUM_MPI_PROCS 1
+ TEST_0
+ MESSAGE "Copy the project dir so I can break it!"
+ CMND cp
+ ARGS -r ${TribitsExProj_DIR} .
+ TEST_1
+ MESSAGE "Break a test only (no build failure)"
+ CMND ${CMAKE_CURRENT_SOURCE_DIR}/replace_string_in_file.sh
+ ARGS TribitsExampleProject/packages/simple_cxx/test/CMakeLists.txt
+ "Hello World" "Hellos World"
+ TEST_2
+ MESSAGE "Run ctest driver which should show a failed libray build for just the MixedLang package!"
+ CMND env
+ ARGS
+ CTEST_DASHBOARD_ROOT=PWD
+ ${AAO_COMMON_ENV_ARGS}
+ TribitsExProj_ENABLE_SECONDARY_TESTED_CODE=TRUE
+ ${CTEST_DROP_SITE_ENV_ARGS}
+ CTEST_BUILD_NAME=${PACKAGE_NAME}_CTestDriver_AAO${AAO_POSTFIX}_ST_ALL_BreakSimpleCxxTestRun
+ ${CTEST_S_SCRIPT_ARGS}
+ PASS_REGULAR_EXPRESSION_ALL
+ "Final set of packages to be explicitly processed by CTest/CDash: SimpleCxx MixedLang WithSubpackages WrapExternal 4"
+ "Configure PASSED"
+ "Build PASSED"
+ "SimpleCxx_HelloWorldTests [.]+ +Passed"
+ "SimpleCxx_HelloWorldProg [.]+[*][*][*]Failed"
+ "WithSubpackagesA_test_of_a [.]+ +Passed"
+ "WithSubpackagesB_test_of_b [.]+ +Passed"
+ "WithSubpackagesC_test_of_c_util [.]+ +Passed"
+ "WithSubpackagesC_test_of_c_b_mixed_lang [.]+ +Passed"
+ "WrapExternal_run_external_func [.]+ +Passed"
+ "Final set packages that had any failures: 'SimpleCxx'"
+ "TRIBITS_CTEST_DRIVER: OVERALL: ALL FAILED"
+ ALWAYS_FAIL_ON_ZERO_RETURN
+ )
+ # NOTE: The above test ensures that a runt failure in the test of an
+ # upstream package will be caught but will not impact break downstream
+ # packages and tests.
+
+ TRIBITS_ADD_ADVANCED_TEST( CTestDriver_AAO${AAO_POSTFIX}_ST_ALL_COVERAGE
+ OVERALL_WORKING_DIRECTORY TEST_NAME
+ EXCLUDE_IF_NOT_TRUE ${PACKAGE_NAME}_CTEST_DRIVER_COVERAGE_TESTS
+ OVERALL_NUM_MPI_PROCS 1
+ TEST_0
+ MESSAGE "Symlink TribitsExampleProject so no need to clone (which would not work)."
+ CMND ln
+ ARGS -s ${TribitsExProj_DIR} .
+ TEST_1
+ MESSAGE "Run ctest driver testing"
+ CMND env
+ ARGS
+ CTEST_DASHBOARD_ROOT=PWD
+ ${AAO_COMMON_ENV_ARGS}
+ TribitsExProj_ENABLE_SECONDARY_TESTED_CODE=TRUE
+ CTEST_DO_COVERAGE_TESTING=TRUE
+ ${CTEST_DROP_SITE_ENV_ARGS}
+ CTEST_BUILD_NAME=${PACKAGE_NAME}_CTestDriver_AAO${AAO_POSTFIX}_ST_ALL_COVERAGE
+ ${CTEST_S_SCRIPT_ARGS}
+ PASS_REGULAR_EXPRESSION_ALL
+ "CTEST_DO_COVERAGE_TESTING='TRUE'"
+ "Final set of packages to be explicitly processed by CTest/CDash: SimpleCxx MixedLang WithSubpackages WrapExternal 4"
+ "Configure, build, test and submit results all-at-once for all enabled packages"
+ "Gathering coverage results [.][.][.]"
+ "Performing coverage" # printed by ctest_coverage()
+ "Percentage Coverage:" # printed by ctest_coverage()
+ "Done with the all-at-once configure, build, test, ans submit of TribitsExProj packages"
+ "TRIBITS_CTEST_DRIVER_ERROR_QUEUE is empty. All is well."
+ "TRIBITS_CTEST_DRIVER: OVERALL: ALL PASSSED"
+ ALWAYS_FAIL_ON_NONZERO_RETURN
+ )
+ # NOTE: The above test is the only coverage test for AAO mode!
+
+ TRIBITS_ADD_ADVANCED_TEST( CTestDriver_AAO${AAO_POSTFIX}_ST_ALL_MEMORY
+ OVERALL_WORKING_DIRECTORY TEST_NAME
+ EXCLUDE_IF_NOT_TRUE ${PACKAGE_NAME}_CTEST_DRIVER_MEMORY_TESTS
+ OVERALL_NUM_MPI_PROCS 1
+ TEST_0
+ MESSAGE "Symlink TribitsExampleProject so no need to clone (which would not work)."
+ CMND ln
+ ARGS -s ${TribitsExProj_DIR} .
+ TEST_1
+ MESSAGE "Run ctest driver testing"
+ CMND env
+ ARGS
+ CTEST_DASHBOARD_ROOT=PWD
+ ${AAO_COMMON_ENV_ARGS}
+ TribitsExProj_ENABLE_SECONDARY_TESTED_CODE=TRUE
+ CTEST_DO_MEMORY_TESTING=TRUE
+ ${CTEST_DROP_SITE_ENV_ARGS}
+ CTEST_BUILD_NAME=${PACKAGE_NAME}_CTestDriver_AAO${AAO_POSTFIX}_ST_ALL_MEMORY
+ ${CTEST_S_SCRIPT_ARGS}
+ PASS_REGULAR_EXPRESSION_ALL
+ "CTEST_DO_MEMORY_TESTING='TRUE'"
+ "Final set of packages to be explicitly processed by CTest/CDash: SimpleCxx MixedLang WithSubpackages WrapExternal 4"
+ "Configure, build, test and submit results all-at-once for all enabled packages"
+ "Running memory tests [.][.][.]"
+ "Memory check project" # Printed by ctest_memcheck()
+ "MemCheck .+: SimpleCxx_HelloWorldTests [.]+ +Passed"
+ "MemCheck .+: MixedLang_RayTracerTests [.]+ +Passed"
+ "MemCheck .+: WithSubpackagesA_test_of_a [.]+ +Passed"
+ "MemCheck .+: WrapExternal_run_external_func [.]+ +Passed"
+ "Done with the all-at-once configure, build, test, ans submit of TribitsExProj packages"
+ "TRIBITS_CTEST_DRIVER_ERROR_QUEUE is empty. All is well."
+ "TRIBITS_CTEST_DRIVER: OVERALL: ALL PASSSED"
+ ALWAYS_FAIL_ON_NONZERO_RETURN
+ )
+ # NOTE: The above test is the only memory test for AAO mode!
+
+ TRIBITS_ADD_ADVANCED_TEST( CTestDriver_AAO${AAO_POSTFIX}_Dashboard_ST_ALL_PASS
+ OVERALL_WORKING_DIRECTORY TEST_NAME
+ OVERALL_NUM_MPI_PROCS 1
+ EXCLUDE_IF_NOT_TRUE ${PROJECT_NAME}_ENABLE_Fortran
+ TEST_0 CMND ${CMAKE_COMMAND}
+ MESSAGE "Do the initial configure"
+ ARGS
+ ${TribitsExampleProject_AAO_COMMON_CONFIG_ARGS}
+ -DTribitsExProj_TRIBITS_DIR=${${PROJECT_NAME}_TRIBITS_DIR}
+ -DTribitsExProj_ENABLE_Fortran=ON
+ -DTribitsExProj_ENABLE_ALL_PACKAGES=ON
+ -DTribitsExProj_ENABLE_TESTS=ON
+ -DTribitsExProj_ENABLE_SECONDARY_TESTED_CODE=ON
+ ${${PROJECT_NAME}_TRIBITS_DIR}/examples/TribitsExampleProject
+ PASS_REGULAR_EXPRESSION_ALL
+ "Enabling all required .and optional since TribitsExProj_ENABLE_ALL_OPTIONAL_PACKAGES=ON. upstream SE packages for current set of enabled packages .TribitsExProj_ENABLE_SECONDARY_TESTED_CODE=ON."
+ "Final set of enabled SE packages: SimpleCxx MixedLang WithSubpackagesA WithSubpackagesB WithSubpackagesC WithSubpackages WrapExternal 7"
+ "Finished configuring TribitsExProj"
+ "Generating done"
+ ALWAYS_FAIL_ON_NONZERO_RETURN
+ TEST_1
+ MESSAGE "Run the dashboard target"
+ CMND env
+ ARGS
+ CTEST_BUILD_NAME=${PROJECT_NAME}_CTestDriver_AAO${AAO_POSTFIX}_Dashboard_ST_ALL_PASS
+ make dashboard
+ PASS_REGULAR_EXPRESSION_ALL
+ "Running all-at-once experimental dashboard"
+ "Final set of packages to be explicitly processed by CTest/CDash: SimpleCxx MixedLang WithSubpackages WrapExternal 4"
+ "Configure, build, test and submit results all-at-once for all enabled packages"
+ "CTEST_LABELS_FOR_SUBPROJECTS='SimpleCxx[;]MixedLang[;]WithSubpackages[;]WrapExternal'"
+ "TRIBITS_CTEST_DRIVER: OVERALL: ALL PASSSED"
+ ALWAYS_FAIL_ON_NONZERO_RETURN
+ TEST_2
+ MESSAGE "Verify that the right set of packages are set"
+ CMND ${CMAKE_COMMAND} ARGS .
+ PASS_REGULAR_EXPRESSION_ALL
+ "Enabling all required .and optional since TribitsExProj_ENABLE_ALL_OPTIONAL_PACKAGES=ON. upstream SE packages for current set of enabled packages .TribitsExProj_ENABLE_SECONDARY_TESTED_CODE=ON."
+ "Final set of enabled packages: SimpleCxx MixedLang WithSubpackages WrapExternal 4"
+ "Generating done"
+ ALWAYS_FAIL_ON_NONZERO_RETURN
+ )
+
+ TRIBITS_ADD_ADVANCED_TEST( CTestDriver_AAO${AAO_POSTFIX}_Dashboard_ST_SimpleCxx_PASS
+ OVERALL_WORKING_DIRECTORY TEST_NAME
+ OVERALL_NUM_MPI_PROCS 1
+ EXCLUDE_IF_NOT_TRUE ${PROJECT_NAME}_ENABLE_Fortran
+ TEST_0 CMND ${CMAKE_COMMAND}
+ MESSAGE "Do the initial configure"
+ ARGS
+ ${TribitsExampleProject_AAO_COMMON_CONFIG_ARGS}
+ -DTribitsExProj_TRIBITS_DIR=${${PROJECT_NAME}_TRIBITS_DIR}
+ -DTribitsExProj_ENABLE_Fortran=ON
+ -DTribitsExProj_ENABLE_SimpleCxx=ON
+ -DTribitsExProj_ENABLE_TESTS=ON
+ -DTribitsExProj_ENABLE_SECONDARY_TESTED_CODE=ON
+ ${${PROJECT_NAME}_TRIBITS_DIR}/examples/TribitsExampleProject
+ PASS_REGULAR_EXPRESSION_ALL
+ "Setting SimpleCxx_ENABLE_TESTS=ON"
+ "Final set of enabled SE packages: SimpleCxx 1"
+ "Processing enabled package: SimpleCxx [(]Libs, Tests, Examples[)]"
+ "Generating done"
+ ALWAYS_FAIL_ON_NONZERO_RETURN
+ TEST_1
+ MESSAGE "Run the dashboard target"
+ CMND env
+ ARGS
+ CTEST_BUILD_NAME=${PROJECT_NAME}_CTestDriver_AAO${AAO_POSTFIX}_Dashboard_ST_SimpleCxx_PASS
+ make dashboard
+ PASS_REGULAR_EXPRESSION_ALL
+ "Configure, build, test and submit results all-at-once for all enabled packages"
+ "Final set of packages to be explicitly processed by CTest/CDash: SimpleCxx 1"
+ "CTEST_LABELS_FOR_SUBPROJECTS='SimpleCxx'"
+ "TRIBITS_CTEST_DRIVER_ERROR_QUEUE is empty. All is well."
+ "TRIBITS_CTEST_DRIVER: OVERALL: ALL PASSSED"
+ ALWAYS_FAIL_ON_NONZERO_RETURN
+ TEST_2
+ MESSAGE "Verify that the right set of packages are set"
+ CMND ${CMAKE_COMMAND} ARGS .
+ PASS_REGULAR_EXPRESSION_ALL
+ "Final set of enabled SE packages: SimpleCxx 1"
+ "Processing enabled package: SimpleCxx [(]Libs, Tests, Examples[)]"
+ "Generating done"
+ "Generating done"
+ ALWAYS_FAIL_ON_NONZERO_RETURN
+ )
+ # The above test should result in a single row on CDash for the build.
+ # This local checking here can't determine that but it uploads the data on
+ # CDash where it can be inspected.
+
+ TRIBITS_ADD_ADVANCED_TEST( CTestDriver_AAO${AAO_POSTFIX}_Dashboard_ST_PackagesSubset_PASS
+ OVERALL_WORKING_DIRECTORY TEST_NAME
+ OVERALL_NUM_MPI_PROCS 1
+ EXCLUDE_IF_NOT_TRUE ${PROJECT_NAME}_ENABLE_Fortran
+ TEST_0 CMND ${CMAKE_COMMAND}
+ MESSAGE "Do the initial configure"
+ ARGS
+ ${TribitsExampleProject_AAO_COMMON_CONFIG_ARGS}
+ -DTribitsExProj_TRIBITS_DIR=${${PROJECT_NAME}_TRIBITS_DIR}
+ -DTribitsExProj_ENABLE_Fortran=ON
+ -DTribitsExProj_ENABLE_SimpleCxx=ON
+ -DTribitsExProj_ENABLE_WrapExternal=ON
+ -DTribitsExProj_ENABLE_TESTS=ON
+ -DTribitsExProj_ENABLE_SECONDARY_TESTED_CODE=ON
+ ${${PROJECT_NAME}_TRIBITS_DIR}/examples/TribitsExampleProject
+ PASS_REGULAR_EXPRESSION_ALL
+ "Setting SimpleCxx_ENABLE_TESTS=ON"
+ "Setting WrapExternal_ENABLE_TESTS=ON"
+ "Final set of enabled SE packages: SimpleCxx MixedLang WithSubpackagesA WithSubpackages WrapExternal 5"
+ "Processing enabled package: SimpleCxx [(]Libs, Tests, Examples[)]"
+ "Processing enabled package: MixedLang [(]Libs[)]"
+ "Processing enabled package: WithSubpackages [(]A[)]"
+ "Processing enabled package: WrapExternal [(]Libs, Tests, Examples[)]"
+ "Generating done"
+ ALWAYS_FAIL_ON_NONZERO_RETURN
+ TEST_1
+ MESSAGE "Run the dashboard target"
+ CMND env
+ ARGS
+ CTEST_BUILD_NAME=${PROJECT_NAME}_CTestDriver_AAO${AAO_POSTFIX}_Dashboard_ST_PackagesSubset_PASS
+ make dashboard
+ PASS_REGULAR_EXPRESSION_ALL
+ "Configure, build, test and submit results all-at-once for all enabled packages"
+ "Final set of packages to be explicitly processed by CTest/CDash: SimpleCxx WrapExternal 2"
+ "CTEST_LABELS_FOR_SUBPROJECTS='SimpleCxx[;]WrapExternal'"
+ "TRIBITS_CTEST_DRIVER_ERROR_QUEUE is empty. All is well."
+ "TRIBITS_CTEST_DRIVER: OVERALL: ALL PASSSED"
+ ALWAYS_FAIL_ON_NONZERO_RETURN
+ TEST_2
+ MESSAGE "Verify that the right set of packages are set"
+ CMND ${CMAKE_COMMAND} ARGS .
+ PASS_REGULAR_EXPRESSION_ALL
+ "Final set of enabled SE packages: SimpleCxx MixedLang WithSubpackagesA WithSubpackages WrapExternal 5"
+ "Processing enabled package: SimpleCxx [(]Libs, Tests, Examples[)]"
+ "Processing enabled package: MixedLang [(]Libs[)]"
+ "Processing enabled package: WithSubpackages [(]A[)]"
+ "Processing enabled package: WrapExternal [(]Libs, Tests, Examples[)]"
+ "Generating done"
+ "Generating done"
+ ALWAYS_FAIL_ON_NONZERO_RETURN
+ )
+
+ENDFUNCTION()
+
+
+# Run all-at-once-tests *WITHOUT* using new CMake/CTest/CDash features (so
+# packages will *NOT* get split out on CDash)
+GENERATE_AAO_TESTS(FALSE)
+
+
+# Run all-at-once-tests *WITH* using new CMake/CTest/CDash features (so
+# packages will get split out on CDash)
+IF (TribitsExProj_CTEST_USE_NEW_AAO_FEATURES)
+ GENERATE_AAO_TESTS(TRUE)
+ENDIF()
diff --git a/test/ctest_driver/TribitsExampleProject/append_file_with_line.sh b/test/ctest_driver/TribitsExampleProject/append_file_with_line.sh
new file mode 100755
index 000000000..cfde6be00
--- /dev/null
+++ b/test/ctest_driver/TribitsExampleProject/append_file_with_line.sh
@@ -0,0 +1,6 @@
+#!/bin/bash -e
+
+FILE_TO_EDIT=$1
+LINE_TO_ADD=$2
+
+echo "$LINE_TO_ADD" >> $FILE_TO_EDIT
diff --git a/test/ctest_driver/TribitsExampleProject/replace_string_in_file.sh b/test/ctest_driver/TribitsExampleProject/replace_string_in_file.sh
new file mode 100755
index 000000000..98158c805
--- /dev/null
+++ b/test/ctest_driver/TribitsExampleProject/replace_string_in_file.sh
@@ -0,0 +1,8 @@
+#!/bin/bash -e
+
+FILE_TO_EDIT=$1
+STRING_TO_REPLACE=$2
+REPLACEMENT_STRING=$3
+
+sed -i "s/$STRING_TO_REPLACE/$REPLACEMENT_STRING/g" $FILE_TO_EDIT
+
diff --git a/test/python_utils/gitdist_UnitTests.py b/test/python_utils/gitdist_UnitTests.py
index fb4db6350..e4d55357f 100644
--- a/test/python_utils/gitdist_UnitTests.py
+++ b/test/python_utils/gitdist_UnitTests.py
@@ -600,8 +600,8 @@ def test_repoVersionFile_withoutSummary_1(self):
def assertContainsGitdistHelpHeader(testObj, cmndOut):
cmndOutList = cmndOut.splitlines()
cmndOutFirstLine = cmndOutList[0]
- cmndOutFirstLineAfterComma = cmndOutFirstLine.split(b(":"))[1].strip()
- cmndOutFirstLineAfterComma_expected = b("gitdist [gitdist arguments] [git arguments]")
+ cmndOutFirstLineAfterComma = cmndOutFirstLine.split(s(":"))[1].strip()
+ cmndOutFirstLineAfterComma_expected = s("gitdist [gitdist arguments] [git arguments]")
testObj.assertEqual(cmndOutFirstLineAfterComma, cmndOutFirstLineAfterComma_expected)
@@ -632,7 +632,7 @@ def setUp(self):
def test_default(self):
(cmndOut, errOut) = getCmndOutput(gitdistPathNoColor, rtnCode=True)
cmndOut_expected = "Must specify git command. See 'git --help' for options.\n"
- self.assertEqual(cmndOut, b(cmndOut_expected))
+ self.assertEqual(s(cmndOut), s(cmndOut_expected))
self.assertEqual(errOut, 1)
@@ -677,7 +677,7 @@ def test_dist_help_all_help(self):
def test_dist_help_help(self):
cmndOut = getCmndOutput(gitdistPath+" --dist-help --help")
cmndOut_expected = "gitdist: error: option --dist-help: invalid choice: '--help' (choose from '', 'overview', 'repo-selection-and-setup', 'dist-repo-status', 'repo-versions', 'aliases', 'usage-tips', 'script-dependencies', 'all')\n"
- self.assertEqual(cmndOut, b(cmndOut_expected))
+ self.assertEqual(s(cmndOut), s(cmndOut_expected))
# Test --dist-helps=invalid-pick picked up as invalid value.
@@ -692,8 +692,12 @@ def test_dist_help_invalid_pick_help(self):
# Test --dist-help (show error string)
def test_dist_help(self):
(cmndOut, errOut) = getCmndOutput(gitdistPath+" --dist-help", rtnCode=True)
+ if sys.version_info < (3,):
+ anOrOne = "an"
+ else:
+ anOrOne = "1"
self.assertEqual(
- cmndOut, b("gitdist: error: --dist-help option requires an argument\n"))
+ s(cmndOut), s("gitdist: error: --dist-help option requires "+anOrOne+" argument\n"))
self.assertEqual(errOut, 2)
@@ -701,7 +705,7 @@ def test_dist_help(self):
def test_dist_help_none(self):
(cmndOut, errOut) = getCmndOutput(gitdistPathNoColor+" --dist-help=", rtnCode=True)
self.assertEqual(
- cmndOut, b("Must specify git command. See 'git --help' for options.\n"))
+ s(cmndOut), s("Must specify git command. See 'git --help' for options.\n"))
self.assertEqual(errOut, 1)
@@ -735,7 +739,7 @@ def test_noEgGit(self):
(cmndOut, errOut) = getCmndOutput(gitdistPathNoColor+" --dist-use-git= log",
rtnCode=True)
cmndOut_expected = "Can't find git, please set --dist-use-git\n"
- self.assertEqual(cmndOut, b(cmndOut_expected))
+ self.assertEqual(s(cmndOut), s(cmndOut_expected))
self.assertEqual(errOut, 1)
@@ -744,7 +748,7 @@ def test_log_args(self):
cmndOut_expected = \
"\n*** Base Git Repo: MockTrilinos\n" \
"['mockgit', 'log', 'HEAD', '-1']\n\n"
- self.assertEqual(cmndOut, b(cmndOut_expected))
+ self.assertEqual(s(cmndOut), s(cmndOut_expected))
def test_dot_gitdist(self):
@@ -778,7 +782,7 @@ def test_dot_gitdist(self):
"['mockgit', 'status']\n\n" \
"*** Git Repo: ExtraRepo3\n" \
"['mockgit', 'status']\n\n"
- self.assertEqual(cmndOut, b(cmndOut_expected))
+ self.assertEqual(s(cmndOut), s(cmndOut_expected))
# NOTE: Above ensures that all of the paths are read correctly and that
# missing paths (MissingExtraRepo) are ignored.
@@ -797,7 +801,7 @@ def test_dot_gitdist(self):
"['mockgit', 'status']\n\n" \
"*** Git Repo: ExtraRepo3\n" \
"['mockgit', 'status']\n\n"
- self.assertEqual(cmndOut, b(cmndOut_expected))
+ self.assertEqual(s(cmndOut), s(cmndOut_expected))
# Make sure that --dist-repos overrides all files
cmndOut = GeneralScriptSupport.getCmndOutput(
@@ -810,7 +814,7 @@ def test_dot_gitdist(self):
"['mockgit', 'status']\n\n" \
"*** Git Repo: Path/To/ExtraRepo2\n" \
"['mockgit', 'status']\n\n"
- self.assertEqual(cmndOut, b(cmndOut_expected))
+ self.assertEqual(s(cmndOut), s(cmndOut_expected))
finally:
os.chdir(testBaseDir)
@@ -824,7 +828,7 @@ def test_log_args_extra_repo_1(self):
"['mockgit', 'log', 'HEAD', '-1']\n\n" \
"*** Git Repo: extraTrilinosRepo\n" \
"['mockgit', 'log', 'HEAD', '-1']\n\n"
- self.assertEqual(cmndOut, b(cmndOut_expected))
+ self.assertEqual(s(cmndOut), s(cmndOut_expected))
def test_log_args_extra_repo_2_not_first(self):
@@ -839,7 +843,7 @@ def test_log_args_extra_repo_2_not_first(self):
"['mockgit', 'log', 'HEAD', '-1']\n\n" \
"*** Git Repo: extraRepoOnePackage\n" \
"['mockgit', 'log', 'HEAD', '-1']\n\n"
- self.assertEqual(cmndOut, b(cmndOut_expected))
+ self.assertEqual(s(cmndOut), s(cmndOut_expected))
def test_log_args_extra_repo_2_not_second(self):
@@ -854,7 +858,7 @@ def test_log_args_extra_repo_2_not_second(self):
"['mockgit', 'log', 'HEAD', '-1']\n\n" \
"*** Git Repo: extraRepoOnePackage\n" \
"['mockgit', 'log', 'HEAD', '-1']\n\n"
- self.assertEqual(cmndOut, b(cmndOut_expected))
+ self.assertEqual(s(cmndOut), s(cmndOut_expected))
def test_log_args_extra_repo_1_not_base(self):
@@ -867,7 +871,7 @@ def test_log_args_extra_repo_1_not_base(self):
cmndOut_expected = \
"\n*** Git Repo: extraTrilinosRepo\n" \
"['mockgit', 'log', 'HEAD', '-1']\n\n"
- self.assertEqual(cmndOut, b(cmndOut_expected))
+ self.assertEqual(s(cmndOut), s(cmndOut_expected))
def test_dist_mod_only_1_change_base(self):
@@ -938,7 +942,7 @@ def test_dist_mod_only_1_change_base(self):
"\n*** Base Git Repo: MockProjectDir\n" \
"On branch local_branch0\n" \
"Your branch is ahead of 'origin_repo0/remote_branch0' by 3 commits.\n\n\n"
- self.assertEqual(cmndOut, b(cmndOut_expected))
+ self.assertEqual(s(cmndOut), s(cmndOut_expected))
finally:
os.chdir(testBaseDir)
@@ -1011,7 +1015,7 @@ def test_dist_mod_only_1_change_extrarepo1(self):
cmndOut_expected = \
"\n*** Git Repo: ExtraRepo1\nOn branch local_branch1\n" \
"Your branch is ahead of 'origin_repo1/remote_branch1' by 1 commits.\n\n\n"
- self.assertEqual(cmndOut, b(cmndOut_expected))
+ self.assertEqual(s(cmndOut), s(cmndOut_expected))
finally:
os.chdir(testBaseDir)
@@ -1066,7 +1070,7 @@ def test_dist_mod_only_1_extrarepo1_not_tracking_branch(self):
"\n*** Base Git Repo: MockProjectDir\n" \
"On branch local_branch0\n" \
"Your branch is ahead of 'origin_repo0/remote_branch0' by 3 commits.\n\n\n"
- self.assertEqual(cmndOut, b(cmndOut_expected))
+ self.assertEqual(s(cmndOut), s(cmndOut_expected))
finally:
os.chdir(testBaseDir)
@@ -1122,7 +1126,7 @@ def test_dist_mod_only_1_extrarepo1_not_tracking_branch_with_mods(self):
"\n*** Git Repo: ExtraRepo1\n" \
"On branch local_branch1\n" \
"Your branch is ahead of 'origin_repo1/remote_branch1' by 1 commits.\n\n\n"
- self.assertEqual(cmndOut, b(cmndOut_expected))
+ self.assertEqual(s(cmndOut), s(cmndOut_expected))
finally:
os.chdir(testBaseDir)
@@ -1136,7 +1140,7 @@ def test_log_version_file(self):
cmndOut_expected = \
"\n*** Base Git Repo: MockTrilinos\n" \
"['mockgit', 'log', 'sha1_1', '--some', '-other', 'args']\n\n"
- self.assertEqual(cmndOut, b(cmndOut_expected))
+ self.assertEqual(s(cmndOut), s(cmndOut_expected))
def test_log_version_file_extra_repo_1(self):
@@ -1149,7 +1153,7 @@ def test_log_version_file_extra_repo_1(self):
"\n*** Base Git Repo: MockTrilinos\n" \
"['mockgit', 'log', 'sha1_1']\n" \
"\n*** Git Repo: extraTrilinosRepo\n['mockgit', 'log', 'sha1_2']\n\n"
- self.assertEqual(cmndOut, b(cmndOut_expected))
+ self.assertEqual(s(cmndOut), s(cmndOut_expected))
def test_log_version_file_extra_repo_2(self):
@@ -1163,7 +1167,7 @@ def test_log_version_file_extra_repo_2(self):
"['mockgit', 'log', 'sha1_1']\n" \
"\n*** Git Repo: extraRepoOnePackage\n['mockgit', 'log', 'sha1_3']\n" \
"\n*** Git Repo: extraTrilinosRepo\n['mockgit', 'log', 'sha1_2']\n\n"
- self.assertEqual(cmndOut, b(cmndOut_expected))
+ self.assertEqual(s(cmndOut), s(cmndOut_expected))
def test_log_HEAD_version_file_extra_repo_1(self):
@@ -1176,7 +1180,7 @@ def test_log_HEAD_version_file_extra_repo_1(self):
"\n*** Base Git Repo: MockTrilinos\n" \
"['mockgit', 'log', 'HEAD', '^sha1_1']\n" \
"\n*** Git Repo: extraTrilinosRepo\n['mockgit', 'log', 'HEAD', '^sha1_2']\n\n"
- self.assertEqual(cmndOut, b(cmndOut_expected))
+ self.assertEqual(s(cmndOut), s(cmndOut_expected))
def test_version_file_invalid_extra_repo(self):
@@ -1188,7 +1192,7 @@ def test_version_file_invalid_extra_repo(self):
cmndOut_expected = \
"\n*** Base Git Repo: MockTrilinos\n['mockgit', 'log', 'sha1_1']\n" \
"\n*** Git Repo: extraRepoTwoPackages\nRepo 'extraRepoTwoPackages' is not in the list of repos ['.', 'extraRepoOnePackage', 'extraTrilinosRepo'] read in from the version file.\n"
- self.assertEqual(cmndOut, b(cmndOut_expected))
+ self.assertEqual(s(cmndOut), s(cmndOut_expected))
def test_log_not_version_file_2(self):
@@ -1200,7 +1204,7 @@ def test_log_not_version_file_2(self):
cmndOut_expected = \
"\n*** Base Git Repo: MockTrilinos\n" \
"['mockgit', 'log', 'sha1_1', '^sha1_1_2']\n\n"
- self.assertEqual(cmndOut, b(cmndOut_expected))
+ self.assertEqual(s(cmndOut), s(cmndOut_expected))
def test_log_not_version_file_2_extra_repo_1(self):
@@ -1214,7 +1218,7 @@ def test_log_not_version_file_2_extra_repo_1(self):
"\n*** Base Git Repo: MockTrilinos\n" \
"['mockgit', 'log', 'sha1_1', '^sha1_1_2']\n" \
"\n*** Git Repo: extraTrilinosRepo\n['mockgit', 'log', 'sha1_2', '^sha1_2_2']\n\n"
- self.assertEqual(cmndOut, b(cmndOut_expected))
+ self.assertEqual(s(cmndOut), s(cmndOut_expected))
def test_log_since_until_version_file_2_extra_repo_1(self):
@@ -1228,7 +1232,7 @@ def test_log_since_until_version_file_2_extra_repo_1(self):
"\n*** Base Git Repo: MockTrilinos\n" \
"['mockgit', 'log', 'sha1_1_2..sha1_1']\n" \
"\n*** Git Repo: extraTrilinosRepo\n['mockgit', 'log', 'sha1_2_2..sha1_2']\n\n"
- self.assertEqual(cmndOut, b(cmndOut_expected))
+ self.assertEqual(s(cmndOut), s(cmndOut_expected))
# The above test ensures that it repalces the SHA1s for in the same cmndline args
@@ -1260,7 +1264,7 @@ def test_dist_repo_status_all(self):
"-----------------------------------------------------------------------------------------\n" \
"\n" \
"(tip: to see a legend, pass in --dist-legend.)\n"
- self.assertEqual(cmndOut, b(cmndOut_expected))
+ self.assertEqual(s(cmndOut), s(cmndOut_expected))
finally:
os.chdir(testBaseDir)
@@ -1293,7 +1297,7 @@ def test_dist_repo_status_mod_only_first(self):
"-----------------------------------------------------------------------------------------\n" \
"\n" \
"(tip: to see a legend, pass in --dist-legend.)\n"
- self.assertEqual(cmndOut, b(cmndOut_expected))
+ self.assertEqual(s(cmndOut), s(cmndOut_expected))
finally:
os.chdir(testBaseDir)
@@ -1334,7 +1338,7 @@ def test_dist_repo_status_mod_only_first_legend(self):
"* C: Number local commits w.r.t. tracking branch (empty if zero or no TB)\n" \
"* M: Number of tracked modified (uncommitted) files (empty if zero)\n" \
"* ?: Number of untracked, non-ignored files (empty if zero)\n\n"
- self.assertEqual(cmndOut, b(cmndOut_expected))
+ self.assertEqual(s(cmndOut), s(cmndOut_expected))
finally:
os.chdir(testBaseDir)
@@ -1367,7 +1371,7 @@ def test_dist_repo_status_mod_only_first_last(self):
"----------------------------------------------------------------------------------------\n" \
"\n" \
"(tip: to see a legend, pass in --dist-legend.)\n"
- self.assertEqual(cmndOut, b(cmndOut_expected))
+ self.assertEqual(s(cmndOut), s(cmndOut_expected))
finally:
os.chdir(testBaseDir)
@@ -1389,7 +1393,7 @@ def test_dist_repo_status_extra_args_fail(self):
#print(cmndOut)
cmndOut_expected = \
"Error, passing in extra git commands/args ='--name-status' with special comamnd 'dist-repo-status is not allowed!\n"
- self.assertEqual(cmndOut, b(cmndOut_expected))
+ self.assertEqual(cmndOut, s(cmndOut_expected))
self.assertEqual(errOut, 1)
finally:
diff --git a/tribits/README.DIRECTORY_CONTENTS.rst b/tribits/README.DIRECTORY_CONTENTS.rst
index 8699e9ebd..80067d5a8 100644
--- a/tribits/README.DIRECTORY_CONTENTS.rst
+++ b/tribits/README.DIRECTORY_CONTENTS.rst
@@ -1,13 +1,13 @@
TriBITS/tribits/ Directory Contents
+++++++++++++++++++++++++++++++++++
-This directory contains the implementation for the varous parts of TriBITS
+This directory contains the implementation for the various parts of TriBITS
that are used by TriBITS projects to implement TriBITS functionality. It also
contains basic documentation in the subdirectory doc/ that is very close to
the TriBITS implementation. Files and directories from here are what get
installed on the system or will be snapshotted into
``/cmake/tribits/``. Each TriBITS Project decides what parts of
-TriBITS it wants to install or shapshot using the script
+TriBITS it wants to install or snapshot using the script
``tribits/snapshot_tribits.py`` (which takes arguments for what dirs to
snapshot). This directory contains no tests at all. All of the tests for
TriBITS are in the ``test/`` directory in the parent TriBITS repository.
@@ -46,7 +46,7 @@ If you have a better way to manage multiple builds (e.g. Jenkins) then use
that instead.
**common_tpls/**: TPLs that are very common and are used by several different
-TriBITS projects but are not built into the TriBITS system itslef. Having some
+TriBITS projects but are not built into the TriBITS system itself. Having some
of these common TPLs in a central location enhances uniformity, reuse, and
makes it easier to pull TriBITS packages out of a repo and build them
independently.
diff --git a/tribits/ReleaseNotes.txt b/tribits/ReleaseNotes.txt
index 5fd2c0004..12528d490 100644
--- a/tribits/ReleaseNotes.txt
+++ b/tribits/ReleaseNotes.txt
@@ -2,6 +2,55 @@
Release Notes for TriBITS
----------------------------------------
+2017/06/24:
+
+(*) MINOR: Add new all-at-once more for CTest -S driver scripts using
+ TRIBITS_CTEST_DRIVER() by setting the variable
+ ${PROJECT_NAME}_CTEST_DO_ALL_AT_ONCE=TRUE. This works with older versions
+ of CMake/CTest and CDash but, by default, will just return a single glob
+ of results, not breaking results out package-by-package. Therefore, this
+ is disabled by default and package-by-package mode is used by default.
+ But if ${PROJECT_NAME}_CTEST_USE_NEW_AAO_FEATURES=TRUE is set, then
+ TriBITS will take advantage of new CMake, CTest, and CDash features
+ (currently on a branch) to display the results on CDash broken down
+ package-by-package. Once these changes are merged to the CMake/CTest and
+ CDash 'master' branches, then the default for
+ ${PROJECT_NAME}_CTEST_USE_NEW_AAO_FEATURES will be set to TRUE
+ automatically when it detects an updated version of CMake/CTest is
+ present. In the future, at some point, the TriBITS default for
+ ${PROJECT_NAME}_CTEST_DO_ALL_AT_ONCE will change from FALSE to TRUE since
+ that is a much more efficient way to drive automated testing.
+
+2017/05/25:
+
+(*) MINOR: PARSE_ARGUMENTS() has been deprecated and replaced by
+ CMAKE_PARSE_ARGUMENTS() everywhere in TriBITS. Any call to
+ PARSE_ARGUMENTS() will warn users and tell them to use
+ CMAKE_PARSE_ARGUMENTS() instead.
+
+2017/05/17:
+
+(*) MAJOR: TriBITS now unconditionally sets
+ ${PROJECT_NAME}_ENABLE_Fortran_DEFAULT to ON. Projects will now need to
+ put in special logic to set to OFF or ON for certain platforms.
+
+2017/01/11:
+
+(*) MINOR: TriBITS now correctly sets the default value for
+ DART_TESTING_TIMEOUT to 1500 seconds and will scale it by
+ _SCALE_TEST_TIMEOUT even if DART_TESTING_TIMEOUT is not
+ explicitly set.
+
+2016/12/07:
+
+(*) MAJOR: The long deprecated variable
+ ${PROJECT_NAME}_ENABLE_SECONDARY_STABLE_CODE has been removed. Upgrading
+ existing TriBITS projects just requires a simple string replacement of
+ _ENABLE_SECONDARY_STABLE_CODE with _ENABLE_SECONDARY_TESTED_CODE in all
+ files. Since Trilinos has turned on ST code by default and many other
+ TriBITS projects don't differentiate between PT and ST code, this change
+ should not even break those projects, even if they don't update.
+
2016/11/02:
(*) MAJOR: gitdist now accepts --dist-repos and --dist-not-repos arguments and
diff --git a/tribits/ci_support/CheckinTest.py b/tribits/ci_support/CheckinTest.py
index 6ab0abbcf..c68961ae7 100644
--- a/tribits/ci_support/CheckinTest.py
+++ b/tribits/ci_support/CheckinTest.py
@@ -731,12 +731,10 @@ def writeDefaultCommonConfigFile():
"# Fill in the minimum CMake options that are needed to build and link\n" \
"# that are common to all builds such as the following:\n" \
"#\n" \
- "#-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON\n" \
- "#-DBUILD_SHARED:BOOL=ON\n" \
- "#-DTPL_BLAS_LIBRARIES:PATH=/usr/local/libblas.a\n" \
- "#-DTPL_LAPACK_LIBRARIES:PATH=/usr/local/liblapack.a\n" \
+ "#-DCMAKE_VERBOSE_MAKEFILE=ON\n" \
+ "#-DBUILD_SHARED_LIBS=ON\n" \
"#\n" \
- "# NOTE: Please do not add any options here that would select what pacakges\n" \
+ "# NOTE: Please do not add any options here that would select what packages\n" \
"# get enabled or disabled.\n"
writeStrToFile(commonConfigFileName, commonConfigFileStr)
@@ -763,25 +761,9 @@ def writeDefaultBuildSpecificConfigFile(buildTestCaseName):
"# Fill in the minimum CMake options that are needed to build and link\n" \
"# that are specific to the "+serialOrMpi+" build such as:\n" \
"#\n" \
- "#-DBUILD_SHARED:BOOL=ON\n"
-
- if serialOrMpi == "MPI":
- buildSpecificConfigFileStr += \
- "#-DMPI_BASE_DIR:PATH=/usr/lib64/openmpi/1.2.7-gcc\n" \
- "#-DMPI_CXX_COMPILER:PATHNAME=/usr/lib64/openmpi/1.2.7-gcc/mpicxx\n" \
- "#-DMPI_C_COMPILER:PATHNAME=/usr/lib64/openmpi/1.2.7-gcc/mpicc\n" \
- "#-DMPI_Fortran_COMPILER:PATHNAME=/usr/lib64/openmpi/1.2.7-gcc/mpif77\n"
- elif serialOrMpi == "SERIAL":
- buildSpecificConfigFileStr += \
- "#-DCMAKE_CXX_COMPILER:PATHNAME=/usr/local/bin/g++\n" \
- "#-DCMAKE_C_COMPILER:PATHNAME=/usr/local/bin/gcc\n" \
- "#-DCMAKE_Fortran_COMPILER:PATHNAME=/usr/local/bin/gfortran\n"
- else:
- raise Exception("Invalid value for serialOrMpi="+serialOrMpi)
-
- buildSpecificConfigFileStr += \
+ "#-DBUILD_SHARED_LIBS=ON\n" \
"#\n" \
- "# NOTE: Please do not add any options here that would change what pacakges\n" \
+ "# NOTE: Please do not add any options here that would change what packages\n" \
"# or TPLs get enabled or disabled.\n"
writeStrToFile(buildSpecificConfigFileName, buildSpecificConfigFileStr)
diff --git a/tribits/ci_support/TribitsDependencies.py b/tribits/ci_support/TribitsDependencies.py
index 8d6cc4034..4f728fde3 100644
--- a/tribits/ci_support/TribitsDependencies.py
+++ b/tribits/ci_support/TribitsDependencies.py
@@ -207,6 +207,7 @@ class TribitsDependencies:
def __init__(self):
self.__projectName = None
+ self.__projectBaseDirName = None
self.__packagesList = []
self.__packagesNameToID = {}
self.__packagesDirToID = {}
@@ -220,6 +221,14 @@ def getProjectName(self):
return self.__projectName
+ def setProjectBaseDirName(self, projectBaseDirName):
+ self.__projectBaseDirName = projectBaseDirName
+
+
+ def getProjectBaseDirName(self):
+ return self.__projectBaseDirName
+
+
def addPackageDependencies(self, packageDeps):
packageName = packageDeps.packageName
packageDir = packageDeps.packageDir
@@ -266,6 +275,21 @@ def getPackageNameFromPath(self, fullPath):
# packages because subpackages are listed before packages!
+ def getPackageNameFromTestName(self, testName):
+ for packageDep in self.__packagesList:
+ startTestName = packageDep.packageName+"_"
+ #print("\nstartTestName="+startTestName)
+ testNameStartIdx = testName.find(startTestName, 0)
+ if testNameStartIdx == 0:
+ #print("MATCH!")
+ if packageDep.parentPackage:
+ #print("Subpackage match!")
+ return self.getPackageByName(packageDep.parentPackage).packageName
+ # Else, is not a subpackage
+ return packageDep.packageName
+ return u""
+
+
def filterPackageNameList(self, inputPackagesList, keepTypesList, verbose=False):
i = 0
outputPackagesList = []
@@ -543,6 +567,8 @@ def createCDashXML(self):
xmlText += "\n"
+ projectBaseDirName = self.getProjectBaseDirName()
+
numPackages = self.numPackages()
for package_i in range(numPackages):
@@ -550,10 +576,13 @@ def createCDashXML(self):
packageDeps = self.__packagesList[package_i]
packageName = packageDeps.packageName
+ packagePath = packageDeps.packageDir
if packageDeps.parentPackage == "":
xmlText += (" \n")
+
+ xmlText += (" "+packagePath+"\n")
xmlText += \
" \n"+\
@@ -619,7 +648,10 @@ def getProjectDependenciesFromXmlFile(xmlFile):
#print("\npackageDepXmlDom =", dir(packageDepXmlDom))
#print("\npackageDepXmlDom.documentElement =", dir(packageDepXmlDom.documentElement))
projectDependencies = TribitsDependencies()
- projectDependencies.setProjectName(packageDepXmlDom.documentElement.getAttribute('project'))
+ projectDependencies.setProjectName(
+ packageDepXmlDom.documentElement.getAttribute('project'))
+ projectDependencies.setProjectBaseDirName(
+ packageDepXmlDom.documentElement.getAttribute('baseDirName'))
for ele in packageDepXmlDom.childNodes[0].childNodes:
if ele.nodeType == ele.ELEMENT_NODE:
packageName = ele.getAttribute('name')
diff --git a/tribits/ci_support/TribitsDumpXmlDependenciesFiles.cmake b/tribits/ci_support/TribitsDumpXmlDependenciesFiles.cmake
index e3fa73f0f..88a8fe3de 100644
--- a/tribits/ci_support/TribitsDumpXmlDependenciesFiles.cmake
+++ b/tribits/ci_support/TribitsDumpXmlDependenciesFiles.cmake
@@ -97,8 +97,11 @@ FUNCTION(TRIBITS_DUMP_DEPS_XML_FILE)
SET(DEPS_XM)
+ GET_FILENAME_COMPONENT(PROJECT_BASE_DIR_NAME "${${PROJECT_NAME}_SOURCE_DIR}" NAME)
+
LIST(APPEND DEPS_XML
- "\n")
+ "\n"
+ )
SET(PACKAGE_IDX 0)
FOREACH(TRIBITS_PACKAGE ${${PROJECT_NAME}_SE_PACKAGES})
diff --git a/tribits/ci_support/TribitsPackageTestNameUtils.py b/tribits/ci_support/TribitsPackageTestNameUtils.py
new file mode 100644
index 000000000..f0f29a2c5
--- /dev/null
+++ b/tribits/ci_support/TribitsPackageTestNameUtils.py
@@ -0,0 +1,86 @@
+# @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
+
+
+#
+# General scripting support
+#
+# NOTE: Included first to check the version of python!
+#
+
+from TribitsDependencies import getProjectDependenciesFromXmlFile
+from GeneralScriptSupport import *
+
+
+def getPackageNameFromTestName(trilinosDependencies, testName):
+ return trilinosDependencies.getPackageNameFromTestName(testName)
+
+
+def getTestNameFromLastTestsFailedLine(trilinosDependencies, line):
+ lineArray = line.split(':')
+ assert len(lineArray) == 2, "Error, the line '"+line+"' not formatted correctly!"
+ testName = lineArray[1]
+ assert testName != "", "Error, test name '"+testName+"' can't be empty!"
+ return testName
+
+
+#
+# Given the lines from a LastTestsFail*.log file, return an array of the
+# matching parent package names.
+#
+# This will return the list of matching packages only once per package.
+#
+
+def getPackageNamesFromLastTestsFailedLines(trilinosDependencies, \
+ lastTestsFailedLines \
+ ):
+ #print ("\nlastTestsFailedLine:\n"+str(lastTestsFailedLines))
+ packageNames = []
+ for lastTestsFailedLine in lastTestsFailedLines:
+ #print ("\nlastTestsFailedLine = '"+lastTestsFailedLine+"'")
+ testName = \
+ getTestNameFromLastTestsFailedLine(trilinosDependencies, lastTestsFailedLine)
+ #print ("\ntestName = '"+testName+"'")
+ packageName = getPackageNameFromTestName(trilinosDependencies, testName)
+ #print("\npackageName = '"+packageName+"'")
+ if findInSequence(packageNames, packageName) == -1 and packageName:
+ #print ("\nAppend '"+packageName+"'")
+ packageNames.append(packageName)
+ return packageNames
+
diff --git a/tribits/ci_support/checkin-test.py b/tribits/ci_support/checkin-test.py
index cf5b86dc7..aed78b0cf 100755
--- a/tribits/ci_support/checkin-test.py
+++ b/tribits/ci_support/checkin-test.py
@@ -235,10 +235,10 @@
packages forward/downstream. You can manually select which packages get
enabled (see the enable options above). (done if --configure, --do-all, or
--local-do-all is set.)
-
+
4.b) Build all configured code with 'make' (e.g. with -jN set through
-j or --make-options). (done if --build, --do-all, or --local-do-all is set.)
-
+
4.c) Run all BASIC tests for enabled packages. (done if --test, --do-all,
or --local-do-all is set.)
@@ -251,10 +251,10 @@
5.a) Do a final 'git pull' (done if --pull or --do-all is set)
5.b) Do 'git rebase /' (done if --rebase is set)
-
+
5.c) Amend commit message of the most recent commit with the summary of the
testing performed. (done if --append-test-results is set.)
-
+
5.d) Push the local commits to the global repo (done if --push is set)
6) Send out final on actions (i.e. 'DID PUSH' email if a push occurred).
@@ -407,7 +407,7 @@
../checkin-test.py \
--enable-packages=,, --no-enable-fwd-packages \
--do-all
-
+
NOTE: This will override all logic in the script about which packages will
be enabled based on file changes and only the given packages will be
enabled. When there are tens of thousands of changed files and hundreds of
@@ -458,20 +458,20 @@
Code and want to include the testing of this in your pre-push testing
process along with the standard --default-builds build/test cases which can
only include Primary Tested (PT) Code. In this case you can run with:
-
+
../checkin-test.py --extra-builds=,,... [other options]
-
+
For example, if you have a build that enables the TPL CUDA you would do:
-
+
echo "
-DTPL_ENABLE_MPI:BOOL=ON
-DTPL_ENABLE_CUDA:BOOL=ON
" > MPI_DEBUG_CUDA.config
-
+
and then run with:
-
+
../checkin-test.py --extra-builds=MPI_DEBUG_CUDA --do-all
-
+
This will do the standard --default-builds (e.g. MPI_DEBUG and
SERIAL_RELEASE) build/test cases along with your non-standard MPI_DEBUG_CUDA
build/test case.
@@ -485,7 +485,7 @@
You can also use the checkin-test.py script to continuously integrate
multiple git repos containing add-on packages. To do so, just run:
-
+
../checkin-test.py --extra-repos=,,... [options]
NOTE: You have to create local commits in all of the extra repos where there
@@ -522,24 +522,24 @@
with:
../checkin-test.py --do-all --no-enable-fwd-packages
-
+
On your fast remote test machine, do a full test and push with:
-
+
../checkin-test.py \
--extra-pull-from=:master \
--do-all --push
where is a git remote repo name pointing to
mymachine:/some/dir/to/your/src (see 'git help remote').
-
+
NOTE: You can of course adjust the packages and/or build/test cases that get
enabled on the different machines.
-
+
NOTE: Once you invoke the checkin-test.py script on the remote test machine
and it has pulled the commits from mymachine, then you can start changing
files again on your local development machine and just check your email to
see what happens on the remote test machine.
-
+
NOTE: If something goes wrong on the remote test machine, you can either
work on fixing the problem there or you can fix the problem on your local
development machine and then do the process over again.
@@ -557,7 +557,7 @@
NOTE: This would also work for multiple repos if the remote name
'' pointed to the right remote repo in all the local repos.
-
+
(*) Check push readiness status:
../checkin-test.py
@@ -711,7 +711,7 @@
return value of is a necessary but not sufficient condition for readiness to
push, it depends on the requested actions.
-"""
+"""
# ToDo: Break up the above huge documentation block into different "topics"
# and then display those topics with --help-topic=. Also provide a
@@ -719,21 +719,21 @@
# standard documentation to produce where is there now.
def runProjectTestsWithCommandLineArgs(commandLineArgs, configuration = {}):
-
+
clp = ConfigurableOptionParser(configuration.get('defaults', {}), usage=usageHelp)
clp.add_option(
"--project-configuration", dest="projectConfiguration", type="string", default="",
help="Custom file to provide configuration defaults for the project." \
+ " By default, the file project-checkin-test-config.py is looked for" \
- + " in /../.. (assuming default /cmake/tribits/" \
- + " directory structure and second is looked for in / (which" \
- + " is common practice to symlink the checkin-test.py script into the project's" \
- + " base directory). If this file is set to a location that is not in the" \
+ + " in (in case it is symlinked into /checkin-test.py)" \
+ + " if not found there, then it is looked for in /../../.." \
+ +" (assuming default TriBITS snapshot /cmake/tribits/ci_support/)" \
+ + " If this file is set to a location that is not in the" \
+ " project's base directory, then --src-dir must be set to point to the" \
+ " project's base directory."
)
-
+
clp.add_option(
"--show-defaults", dest="showDefaults", action="store_true",
help="Show the default option values and do nothing at all.",
@@ -901,7 +901,13 @@ def runProjectTestsWithCommandLineArgs(commandLineArgs, configuration = {}):
clp.add_option(
"--ctest-timeout", dest="ctestTimeOut", type="float", default=300,
help="timeout (in seconds) for each single 'ctest' test (e.g. 180" \
- +" for three minutes)." )
+ +" for three minutes). This sets the CMake cache var DART_TESTING_TIMEOUT"
+ +" which becomes the default timeout for tests, even when running raw"
+ +" ctest. This value can be overridden using the ctest argument --timeout."
+ +" Individual tests may have their own timeouts set which will not be"
+ +" impacted by this default global timeout. See the configure variable"
+ +" _SCALE_TEST_TIMEOUT to scale up timeouts for"
+ +" all tests, even those that have individuals timeouts set." )
clp.add_option(
"--show-all-tests", dest="showAllTests", action="store_true",
@@ -1114,7 +1120,7 @@ def runProjectTestsWithCommandLineArgs(commandLineArgs, configuration = {}):
(options, args) = clp.parse_args(args=commandLineArgs)
- # NOTE: Above, in the pairs of boolean options, the *last* add_option(...)
+ # NOTE: Above, in the pairs of boolean options, the *last* add_option(...)
# takes effect! That is why the commands are ordered the way they are!
@@ -1169,7 +1175,7 @@ def runProjectTestsWithCommandLineArgs(commandLineArgs, configuration = {}):
else:
print " --no-show-all-tests \\"
if options.withoutDefaultBuilds:
- print " --without-default-builds \\"
+ print " --without-default-builds \\"
print " --st-extra-builds='"+options.stExtraBuilds+"' \\"
print " --extra-builds='"+options.extraBuilds+"' \\"
print " --send-email-to='"+options.sendEmailTo+"' \\"
@@ -1231,9 +1237,12 @@ def runProjectTestsWithCommandLineArgs(commandLineArgs, configuration = {}):
#
- # Check the input arguments
+ # Check and adjust the input arguments
#
+ if not os.path.isabs(options.srcDir):
+ options.srcDir = os.path.abspath(options.srcDir)
+
if options.doAll and options.localDoAll:
print "\nError, you can not use --do-all and --local-do-all together! Use on or the other!"
sys.exit(1)
@@ -1291,17 +1300,17 @@ def getConfigurationSearchPaths():
"""
result = []
- # Always look for the configuration file assuming the checkin-test.py script
- # is run out of the standard snapshotted tribits directory
- # /cmake/tribits/.
- result.append(os.path.join(thisFileRealAbsBasePath, '..', '..'))
-
- # Lastly, look for the checkin-test.py file's base directory path. It is
+ # First, look for the checkin-test.py file's base directory path. It is
# common practice to symbolically link the checkin-test.py script into the
# project's base source directory. NOTE: Don't use realpath here! We don't
# want to follow symbolic links!
result.append(os.path.dirname(os.path.abspath(__file__)))
+ # Second, look for the configuration file assuming the checkin-test.py
+ # script is run out of the standard snapshotted tribits directory
+ # /cmake/tribits/ci_support
+ result.append(os.path.join(thisFileRealAbsBasePath, '..', '..', '..'))
+
return result
@@ -1367,7 +1376,7 @@ def locateAndLoadConfiguration(path_hints = []):
if os.path.exists(candidate):
return loadConfigurationFile(candidate)
return {}
-
+
#
# Main
diff --git a/tribits/ci_support/clone_extra_repos.py b/tribits/ci_support/clone_extra_repos.py
index 105dec136..cbe8f2ce4 100755
--- a/tribits/ci_support/clone_extra_repos.py
+++ b/tribits/ci_support/clone_extra_repos.py
@@ -73,7 +73,7 @@
/"""+g_extraRerposFileDefault+r"""
-(other repo types can be selected usng --extra-repos-type).
+(other repo types can be selected using --extra-repos-type).
The list of which repos to clone can be "white-list" selected with the option
--extra-repos (see options below for details). Extra repos can in addition be
@@ -94,7 +94,7 @@
If the git repo server is using gitolite, one can set
--gitolite-root= and that will result in git repos being
-selected only if the selcted repos are listed in 'ssh info'.
+selected only if the selected repos are listed in 'ssh info'.
This allows one to automatically exclude repos from being cloned that the user
has no permissions to clone. NOTE: See warning about the --gitolite-root option below!
@@ -154,7 +154,7 @@ def injectCmndLineOptionsInParser(clp, gitoliteRootDefault=""):
"--extra-repos-type", "extraReposType",
g_extraReposTypes , g_extraReposTypesDefaulIdx,
"Type of extra repositories to select from " \
- ". When --extra-repos is set, then this arugment" \
+ ". When --extra-repos is set, then this argument" \
" is ignored.",
clp )
@@ -164,7 +164,7 @@ def injectCmndLineOptionsInParser(clp, gitoliteRootDefault=""):
" If specified, then any git repos with the listed as their" \
" root will only be selected if they are listed with 'R' permissions returned" \
" from 'ssh info'. WARNING: Make sure that you have your" \
- " gitoliote SSH registred correctly before using this option by typing" \
+ " gitoliote SSH registered correctly before using this option by typing" \
" the command 'ssh info' and make sure that it does *not*"
" ask for a password! (Default = '"+gitoliteRootDefault+"')" )
diff --git a/tribits/ci_support/get-tribits-packages-from-last-tests-failed.py b/tribits/ci_support/get-tribits-packages-from-last-tests-failed.py
new file mode 100755
index 000000000..958fece98
--- /dev/null
+++ b/tribits/ci_support/get-tribits-packages-from-last-tests-failed.py
@@ -0,0 +1,76 @@
+#!/usr/bin/env python
+
+# @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
+
+from TribitsPackageTestNameUtils import *
+
+
+#
+# Read in the commandline arguments
+#
+
+usageHelp = r"""get-tribits-packages-from-last-tests-failed.py --deps-xml-file= --last-tests-failed-file=
+"""
+
+from optparse import OptionParser
+
+clp = OptionParser(usage=usageHelp)
+
+clp.add_option(
+ "--deps-xml-file", dest="depsXmlFile", type="string", default=None,
+ help="File containing the listing of packages, dir names, dependencies, etc.")
+
+clp.add_option(
+ "--last-tests-failed-file", dest="lastTestsFailedFile", type="string", default=None,
+ help="LastTestsFailed*.log file generated by CTest.")
+
+(options, args) = clp.parse_args()
+
+if not options.lastTestsFailedFile:
+ raise Exception("Error, the option --last-tests-failed-file=FILENAME must be set!")
+
+trilinosDependencies = getProjectDependenciesFromXmlFile(options.depsXmlFile)
+
+lastTestsFailedLines = readStrFromFile(options.lastTestsFailedFile).splitlines()
+
+packageNames = getPackageNamesFromLastTestsFailedLines(trilinosDependencies,
+ lastTestsFailedLines)
+
+print ';'.join(packageNames)
diff --git a/tribits/common_tpls/FindTPLCGNS.cmake b/tribits/common_tpls/FindTPLCGNS.cmake
new file mode 100644
index 000000000..ca2980f4d
--- /dev/null
+++ b/tribits/common_tpls/FindTPLCGNS.cmake
@@ -0,0 +1,81 @@
+# @HEADER
+# ************************************************************************
+#
+# TriBITS: Tribal Build, Integrate, and Test System
+# Copyright 2016 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
+
+#
+# First, set up the variables for the (backward-compatible) TriBITS way of
+# finding Netcdf. These are used in case FIND_PACKAGE(NetCDF ...) is not
+# called or does not find NetCDF. Also, these variables need to be non-null
+# in order to trigger the right behavior in the function
+# TRIBITS_TPL_FIND_INCLUDE_DIRS_AND_LIBRARIES().
+#
+SET(REQUIRED_HEADERS cgnslib.h)
+SET(REQUIRED_LIBS_NAMES cgns)
+
+#
+# Second, search for Netcdf components (if allowed) using the standard
+# FIND_PACKAGE(CGNS ...).
+#
+TRIBITS_TPL_ALLOW_PRE_FIND_PACKAGE(CGNS CGNS_ALLOW_PREFIND)
+IF (CGNS_ALLOW_PREFIND)
+
+ MESSAGE("-- Using FIND_PACKAGE(CGNS ...) ...")
+
+ SET(CMAKE_MODULE_PATH
+ "${CMAKE_MODULE_PATH}"
+ "${CMAKE_CURRENT_LIST_DIR}/find_modules"
+ "${CMAKE_CURRENT_LIST_DIR}/utils"
+ )
+
+ find_package(CGNS)
+
+ IF (CGNS_FOUND)
+ set(TPL_CGNS_LIBRARIES ${CGNS_LIBRARIES} CACHE PATH
+ "List of semi-colon seprated (full) paths to the CGNS libraries")
+ set(TPL_CGNS_INCLUDE_DIRS ${CGNS_INCLUDE_DIRS} CACHE PATH
+ "List of semi-colon seprated list of directories containing CGNS header files")
+ ENDIF()
+
+ENDIF()
+
+#
+# Third, call TRIBITS_TPL_FIND_INCLUDE_DIRS_AND_LIBRARIES()
+#
+TRIBITS_TPL_FIND_INCLUDE_DIRS_AND_LIBRARIES( CGNS
+ REQUIRED_HEADERS ${REQUIRED_HEADERS}
+ REQUIRED_LIBS_NAMES ${REQUIRED_LIBS_NAMES})
diff --git a/tribits/common_tpls/FindTPLNetcdf.cmake b/tribits/common_tpls/FindTPLNetcdf.cmake
new file mode 100644
index 000000000..128651cd6
--- /dev/null
+++ b/tribits/common_tpls/FindTPLNetcdf.cmake
@@ -0,0 +1,97 @@
+# @HEADER
+# ************************************************************************
+#
+# TriBITS: Tribal Build, Integrate, and Test System
+# Copyright 2016 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
+
+#
+# First, set up the variables for the (backward-compatible) TriBITS way of
+# finding Netcdf. These are used in case FIND_PACKAGE(NetCDF ...) is not
+# called or does not find NetCDF. Also, these variables need to be non-null
+# in order to trigger the right behavior in the function
+# TRIBITS_TPL_FIND_INCLUDE_DIRS_AND_LIBRARIES().
+#
+
+SET(REQUIRED_HEADERS netcdf.h)
+SET(REQUIRED_LIBS_NAMES netcdf)
+
+#
+# Second, search for Netcdf components (if allowed) using the standard
+# FIND_PACKAGE(NetCDF ...).
+#
+TRIBITS_TPL_ALLOW_PRE_FIND_PACKAGE(Netcdf Netcdf_ALLOW_PREFIND)
+IF (Netcdf_ALLOW_PREFIND)
+
+ MESSAGE("-- Using FIND_PACKAGE(Netcdf ...) ...")
+
+ SET(CMAKE_MODULE_PATH
+ "${CMAKE_MODULE_PATH}"
+ "${CMAKE_CURRENT_LIST_DIR}/find_modules"
+ "${CMAKE_CURRENT_LIST_DIR}/utils"
+ )
+
+ find_package(NetCDF)
+
+ IF (NetCDF_FOUND)
+ SET(DOCSTR "List of semi-colon separated paths to look for the TPL Netcdf")
+ set(TPL_Netcdf_Enables_Netcdf4 ${NetCDF_NEEDS_HDF5} CACHE BOOL
+ "True if netcdf enables netcdf-4")
+ set(TPL_Netcdf_Enables_PNetcdf ${NetCDF_NEEDS_PNetCDF} CACHE BOOL
+ "True if netcdf enables pnetcdf")
+ set(TPL_Netcdf_PARALLEL ${NetCDF_PARALLEL} CACHE BOOL
+ "True if netcdf compiled with parallel enabled")
+ set(TPL_Netcdf_LIBRARY_DIRS ${_hdf5_LIBRARY_SEARCH_DIRS} CACHE PATH
+ "${DOCSTR} library files")
+ set(TPL_Netcdf_LIBRARIES ${NetCDF_LIBRARIES} CACHE PATH
+ "List of semi-colon seprated library names (not 'lib' or extension).")
+ set(TPL_Netcdf_INCLUDE_DIRS ${NetCDF_INCLUDE_DIRS} CACHE PATH
+ "${DOCSTR} header files.")
+ ENDIF()
+
+ENDIF()
+
+#
+# Third, call TRIBITS_TPL_FIND_INCLUDE_DIRS_AND_LIBRARIES()
+#
+TRIBITS_TPL_FIND_INCLUDE_DIRS_AND_LIBRARIES( Netcdf
+ REQUIRED_HEADERS ${REQUIRED_HEADERS}
+ REQUIRED_LIBS_NAMES ${REQUIRED_LIBS_NAMES}
+ )
+# NOTE: If FIND_PACKAGE(Netcdf ...) was called and successfully found Netcdf,
+# then TRIBITS_TPL_FIND_INCLUDE_DIRS_AND_LIBRARIES() will use the already-set
+# variables TPL_Netcdf_INCLUDE_DIRS and TPL_Netcdf_LIBRARIES and then print
+# them out (and set some other standard variables as well). This is the final
+# "hook" into the TriBITS TPL system.
diff --git a/tribits/core/package_arch/CMakeLists.txt b/tribits/common_tpls/FindTPLPnetcdf.cmake
similarity index 91%
rename from tribits/core/package_arch/CMakeLists.txt
rename to tribits/common_tpls/FindTPLPnetcdf.cmake
index 717e86a69..71c3120c9 100644
--- a/tribits/core/package_arch/CMakeLists.txt
+++ b/tribits/common_tpls/FindTPLPnetcdf.cmake
@@ -2,7 +2,7 @@
# ************************************************************************
#
# TriBITS: Tribal Build, Integrate, and Test System
-# Copyright 2013 Sandia Corporation
+# Copyright 2016 Sandia Corporation
#
# Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
# the U.S. Government retains certain rights in this software.
@@ -37,4 +37,7 @@
# ************************************************************************
# @HEADER
-ADD_SUBDIRECTORY(UnitTests)
+TRIBITS_TPL_FIND_INCLUDE_DIRS_AND_LIBRARIES( Pnetcdf
+ REQUIRED_HEADERS pnetcdf.h
+ REQUIRED_LIBS_NAMES pnetcdf
+ )
diff --git a/tribits/common_tpls/find_modules/FindCGNS.cmake b/tribits/common_tpls/find_modules/FindCGNS.cmake
new file mode 100644
index 000000000..ca87f64ed
--- /dev/null
+++ b/tribits/common_tpls/find_modules/FindCGNS.cmake
@@ -0,0 +1,290 @@
+# -*- mode: cmake -*-
+# @HEADER
+# ************************************************************************
+#
+# TriBITS: Tribal Build, Integrate, and Test System
+# Copyright 2016 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
+#
+# Based on the MSTK CGNS Find Module
+#
+# Usage:
+# Control the search through CGNS_DIR or setting environment variable
+# CGNS_ROOT to the CGNS installation prefix.
+#
+# This module does not search default paths!
+#
+# Following variables are set:
+# CGNS_FOUND (BOOL) Flag indicating if CGNS was found
+# CGNS_INCLUDE_DIR (PATH) Path to the CGNS include file
+# CGNS_INCLUDE_DIRS (LIST) List of all required include files
+# CGNS_LIBRARY_DIR (PATH) Path to the CGNS library
+# CGNS_LIBRARY (FILE) CGNS library
+# CGNS_LIBRARIES (LIST) List of all required CGNS libraries
+#
+# #############################################################################
+
+# Standard CMake modules see CMAKE_ROOT/Modules
+include(FindPackageHandleStandardArgs)
+
+# MSTK CMake functions see /cmake/modules for source
+include(AddPackageDependency)
+
+# If CGNS_ROOT was defined in the environment, use it.
+# Definition from the command line will take precedence.
+if (NOT CGNS_ROOT AND NOT $ENV{CGNS_ROOT} STREQUAL "")
+ set(CGNS_ROOT $ENV{CGNS_ROOT})
+endif()
+
+# CGNS_DIR is DEPRECATED WARN THE USER if it is set
+if (NOT CGNS_ROOT AND CGNS_DIR )
+ message(WARNING "The configuration parameter CGNS_DIR is deprecated."
+ " Please use CGNS_ROOT instead to define the CGNS installation")
+ set(CGNS_ROOT ${CGNS_DIR})
+endif()
+
+# Add the usual paths for searching using the CGNS_ROOT variable
+if (CGNS_ROOT)
+ list(APPEND _cgns_INCLUDE_SEARCH_DIRS
+ ${CGNS_ROOT}/include
+ ${CGNS_ROOT})
+
+ list(APPEND _cgns_LIBRARY_SEARCH_DIRS
+ ${CGNS_ROOT}/lib
+ ${CGNS_ROOT})
+
+ list(APPEND _cgns_BINARY_SEARCH_DIRS
+ ${CGNS_ROOT}/bin
+ ${CGNS_ROOT})
+endif()
+
+if ( CGNS_LIBRARIES AND CGNS_INCLUDE_DIRS )
+
+ # Do nothing. Variables are set. No need to search again
+
+else(CGNS_LIBRARIES AND CGNS_INCLUDE_DIRS)
+
+ # Cache variables
+ if(CGNS_ROOT)
+ set(CGNS_ROOT "${CGNS_ROOT}" CACHE PATH "Path to search for CGNS include and library files")
+ endif()
+
+ if(CGNS_INCLUDE_DIR)
+ set(CGNS_INCLUDE_DIR "${CGNS_INCLUDE_DIR}" CACHE PATH "Path to search for CGNS include files")
+ endif()
+
+ if(CGNS_LIBRARY_DIR)
+ set(CGNS_LIBRARY_DIR "${CGNS_LIBRARY_DIR}" CACHE PATH "Path to search for CGNS library files")
+ endif()
+
+
+ # Search for include files
+ # Search order preference:
+ # (1) CGNS_INCLUDE_DIR - check existence of path AND if the include files exist
+ # (2) CGNS_ROOT/
+ # (3) Default CMake paths See cmake --html-help=out.html file for more information.
+ #
+ set(cgns_inc_names "cgnslib.h")
+ if (CGNS_INCLUDE_DIR)
+
+ if (EXISTS "${CGNS_INCLUDE_DIR}")
+
+ find_path(cdf_test_include_path
+ NAMES ${cgns_inc_names}
+ HINTS ${CGNS_INCLUDE_DIR}
+ NO_DEFAULT_PATH)
+ if(NOT cdf_test_include_path)
+ message(SEND_ERROR "Can not locate ${cgns_inc_names} in ${CGNS_INCLUDE_DIR}")
+ endif()
+ set(CGNS_INCLUDE_DIR "${cdf_test_include_path}")
+
+ else()
+ message(SEND_ERROR "CGNS_INCLUDE_DIR=${CGNS_INCLUDE_DIR} does not exist")
+ set(CGNS_INCLUDE_DIR "CGNS_INCLUDE_DIR-NOTFOUND")
+ endif()
+
+ else()
+
+ set(cgns_inc_suffixes "include")
+ if(CGNS_ROOT)
+
+ if (EXISTS "${CGNS_ROOT}" )
+
+ find_path(CGNS_INCLUDE_DIR
+ NAMES ${cgns_inc_names}
+ HINTS ${CGNS_ROOT}/include
+ PATH_SUFFIXES ${cgns_inc_suffixes}
+ NO_DEFAULT_PATH)
+
+ else()
+ message(SEND_ERROR "CGNS_ROOT=${CGNS_ROOT} does not exist")
+ set(CGNS_INCLUDE_DIR "CGNS_INCLUDE_DIR-NOTFOUND")
+ endif()
+
+
+ else()
+
+ find_path(CGNS_INCLUDE_DIR
+ NAMES ${cgns_inc_names}
+ PATH_SUFFIXES ${cgns_inc_suffixes})
+
+ endif()
+
+ endif()
+
+
+ if ( NOT CGNS_INCLUDE_DIR )
+ message(SEND_ERROR "Can not locate CGNS include directory")
+ endif()
+
+ # Search for libraries
+ # Search order preference:
+ # (1) CGNS_LIBRARY_DIR - check existence of path AND if the include files exist
+ # (2) CGNS_ROOT/
+ # (3) Default CMake paths See cmake --html-help=out.html file for more information.
+ #
+ if (CGNS_LIBRARY_DIR)
+
+ if (EXISTS "${CGNS_LIBRARY_DIR}")
+
+ find_library(CGNS_LIBRARY
+ NAMES cgns
+ HINTS ${CGNS_LIBRARY_DIR}
+ NO_DEFAULT_PATH)
+
+ else()
+ message(SEND_ERROR "CGNS_LIBRARY_DIR=${CGNS_LIBRARY_DIR} does not exist")
+ set(CGNS_LIBRARY "CGNS_LIBRARY-NOTFOUND")
+ endif()
+
+ else()
+
+ if(CGNS_ROOT)
+
+ if (EXISTS "${CGNS_ROOT}" )
+
+ find_library(CGNS_LIBRARY
+ NAMES cgns
+ HINTS ${CGNS_ROOT}
+ PATH_SUFFIXES "lib" "Lib"
+ NO_DEFAULT_PATH)
+
+ else()
+ message(SEND_ERROR "CGNS_ROOT=${CGNS_ROOT} does not exist")
+ set(CGNS_LIBRARY "CGNS_LIBRARY-NOTFOUND")
+ endif()
+
+
+ else()
+
+ find_library(CGNS_LIBRARY
+ NAMES cgns
+ PATH_SUFFIXES ${cgns_lib_suffixes})
+
+ endif()
+
+ endif()
+
+ if ( NOT CGNS_LIBRARY )
+ message(SEND_ERROR "Can not locate CGNS library")
+ endif()
+
+ # Define the LIBRARIES and INCLUDE_DORS
+ set(CGNS_INCLUDE_DIRS ${CGNS_INCLUDE_DIR})
+ set(CGNS_LIBRARIES ${CGNS_CXX_LIBRARY} ${CGNS_LIBRARY})
+
+ # Need to find the CGNS config script to check for HDF5
+ set(cgns_config_h "${CGNS_INCLUDE_DIR}/cgnsconfig.h" )
+ if (EXISTS ${cgns_config_h})
+ file(STRINGS "${cgns_config_h}" cg_build_hdf5_string REGEX "^#define CG_BUILD_HDF5")
+ string(REGEX REPLACE "[^0-9]" "" cg_build_hdf5 "${cg_build_hdf5_string}")
+ if ( cg_build_hdf5 EQUAL 51 ) # Kluge: define is 1, but the 5 comes from hdf5
+ message(STATUS "CGNS requires HDF5")
+ add_package_dependency(CGNS DEPENDS_ON HDF5)
+ endif()
+ else()
+ message(STATUS "CGNS does not have cgnsconfig.h; assuming CGNS depends on HDF5")
+ add_package_dependency(CGNS DEPENDS_ON HDF5)
+ endif()
+
+ # Need to find the CGNS types include to check for SCOPING
+ set(cgns_types_h "${CGNS_INCLUDE_DIR}/cgnstypes.h" )
+ if (EXISTS ${cgns_types_h})
+ file(STRINGS "${cgns_types_h}" cg_scoping_string REGEX "^#define CG_BUILD_SCOPE")
+ string(REGEX REPLACE "[^0-9]" "" cg_scoping "${cg_scoping_string}")
+ if ( cg_scoping EQUAL 1 )
+ message(STATUS "CGNS Scoping Enabled as Required")
+ else()
+ message(SEND_ERROR "CGNS Scoping *Not* Enabled as Required. Rebuild CGNS library with CGNS_ENABLE_SCOPING defined.")
+ endif()
+ else()
+ message(SEND_ERROR "CGNS: Could not find cgnstypes.h")
+ endif()
+endif(CGNS_LIBRARIES AND CGNS_INCLUDE_DIRS )
+
+# Send useful message if everything is found
+find_package_handle_standard_args(CGNS DEFAULT_MSG
+ CGNS_LIBRARIES
+ CGNS_INCLUDE_DIRS)
+
+# find_package)handle)standard_args should set CGNS_FOUND but it does not!
+if ( CGNS_LIBRARIES AND CGNS_INCLUDE_DIRS)
+ set(CGNS_FOUND TRUE)
+else()
+ set(CGNS_FOUND FALSE)
+endif()
+
+# --- Provide a summary of what the module found
+if ( NOT CGNS_FIND_QUIETLY )
+
+ # Create a not found list
+ message(STATUS "\tCGNS_INCLUDE_DIRS = ${CGNS_INCLUDE_DIRS}")
+ message(STATUS "\tCGNS_LIBRARIES = ${CGNS_LIBRARIES}")
+
+endif()
+# For compatability with TriBITS:
+SET(DOCSTR "List of semi-colon separated paths to look for the TPL CGNS")
+
+set(TPL_CGNS_LIBRARIES ${CGNS_LIBRARIES} CACHE PATH ${DOCSTR})
+set(TPL_CGNS_INCLUDE_DIRS ${CGNS_INCLUDE_DIRS} CACHE PATH ${DOCSTR})
+
+mark_as_advanced(
+ CGNS_INCLUDE_DIR
+ CGNS_INCLUDE_DIRS
+ CGNS_LIBRARY
+ CGNS_CXX_LIBRARY
+ CGNS_LIBRARIES
+ CGNS_LIBRARY_DIR
+)
diff --git a/tribits/common_tpls/find_modules/FindHDF5.cmake b/tribits/common_tpls/find_modules/FindHDF5.cmake
new file mode 100644
index 000000000..0be888aba
--- /dev/null
+++ b/tribits/common_tpls/find_modules/FindHDF5.cmake
@@ -0,0 +1,604 @@
+# - FindHDF5.cmake
+#
+# The FindHDF5 module with the CMake distribution will not work if
+# the HDF5 compilers are not installed or if more the one hdf5 is on the
+# system. The search logic also depends on an environment variable
+# HDF5_ROOT. This module removes both requirements and insteead relies on the
+# libhdf5.settings file found in the library installation directory
+#
+# This module will ONLY work for HDF5 configured through the GNU
+# autoconf script configure. When built through CMake, the *config.cmake
+# files should be used.
+#
+#
+# Based on version from MSTK which has the following:
+# ACKNOWLEDGEMENT:
+# This file has been adapted from the build system of the Amanzi project
+# under the DOE/ASCEM code project. It is used here based on the BSD open
+# source licensing of the Amanzi code base. Many thanks to the Amanzi build
+# system developers
+#
+# @HEADER
+# ************************************************************************
+#
+# TriBITS: Tribal Build, Integrate, and Test System
+# Copyright 2016 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#
+
+# CMake includes
+include(FindPackageHandleStandardArgs)
+
+include(AddImportedLibrary)
+
+# ---------------------------------------------------------------------------- #
+# Functions/Macros
+#
+#
+macro(_HDF5_BOOLEAN_CONVERT _var)
+ string(TOUPPER ${${_var}} _var_UC)
+ if(_var_UC)
+ set(${_var} TRUE)
+ else()
+ set(${_var} FALSE)
+ endif()
+endmacro(_HDF5_BOOLEAN_CONVERT)
+
+
+
+
+function(_HDF5_CHOMP_STRING old_str new_str_var)
+
+ string(REGEX REPLACE "[\t\r\n]" " " _tmp "${old_str}")
+ #string(REGEX REPLACE " " "S" _tmp "${_tmp}")
+ string(REGEX REPLACE "^ +" "" _tmp "${_tmp}")
+ string(REGEX REPLACE " +$" "" _tmp "${_tmp}")
+
+ set(${new_str_var} ${_tmp} PARENT_SCOPE)
+
+endfunction(_HDF5_CHOMP_STRING)
+
+
+
+function(_HDF5_PARSE_SETTINGS_FILE _file _key _value)
+
+ set(_tmp ${_value}-NOTFOUND)
+ file(STRINGS ${_file} _output
+ REGEX "^[ \t]*${_key}:|^${_key}")
+
+ if(_output)
+ # _HDF5_CHOMP_STRING will remove all tabs, newlines and returns
+ # It also removes leading and trailing whitespace
+ _HDF5_CHOMP_STRING(${_output} _output)
+ # Remove the key signature
+ string(REGEX REPLACE "${_key}:" "" _output "${_output}")
+ # CHOMP again to remove leading and trailing whitespace
+ if (_output)
+ _HDF5_CHOMP_STRING(${_output} _output)
+ endif()
+ # Entry is non-empty if ANY non-space character is left
+ if ( "${_output}" MATCHES "[^ ]" )
+ set(_tmp ${_output})
+ endif()
+ endif()
+
+ set(${_value} ${_tmp} PARENT_SCOPE)
+
+endfunction(_HDF5_PARSE_SETTINGS_FILE)
+
+
+
+function(_HDF5_DEFINE_VERSION _file _var)
+
+ set(_search_key "HDF5 Version")
+ _HDF5_PARSE_SETTINGS_FILE(${_file} ${_search_key} _tmp)
+
+ set(${_var} ${_tmp} PARENT_SCOPE)
+
+endfunction(_HDF5_DEFINE_VERSION _var)
+
+
+
+function(_HDF5_DEFINE_PARALLEL_BUILD _file _var)
+
+ set(_search_key "Parallel HDF5")
+ _HDF5_PARSE_SETTINGS_FILE(${_file} ${_search_key} _tmp)
+ _HDF5_BOOLEAN_CONVERT(_tmp)
+
+ set(${_var} ${_tmp} PARENT_SCOPE)
+
+endfunction(_HDF5_DEFINE_PARALLEL_BUILD _file _var)
+
+
+
+function(_HDF5_EXTRA_LIBRARY_DIRS _file _var)
+
+ # Settings file has several locations to list LDFLAGS
+ # We'll pick them all and sort out later.
+ set(_search_ldflags_keys "AM_LDFLAGS;H5_LDFLAGS;LDFLAGS;Extra libraries")
+ set(_ldflags "")
+ foreach ( _key ${_search_ldflags_keys})
+ _HDF5_PARSE_SETTINGS_FILE(${_file} ${_key} _tmp)
+ if ( _tmp )
+ set(_ldflags "${_ldflags} ${_tmp}")
+ endif()
+ endforeach()
+
+ # Now match all the -L flags
+ string(REGEX MATCHALL "-L([^\" ]+|\"[^\"]+\")" _lib_path_flags ${_ldflags})
+
+ # Loop through each
+ set(_directories)
+ foreach(_dir ${_lib_path_flags})
+ string(REGEX REPLACE "^-L" "" _dir ${_dir})
+ string(REGEX REPLACE "//" "/" _dir ${_dir})
+ list(APPEND _directories ${_dir})
+ endforeach()
+
+ if(_directories)
+ list(REMOVE_DUPLICATES _directories)
+ endif()
+ set(${_var} ${_directories} PARENT_SCOPE)
+
+endfunction(_HDF5_EXTRA_LIBRARY_DIRS _file _var)
+
+function(_HDF5_LIBRARY_PATH _file _var)
+
+ # Settings file has several locations to list LDFLAGS
+ # We'll pick them all and sort out later.
+ set(_search_key "Installation point")
+ _HDF5_PARSE_SETTINGS_FILE(${_file} ${_search_key} _tmp)
+
+ set(${_var} ${_tmp} PARENT_SCOPE)
+endfunction(_HDF5_LIBRARY_PATH _file _var)
+
+
+
+function(_HDF5_EXTRA_LIBRARIES _file _var)
+
+ # Find all the extra libraries defined in the file
+ set(_search_key "Extra libraries")
+ set(_libraries)
+ _HDF5_PARSE_SETTINGS_FILE(${_file} ${_search_key} _library_flags)
+ string( REGEX MATCHALL "[, ]-l([^\", ]+)|^-l([^\", ]+)" _library_name_flags ${_library_flags})
+ foreach ( _lib ${_library_name_flags} )
+ _HDF5_CHOMP_STRING(${_lib} _lib_chomp)
+ string( REGEX REPLACE "^[,]-l|^-l" "" _lib_chomp ${_lib_chomp})
+ list(APPEND _libraries ${_lib_chomp})
+ endforeach()
+
+ # Grab all the extra library paths to build a search list
+ _HDF5_EXTRA_LIBRARY_DIRS(${_file} _search_list)
+
+ # Loop through each library
+ # (1) find_library with the search list for hints
+ # (2) Add library name if find succeeds, otherwise
+ # add the name to the list.
+ set(_return_list)
+ foreach( _lib ${_libraries})
+
+ # Search with hints
+ set(_lib_name _lib_name-NOTFOUND)
+ find_library(_lib_name
+ NAMES ${_lib}
+ HINTS ${_search_list}
+ )
+ # Search without hints if the first search fails
+ if ( NOT _lib_name )
+ find_library(_lib_name NAMES ${_lib})
+ endif()
+
+ # Add the full library name if either find succeeded
+ # otherwise add the library name.
+ if(_lib_name)
+ list(APPEND _return_list ${_lib_name})
+ else()
+ list(APPEND _return_list ${_lib})
+ endif()
+
+ endforeach()
+
+ set(${_var} ${_return_list} PARENT_SCOPE)
+
+endfunction(_HDF5_EXTRA_LIBRARIES _file _var)
+
+
+
+function(_HDF5_EXTRA_INCLUDE_DIRS _file _var)
+
+ # Settings file has several locations to list LDFLAGS
+ # We'll pick them all and sort out later.
+
+ # Keys in the file changed around version 1.8.3
+ set(_search_cflags_keys "CFLAGS;H5_CFLAGS;AM_CFLAGS;CPPFLAGS;H5_CPPFLAGS;AM_CPPFLAGS")
+
+ if ( HDF5_VERSION_STRING )
+ if ( "${HDF5_VERSION_STRING}" VERSION_LESS "1.8.3")
+ set(_search_cflags_keys "CFLAGS/H5_CFLAGS;AM_CFLAGS;CPPFLAGS/H5_CPPFLAGS;AM_CPPFLAGS")
+ endif()
+ endif()
+
+ set(_cflags "")
+ foreach ( _key ${_search_cflags_keys})
+ _HDF5_PARSE_SETTINGS_FILE(${_file} ${_key} _tmp)
+ if ( _tmp )
+ set(_cflags "${_cflags} ${_tmp}")
+ endif()
+ endforeach()
+
+ # Now match all the -I flags
+ if (${_cflags})
+ string(REGEX MATCHALL "-I([^\" ]+|\"[^\"]+\")" _inc_path_flags ${_cflags})
+
+ # Loop through each
+ set(_directories)
+ foreach(_dir ${_inc_path_flags})
+ string(REGEX REPLACE "^-I" "" _dir ${_dir})
+ string(REGEX REPLACE "//" "/" _dir ${_dir})
+ list(APPEND _directories ${_dir})
+ endforeach()
+ endif()
+
+ if(_directories)
+ list(REMOVE_DUPLICATES _directories)
+ endif()
+ set(${_var} ${_directories} PARENT_SCOPE)
+
+endfunction(_HDF5_EXTRA_INCLUDE_DIRS _file _var)
+
+#
+# End Functions/Macros
+# ---------------------------------------------------------------------------- #
+
+# ------------------------------------ #
+# Initialize search paths and criteria #
+# ------------------------------------ #
+
+# If HDF5_ROOT was defined in the environment, use it.
+# Definition from the command line will take precedence.
+if (NOT HDF5_ROOT AND NOT $ENV{HDF5_ROOT} STREQUAL "")
+ set(HDF5_ROOT $ENV{HDF5_ROOT})
+endif()
+
+# HDF5_DIR is DEPRECATED WARN THE USER if it is set
+if (NOT HDF5_ROOT AND HDF5_DIR )
+ message(WARNING "The configuration parameter HDF5_DIR is deprecated."
+ " Please use HDF5_ROOT instead to define the HDF5 installation")
+ set(HDF5_ROOT ${HDF5_DIR})
+endif()
+
+# Add the usual paths for searching using the HDF5_ROOT variable
+if (HDF5_ROOT)
+ list(APPEND _hdf5_INCLUDE_SEARCH_DIRS
+ ${HDF5_ROOT}/include
+ ${HDF5_ROOT}/include/hdf5/serial
+ ${HDF5_ROOT}
+ )
+
+ list(APPEND _hdf5_LIBRARY_SEARCH_DIRS
+ ${HDF5_ROOT}/lib
+ ${HDF5_ROOT}
+ )
+
+ list(APPEND _hdf5_BINARY_SEARCH_DIRS
+ ${HDF5_ROOT}/bin
+ ${HDF5_ROOT}
+ )
+endif()
+
+# Restrict the search to HDF5_ROOT if user does not want other
+# directories searched.
+if ( HDF5_NO_SYSTEM_PATHS )
+ set(_hdf5_FIND_OPTIONS NO_CMAKE_SYSTEM_PATH)
+endif()
+
+# A list of valid components
+set(HDF5_VALID_COMPONENTS HL C)
+
+# A list of requested components, invalid components are ignored.
+if ( NOT HDF5_FIND_COMPONENTS )
+ set(HDF5_SEARCH_COMPONENTS "C")
+else()
+ foreach ( component ${HDF5_FIND_COMPONENTS} )
+ list(FIND HDF5_VALID_COMPONENTS ${component} component_idx)
+ if ( ${component_idx} EQUAL -1 )
+ message(SEND_ERROR "${component} is not a valid HDF5 component")
+ else()
+ list(APPEND HDF5_SEARCH_COMPONENTS ${component})
+ endif()
+ endforeach()
+endif()
+
+
+# ------------------------------------ #
+# Perform CMake Search #
+# ------------------------------------ #
+
+
+
+if ( HDF5_INCLUDE_DIRS AND HDF5_LIBRARIES )
+ # Do nothing if the user has defined these on the command line
+else()
+
+ # --- Target names used in both the CMake configure files
+ # and here to create targets
+ set( HDF5_C_TARGET hdf5 )
+ set( HDF5_HL_TARGET hdf5_hl )
+
+ # ------------------------------------------------------ #
+ # Search Logic
+ # (1) Look for a CMake configuration file(s)
+ # (2) If the above fails, search by name the include and
+ # library files.
+ # Step one will be bypassed if HDF5_NO_HDF5_CMAKE is set
+
+ # --- Search for a CMake Configuration
+ if ( NOT HDF5_NO_HDF5_CMAKE )
+
+ # Call find package only looking for CMake config files
+ find_package(HDF5
+ HINTS ${_hdf5_INCLUDE_SEARCH_DIRS} ${_hdf5_LIBRARY_SEARCH_DIRS}
+ QUIET
+ NO_MODULE)
+
+ # If located a HDF5 configuration file
+ if (HDF5_FOUND)
+
+ message(STATUS "Found CMake configuration file HDF5 ( directory ${HDF5_ROOT} )")
+
+ # Want consistency between this module and the CMake file
+ set(HDF5_VERSION ${HDF5_VERSION_STRING})
+ set(HDF5_IS_PARALLEL ${HDF5_ENABLE_PARALLEL})
+ set(HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIR})
+
+ # Loop through each possible target and
+ # build the HDF5_LIBRARIES.
+ # Target names set by the HDF5 configuration file
+ set(HDF5_LIBRARIES)
+
+ foreach( _component ${HDF5_VALID_COMPONENTS} )
+ set(target ${HDF5_${_component}_TARGET})
+ if ( TARGET ${target} )
+ set(HDF5_${_component}_LIBRARY ${target})
+ list(APPEND HDF5_LIBRARIES ${HDF5_${_component}_LIBRARY})
+ endif()
+ endforeach()
+
+ # Define HDF5_C_LIBRARIES to contain hdf5 and hdf5_hl C libraries
+ set(HDF5_C_LIBRARIES ${HDF5_HL_LIBRARY} ${HDF5_CLIBRARY})
+
+
+ endif(HDF5_FOUND)
+
+ endif(NOT HDF5_NO_HDF5_CMAKE)
+
+ # --- If HDF5 is NOT found search for the settings file installed with the libraries
+ # Will allow the user to define the HDF5_SETTINGS_FILE before attempting a search.
+ if ( NOT HDF5_FOUND AND ( NOT HDF5_SETTINGS_FILE ) )
+ find_file(HDF5_SETTINGS_FILE
+ NAMES libhdf5.settings
+ HINTS ${_hdf5_LIBRARY_SEARCH_DIRS}
+ ${_hdf5_FIND_OPTIONS})
+ endif()
+
+
+ # --- Now search by file name. HDF5_INCLUDE_DIRS and HD5_LIBRARIES will
+ # not be set if the CMake configuration search was successful.
+
+ # --- Search for the include files
+ if ( NOT HDF5_INCLUDE_DIRS )
+ find_path(HDF5_INCLUDE_DIR
+ NAMES hdf5.h
+ PATHS ${_hdf5_INCLUDE_SEARCH_DIRS}
+ ${_hdf5_FIND_OPTIONS}
+ )
+
+ if ( NOT HDF5_INCLUDE_DIR )
+ message(FATAL_ERROR "Failed to locate HDF5 include file")
+ endif()
+
+ # Check the settings file for other include directories
+ if ( HDF5_SETTINGS_FILE )
+ _HDF5_EXTRA_INCLUDE_DIRS(${HDF5_SETTINGS_FILE} extra_inc_dirs)
+ endif()
+
+ # Build HDF5_INCLUDE_DIRS
+ set(HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIR} ${extra_inc_dirs})
+ list(REMOVE_DUPLICATES HDF5_INCLUDE_DIRS)
+
+ endif(NOT HDF5_INCLUDE_DIRS)
+
+ # Search for the libraries
+
+ if (HDF5_SETTINGS_FILE)
+ _HDF5_LIBRARY_PATH(${HDF5_SETTINGS_FILE} _hdf5_path)
+ set(_hdf5_LIBRARY_SEARCH_DIRS ${_hdf5_path}/lib)
+ endif()
+
+ if ( NOT HDF5_LIBRARIES )
+
+ # --- Search for the C library
+ find_library(_HDF5_C_LIBRARY
+ NAMES hdf5 hdf5_serial
+ HINTS ${_hdf5_LIBRARY_SEARCH_DIRS}
+ ${_hdf5_FIND_OPTIONS}
+ )
+
+ # Since all other libraries need this core library, throw a
+ # fatal error her if it is not found.
+ if ( NOT _HDF5_C_LIBRARY )
+ message(FATAL_ERROR "Could not locate the C HDF5 library")
+ endif()
+
+ # Define the target for the C library
+ if (HDF5_SETTINGS_FILE)
+ _HDF5_EXTRA_LIBRARIES(${HDF5_SETTINGS_FILE} HDF5_LINK_LIBRARIES)
+ endif()
+
+ add_imported_library(${HDF5_C_TARGET}
+ LOCATION ${_HDF5_C_LIBRARY}
+ LINK_LANGUAGES "C"
+ LINK_INTERFACE_LIBRARIES "${HDF5_LINK_LIBRARIES}")
+ set(HDF5_C_LIBRARY ${HDF5_C_TARGET})
+
+ # --- Search for the other possible compnent libraries
+
+ # Search for the high-level (HL) library
+ find_library(_HDF5_HL_LIBRARY
+ NAMES hdf5_hl
+ HINTS ${_hdf5_LIBRARY_SEARCH_DIRS}
+ ${_hdf5_FIND_OPTIONS})
+
+ # --- Create the imported targets for each of the components found
+ # and update HDF5_LIBRARIES.
+
+ # HL Library
+ if ( _HDF5_HL_LIBRARY )
+ add_imported_library(${HDF5_HL_TARGET}
+ LOCATION ${_HDF5_HL_LIBRARY}
+ LINK_LANGUAGES "C"
+ LINK_INTERFACE_LIBRARIES "${HDF5_C_TARGET}")
+ set(HDF5_HL_LIBRARY ${HDF5_HL_TARGET})
+ endif()
+
+ # Define the HDF5__LIBRARY to point to the target
+ foreach ( _component ${HDF5_VALID_COMPONENTS} )
+ if ( TARGET ${HDF5_${_component}_TARGET} )
+ set(HDF5_${_component}_LIBRARY ${HDF5_${_component}_TARGET})
+ endif()
+ endforeach()
+
+ # Define the HDF5_LIBRARIES variable
+ set(HDF5_LIBRARY_TARGETS
+ ${HDF5_HL_LIBRARY}
+ ${HDF5_C_LIBRARY})
+
+ # Define the HDF5_C_LIBRARIES variable
+ set(HDF5_C_LIBRARIES ${HDF5_HL_LIBRARY} ${HDF5_C_LIBRARY})
+
+ # HDF5 and extra libraries listed as full paths rather than
+ # libraries for the purposes of exporting
+
+ set(HDF5_LIBRARIES)
+ foreach (_component ${HDF5_VALID_COMPONENTS})
+ if ( TARGET ${HDF5_${_component}_TARGET} )
+ list(APPEND HDF5_LIBRARIES ${_HDF5_${_component}_LIBRARY})
+ endif()
+ endforeach()
+ list(APPEND HDF5_LIBRARIES ${HDF5_LINK_LIBRARIES})
+
+ endif(NOT HDF5_LIBRARIES)
+
+endif()
+
+set(HDF5_LIBRARIES_EXPORT ${HDF5_LIBRARIES})
+
+
+# --- Define the version string from the settings file if not already set
+if ( NOT HDF5_VERSION AND HDF5_SETTINGS_FILE )
+ _HDF5_DEFINE_VERSION(${HDF5_SETTINGS_FILE} HDF5_VERSION)
+endif()
+
+if ( NOT HDF5_VERSION )
+ SET(HDF5_VERSION "Unknown")
+endif()
+
+# --- Define HDF5_IS_PARALLEL from the settings file if not already set
+if ( NOT HDF5_IS_PARALLEL AND HDF5_SETTINGS_FILE )
+ _HDF5_DEFINE_PARALLEL_BUILD(${HDF5_SETTINGS_FILE} HDF5_IS_PARALLEL)
+endif()
+
+# --- Search for HDF5 tools
+set(_hdf5_TOOLS h52gif h5copy h5debug h5diff h5dump h5import h5jam h5ls h5mkgrp h5stat)
+set(HDF5_TOOLS_FOUND)
+foreach( tool ${_hdf5_TOOLS})
+ string(TOUPPER "${tool}" tool_uc)
+ set(_hdf5_VAR_NAME HDF5_${tool_uc}_BINARY)
+ find_program(${_hdf5_VAR_NAME}
+ ${tool}
+ HINTS ${_hdf5_BINARY_SEARCH_DIRS}
+ ${_hdf5_FIND_OPTIONS})
+ if (${_hdf5_VAR_NAME})
+ list(APPEND HDF5_TOOLS_FOUND ${tool})
+ endif()
+endforeach()
+
+
+
+# --- Set the variables HDF5__FOUND FLAGS
+foreach ( _component ${HDF5_VALID_COMPONENTS} )
+ if( HDF5_${_component}_LIBRARY )
+ set(HDF5_${_component}_FOUND TRUE)
+ else()
+ set(HDF5_${_component}_FOUND FALSE)
+ endif()
+endforeach()
+
+# --- Provide a summary of what the module found
+if ( NOT HDF5_FIND_QUIETLY )
+
+ # Create a not found list
+
+ message(STATUS "HDF5 Version: ${HDF5_VERSION}")
+ message(STATUS "\tHDF5_INCLUDE_DIRS =${HDF5_INCLUDE_DIRS}")
+ message(STATUS "\tHDF5_LIBRARY_TARGETS =${HDF5_LIBRARY_TARGETS}")
+ message(STATUS "\tHDF5_LIBRARIES =${HDF5_LIBRARIES}")
+ message(STATUS "\tHDF5_LIBRARIES_EXPORT =${HDF5_LIBRARIES_EXPORT}")
+ message(STATUS "\tHDF5_LINK_LIBRARIES =${HDF5_LINK_LIBRARIES}")
+ message(STATUS "\tHDF5_IS_PARALLEL =${HDF5_IS_PARALLEL}")
+ message(STATUS "Found the following HDF5 component libraries")
+ set(HDF5_COMPONENTS_NOTFOUND)
+ foreach (_component ${HDF5_VALID_COMPONENTS} )
+ if ( HDF5_${_component}_FOUND )
+ #message(STATUS "\t HDF5_${_component}_LIBRARY\t\t=${HDF5_${_component}_LIBRARY}")
+ message(STATUS "\t${HDF5_${_component}_LIBRARY}")
+ else()
+ list(APPEND HDF5_COMPONENTS_NOTFOUND ${_component})
+ endif()
+ endforeach()
+ if ( HDF5_COMPONENTS_NOTFOUND )
+ message(STATUS "\tHDF5 Components not found: ${HDF5_COMPONENTS_NOTFOUND}")
+ endif()
+ message(STATUS "\tHDF5_TOOLS_FOUND: ${HDF5_TOOLS_FOUND}")
+
+endif()
+# For compatability with TriBITS:
+set(TPL_HDF5_LIBRARY_DIRS ${_hdf5_LIBRARY_SEARCH_DIRS})
+set(TPL_HDF5_LIBRARIES ${HDF5_LIBRARIES})
+set(TPL_HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIRS})
+
+find_package_handle_standard_args( HDF5 DEFAULT_MESSAGE
+ HDF5_INCLUDE_DIRS
+ HDF5_LIBRARIES
+ HDF5_VERSION)
diff --git a/tribits/common_tpls/find_modules/FindNetCDF.cmake b/tribits/common_tpls/find_modules/FindNetCDF.cmake
new file mode 100644
index 000000000..ce8a381b5
--- /dev/null
+++ b/tribits/common_tpls/find_modules/FindNetCDF.cmake
@@ -0,0 +1,463 @@
+# -*- mode: cmake -*-
+# @HEADER
+# ************************************************************************
+#
+# TriBITS: Tribal Build, Integrate, and Test System
+# Copyright 2016 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
+#
+# Based on the MSTK NetCDF Find Module which is from Amanzi open
+# source code https://software.lanl.gov/ascem/trac #
+# Usage:
+# Control the search through NetCDF_DIR or setting environment variable
+# NetCDF_ROOT to the NetCDF installation prefix.
+#
+# This module does not search default paths!
+#
+# Following variables are set:
+# NetCDF_FOUND (BOOL) Flag indicating if NetCDF was found
+# NetCDF_INCLUDE_DIR (PATH) Path to the NetCDF include file
+# NetCDF_INCLUDE_DIRS (LIST) List of all required include files
+# NetCDF_LIBRARY_DIR (PATH) Path to the NetCDF library
+# NetCDF_LIBRARY (FILE) NetCDF library
+# NetCDF_LIBRARIES (LIST) List of all required NetCDF libraries
+#
+# Additional variables set
+# NetCDF_C_LIBRARY (FILE) NetCDF C library
+# NetCDF_CXX_LIBRARY (FILE) NetCDF C++ library
+# NetCDF_LARGE_DIMS (BOOL) Checks the header files for size of
+# NC_MAX_DIMS and NC_MAX_VARS
+# Returns TRUE if
+# NC_MAX_DIMS >= 655363
+# NC_MAX_VARS >= 524288
+#
+# #############################################################################
+
+# Standard CMake modules see CMAKE_ROOT/Modules
+include(FindPackageHandleStandardArgs)
+
+# MSTK CMake functions see /cmake/modules for source
+include(AddPackageDependency)
+
+if ( NetCDF_LIBRARIES AND NetCDF_INCLUDE_DIRS )
+
+ # Do nothing. Variables are set. No need to search again
+
+else(NetCDF_LIBRARIES AND NetCDF_INCLUDE_DIRS)
+
+ # If NetCDF_ROOT was defined in the environment, use it.
+ # Definition from the command line will take precedence.
+ if (NOT NetCDF_ROOT AND NOT $ENV{NetCDF_ROOT} STREQUAL "")
+ set(NetCDF_ROOT $ENV{NetCDF_ROOT})
+ endif()
+
+ # NetCDF_DIR is DEPRECATED WARN THE USER if it is set
+ if (NOT NetCDF_ROOT AND NetCDF_DIR )
+ message(WARNING "The configuration parameter NetCDF_DIR is deprecated."
+ " Please use NetCDF_ROOT instead to define the NetCDF installation")
+ set(NetCDF_ROOT ${NetCDF_DIR})
+ endif()
+
+
+ # Cache variables
+ if(NetCDF_ROOT)
+ set(NetCDF_ROOT "${NetCDF_ROOT}" CACHE PATH "Path to search for NetCDF include and library files")
+ endif()
+
+ if(NetCDF_INCLUDE_DIR)
+ set(NetCDF_INCLUDE_DIR "${NetCDF_INCLUDE_DIR}" CACHE PATH "Path to search for NetCDF include files")
+ endif()
+
+ if(NetCDF_LIBRARY_DIR)
+ set(NetCDF_LIBRARY_DIR "${NetCDF_LIBRARY_DIR}" CACHE PATH "Path to search for NetCDF library files")
+ endif()
+
+ # Search for include files
+ # Search order preference:
+ # (1) NetCDF_INCLUDE_DIR - check existence of path AND if the include files exist
+ # (2) NetCDF_ROOT/
+ # (3) Default CMake paths See cmake --html-help=out.html file for more information.
+ #
+ set(netcdf_inc_names "netcdf.h")
+ if (NetCDF_INCLUDE_DIR)
+
+ if (EXISTS "${NetCDF_INCLUDE_DIR}")
+
+ find_path(cdf_test_include_path
+ NAMES ${netcdf_inc_names}
+ HINTS ${NetCDF_INCLUDE_DIR}
+ NO_DEFAULT_PATH)
+ if(NOT cdf_test_include_path)
+ message(SEND_ERROR "Can not locate ${netcdf_inc_names} in ${NetCDF_INCLUDE_DIR}")
+ endif()
+ set(NetCDF_INCLUDE_DIR "${cdf_test_include_path}")
+
+ else()
+ message(SEND_ERROR "NetCDF_INCLUDE_DIR=${NetCDF_INCLUDE_DIR} does not exist")
+ set(NetCDF_INCLUDE_DIR "NetCDF_INCLUDE_DIR-NOTFOUND")
+ endif()
+
+ else()
+
+ set(netcdf_inc_suffixes "include")
+ if(NetCDF_ROOT)
+
+ if (EXISTS "${NetCDF_ROOT}" )
+
+ find_path(NetCDF_INCLUDE_DIR
+ NAMES ${netcdf_inc_names}
+ HINTS ${NetCDF_ROOT}/include
+ PATH_SUFFIXES ${netcdf_inc_suffixes}
+ NO_DEFAULT_PATH)
+
+ else()
+ message(SEND_ERROR "NetCDF_ROOT=${NetCDF_ROOT} does not exist")
+ set(NetCDF_INCLUDE_DIR "NetCDF_INCLUDE_DIR-NOTFOUND")
+ endif()
+
+
+ else()
+
+ find_path(NetCDF_INCLUDE_DIR
+ NAMES ${netcdf_inc_names}
+ PATH_SUFFIXES ${netcdf_inc_suffixes})
+
+ endif()
+
+ endif()
+
+
+ if ( NOT NetCDF_INCLUDE_DIR )
+ message(SEND_ERROR "Can not locate NetCDF include directory")
+ endif()
+
+ # Large dimension and parallel check here
+ if ( NetCDF_INCLUDE_DIR )
+
+ set(netcdf_h "${NetCDF_INCLUDE_DIR}/netcdf.h" )
+ message(STATUS "NetCDF include file ${netcdf_h} will be searched for define values")
+
+ file(STRINGS "${netcdf_h}" netcdf_max_dims_string REGEX "^#define NC_MAX_DIMS")
+ string(REGEX REPLACE "[^0-9]" "" netcdf_max_dims "${netcdf_max_dims_string}")
+
+ file(STRINGS "${netcdf_h}" netcdf_max_vars_string REGEX "^#define NC_MAX_VARS")
+ string(REGEX REPLACE "[^0-9]" "" netcdf_max_vars "${netcdf_max_vars_string}")
+
+ if (
+ ( (netcdf_max_dims EQUAL 65536) OR (netcdf_max_dims GREATER 65536) ) AND
+ ( (netcdf_max_vars EQUAL 524288) OR (netcdf_max_vars GREATER 524288) )
+ )
+ set(NetCDF_LARGE_DIMS TRUE)
+ else()
+ message(WARNING "WARNING: The NetCDF found in ${NetCDF_ROOT} does not have the correct NC_MAX_DIMS and NC_MAX_VARS. "
+ "It may not be compatible with Exodus. See NetCDF-Mapping.md for details\n" )
+ set(NetCDF_LARGE_DIMS FALSE)
+ endif()
+
+ set(NetCDF_PARALLEL False)
+ find_path(meta_path
+ NAMES "netcdf_meta.h"
+ HINTS ${NetCDF_INCLUDE_DIR}
+ NO_DEFAULT_PATH)
+ if(meta_path)
+ # Search meta for NC_HAS_PARALLEL setting...
+ file(STRINGS "${meta_path}/netcdf_meta.h" netcdf_par_string REGEX "NC_HAS_PARALLEL")
+ string(REGEX REPLACE "[^0-9]" "" netcdf_par_val "${netcdf_par_string}")
+ # NOTE: The line for NC_HAS_PARALLEL has an hdf5 string in it which results
+ # netcdf_par_val being set to 05 or 15 above...
+ if (netcdf_par_val EQUAL 15)
+ set(NetCDF_PARALLEL True)
+ endif()
+ endif()
+
+ endif()
+
+ # Search for libraries
+ # Search order preference:
+ # (1) NetCDF_LIBRARY_DIR - check existence of path AND if the include files exist
+ # (2) NetCDF_ROOT/
+ # (3) Default CMake paths See cmake --html-help=out.html file for more information.
+ #
+ if (NetCDF_LIBRARY_DIR)
+
+ if (EXISTS "${NetCDF_LIBRARY_DIR}")
+
+ find_library(NetCDF_C_LIBRARY
+ NAMES netcdf
+ HINTS ${NetCDF_LIBRARY_DIR}
+ NO_DEFAULT_PATH)
+
+# find_library(NetCDF_CXX_LIBRARY
+# NAMES netcdf_c++
+# HINTS ${NetCDF_LIBRARY_DIR}
+# NO_DEFAULT_PATH)
+
+ else()
+ message(SEND_ERROR "NetCDF_LIBRARY_DIR=${NetCDF_LIBRARY_DIR} does not exist")
+ set(NetCDF_LIBRARY "NetCDF_C_LIBRARY-NOTFOUND")
+# set(NetCDF_LIBRARY "NetCDF_CXX_LIBRARY-NOTFOUND")
+ endif()
+
+ else()
+
+ if(NetCDF_ROOT)
+
+ if (EXISTS "${NetCDF_ROOT}" )
+
+ find_library(NetCDF_C_LIBRARY
+ NAMES netcdf
+ HINTS ${NetCDF_ROOT}
+ PATH_SUFFIXES "lib" "Lib"
+ NO_DEFAULT_PATH)
+
+# find_library(NetCDF_CXX_LIBRARY
+# NAMES netcdf_c++
+# HINTS ${NetCDF_ROOT}
+# PATH_SUFFIXES "lib" "Lib"
+# NO_DEFAULT_PATH)
+
+ else()
+ message(SEND_ERROR "NetCDF_ROOT=${NetCDF_ROOT} does not exist")
+ set(NetCDF_LIBRARY "NetCDF_C_LIBRARY-NOTFOUND")
+# set(NetCDF_LIBRARY "NetCDF_CXX_LIBRARY-NOTFOUND")
+ endif()
+
+
+ else()
+
+ find_library(NetCDF_C_LIBRARY
+ NAMES netcdf
+ PATH_SUFFIXES ${netcdf_lib_suffixes})
+
+# find_library(NetCDF_CXX_LIBRARY
+# NAMES netcdf_c++
+# PATH_SUFFIXES ${netcdf_lib_suffixes})
+
+
+ endif()
+
+ endif()
+
+ if ( NOT NetCDF_C_LIBRARY )
+ message(SEND_ERROR "Can not locate NetCDF C library")
+ endif()
+
+# if ( NOT NetCDF_CXX_LIBRARY )
+# message(SEND_ERROR "Can not locate NetCDF CXX library")
+# endif()
+
+
+
+ # Define the LIBRARIES and INCLUDE_DORS
+ set(NetCDF_INCLUDE_DIRS ${NetCDF_INCLUDE_DIR})
+ set(NetCDF_LIBRARIES ${NetCDF_CXX_LIBRARY} ${NetCDF_C_LIBRARY})
+
+ # Need to find the NetCDF config script to check for HDF5
+ if ( NetCDF_ROOT OR NetCDF_BIN_DIR )
+ MESSAGE(STATUS "\tNetCDF_ROOT is ${NetCDF_ROOT}")
+ find_program(netcdf_config nc-config
+ PATHS ${NetCDF_ROOT}/bin ${NetCDF_BIN_DIR}
+ NO_DEFAULT_PATH
+ NO_CMAKE_SYSTEM_PATH
+ DOC "NetCDF configuration script")
+
+ if (netcdf_config)
+ message(STATUS "Found NetCDF configuration script: ${netcdf_config}")
+ execute_process(COMMAND "${netcdf_config}" "--has-hdf5"
+ RESULT_VARIABLE _ret_code
+ OUTPUT_VARIABLE _stdout
+ ERROR_VARIABLE _stderr
+ )
+ string(REGEX REPLACE "[\n\r ]" "" _hdf5_answer ${_stdout})
+ message(STATUS "${netcdf_config} --has-hdf5 returned '${_hdf5_answer}'")
+ string(COMPARE EQUAL "${_hdf5_answer}" "yes" _has_hdf5)
+ if (${_has_hdf5} )
+ set(NetCDF_NEEDS_HDF5 True)
+ else()
+ set(NetCDF_NEEDS_HDF5 False)
+ endif()
+
+ execute_process(COMMAND "${netcdf_config}" "--version"
+ RESULT_VARIABLE _ret_code
+ OUTPUT_VARIABLE _stdout
+ ERROR_VARIABLE _stderr
+ )
+ string(REGEX REPLACE "[\n\r]" "" NetCDF_VERSION ${_stdout})
+
+# If --has-pnetcdf returns true, then add pnetcdf as dependent library.
+ execute_process(COMMAND "${netcdf_config}" "--has-pnetcdf"
+ RESULT_VARIABLE _ret_code
+ OUTPUT_VARIABLE _stdout
+ ERROR_VARIABLE _stderr
+ )
+ string(REGEX REPLACE "[\n\r ]" "" _pnetcdf_answer ${_stdout})
+ message(STATUS "${netcdf_config} --has-pnetcdf returned '${_pnetcdf_answer}'")
+ string(COMPARE EQUAL "${_pnetcdf_answer}" "yes" _has_pnetcdf)
+ if (${_has_pnetcdf} )
+ set(NetCDF_NEEDS_PNetCDF True)
+ else()
+ set(NetCDF_NEEDS_PNetCDF False)
+ endif()
+
+
+ endif()
+ endif()
+
+ if(NetCDF_NEEDS_HDF5)
+ message(STATUS "NetCDF requires HDF5")
+ add_package_dependency(NetCDF DEPENDS_ON HDF5)
+ else()
+ message(STATUS "NetCDF does not require HDF5")
+ endif()
+
+ if(NetCDF_NEEDS_PNetCDF)
+ message(STATUS "NetCDF requires PNetCDF")
+ add_package_dependency(NetCDF DEPENDS_ON PNetCDF)
+ else()
+ message(STATUS "NetCDF does not require PNetCDF")
+ endif()
+
+endif(NetCDF_LIBRARIES AND NetCDF_INCLUDE_DIRS )
+
+# --- Search for NetCDF tools
+if ( NetCDF_BINARY_DIR )
+ # Do nothing. Variables are set. No need to search again
+else()
+ if(NetCDF_BINARY_DIR)
+ set(NetCDF_BINARY_DIR "${NetCDF_BINARY_DIR}" CACHE PATH "Path to search for NetCDF tools")
+ endif()
+
+ set(netcdf_bin_names "ncdump")
+ if (NetCDF_BINARY_DIR)
+
+ if (EXISTS "${NetCDF_BINARY_DIR}")
+
+ find_path(cdf_test_bin_path
+ NAMES ${netcdf_bin_names}
+ HINTS ${NetCDF_BINARY_DIR}
+ NO_DEFAULT_PATH)
+ if(NOT cdf_test_bin_path)
+ message(SEND_ERROR "Can not locate ${netcdf_bin_names} in ${NetCDF_BINARY_DIR}")
+ endif()
+ set(NetCDF_BINARY_DIR "${cdf_test_bin_path}")
+
+ else()
+ message(SEND_ERROR "NetCDF_BINARY_DIR=${NetCDF_BINARY_DIR} does not exist")
+ set(NetCDF_BINARY_DIR "NetCDF_BINARY_DIR-NOTFOUND")
+ endif()
+
+ else()
+
+ set(netcdf_bin_suffixes "bin")
+ if(NetCDF_ROOT)
+
+ if (EXISTS "${NetCDF_ROOT}" )
+
+ find_path(NetCDF_BINARY_DIR
+ NAMES ${netcdf_bin_names}
+ HINTS ${NetCDF_ROOT}/bin
+ PATH_SUFFIXES ${netcdf_bin_suffixes}
+ NO_DEFAULT_PATH)
+
+ else()
+ message(SEND_ERROR "NetCDF_ROOT=${NetCDF_ROOT} does not exist")
+ set(NetCDF_BINARY_DIR "NetCDF_BINARY_DIR-NOTFOUND")
+ endif()
+
+
+ else()
+
+ find_path(NetCDF_BINARY_DIR
+ NAMES ${netcdf_bin_names}
+ PATH_SUFFIXES ${netcdf_bin_suffixes})
+
+ endif()
+
+ endif()
+
+
+ if ( NOT NetCDF_BINARY_DIR )
+ message(STATUS "Can not locate NetCDF bin directory")
+ endif()
+endif()
+
+set(_netcdf_TOOLS ncdump ncgen nccopy)
+set(NETCDF_TOOLS_FOUND)
+foreach( tool ${_netcdf_TOOLS})
+ string(TOUPPER "${tool}" tool_uc)
+ set(_netcdf_VAR_NAME NETCDF_${tool_uc}_BINARY)
+ find_program(${_netcdf_VAR_NAME}
+ ${tool}
+ HINTS ${NetCDF_BINARY_DIR})
+ if (${_netcdf_VAR_NAME})
+ list(APPEND NETCDF_TOOLS_FOUND ${tool})
+ endif()
+endforeach()
+
+# Send useful message if everything is found
+find_package_handle_standard_args(NetCDF DEFAULT_MSG
+ NetCDF_LIBRARIES
+ NetCDF_INCLUDE_DIRS)
+
+# find_package)handle)standard_args should set NetCDF_FOUND but it does not!
+if ( NetCDF_LIBRARIES AND NetCDF_INCLUDE_DIRS)
+ set(NetCDF_FOUND TRUE)
+else()
+ set(NetCDF_FOUND FALSE)
+endif()
+
+# --- Provide a summary of what the module found
+if ( NOT NetCDF_FIND_QUIETLY )
+
+ # Create a not found list
+
+ message(STATUS "NetCDF Version: ${NetCDF_VERSION}")
+ message(STATUS "\tNetCDF_NEEDS_HDF5 = ${NetCDF_NEEDS_HDF5}")
+ message(STATUS "\tNetCDF_NEEDS_PNetCDF = ${NetCDF_NEEDS_PNetCDF}")
+ message(STATUS "\tNetCDF_PARALLEL = ${NetCDF_PARALLEL}")
+ message(STATUS "\tNetCDF_INCLUDE_DIRS = ${NetCDF_INCLUDE_DIRS}")
+ message(STATUS "\tNetCDF_LIBRARIES = ${NetCDF_LIBRARIES}")
+ message(STATUS "\tNetCDF_BINARIES = ${NETCDF_TOOLS_FOUND}")
+
+endif()
+
+mark_as_advanced(
+ NetCDF_INCLUDE_DIR
+ NetCDF_INCLUDE_DIRS
+ NetCDF_C_LIBRARY
+ NetCDF_CXX_LIBRARY
+ NetCDF_LIBRARIES
+ NetCDF_LIBRARY_DIR
+)
diff --git a/tribits/common_tpls/find_modules/FindPNetCDF.cmake b/tribits/common_tpls/find_modules/FindPNetCDF.cmake
new file mode 100644
index 000000000..9d7c43ad0
--- /dev/null
+++ b/tribits/common_tpls/find_modules/FindPNetCDF.cmake
@@ -0,0 +1,273 @@
+# -*- mode: cmake -*-
+# @HEADER
+# ************************************************************************
+#
+# TriBITS: Tribal Build, Integrate, and Test System
+# Copyright 2016 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
+#
+# Based on the MSTK PNetCDF Find Module
+#
+# Usage:
+# Control the search through PNetCDF_DIR or setting environment variable
+# PNetCDF_ROOT to the PNetCDF installation prefix.
+#
+# This module does not search default paths!
+#
+# Following variables are set:
+# PNetCDF_FOUND (BOOL) Flag indicating if PNetCDF was found
+# PNetCDF_INCLUDE_DIR (PATH) Path to the PNetCDF include file
+# PNetCDF_INCLUDE_DIRS (LIST) List of all required include files
+# PNetCDF_LIBRARY_DIR (PATH) Path to the PNetCDF library
+# PNetCDF_LIBRARY (FILE) PNetCDF library
+# PNetCDF_LIBRARIES (LIST) List of all required PNetCDF libraries
+#
+# #############################################################################
+
+# Standard CMake modules see CMAKE_ROOT/Modules
+include(FindPackageHandleStandardArgs)
+
+# MSTK CMake functions see /cmake/modules for source
+include(AddPackageDependency)
+
+if ( PNetCDF_LIBRARIES AND PNetCDF_INCLUDE_DIRS )
+
+ # Do nothing. Variables are set. No need to search again
+
+else(PNetCDF_LIBRARIES AND PNetCDF_INCLUDE_DIRS)
+
+ # If NetCDF_ROOT was defined in the environment, use it.
+ # Definition from the command line will take precedence.
+ if (NOT PNetCDF_ROOT AND NOT $ENV{PNetCDF_ROOT} STREQUAL "")
+ set(PNetCDF_ROOT $ENV{PNetCDF_ROOT})
+ endif()
+
+ # PNetCDF_DIR is DEPRECATED WARN THE USER if it is set
+ if (NOT PNetCDF_ROOT AND PNetCDF_DIR )
+ message(WARNING "The configuration parameter PNetCDF_DIR is deprecated."
+ " Please use PNetCDF_ROOT instead to define the NetCDF installation")
+ set(PNetCDF_ROOT ${PNetCDF_DIR})
+ endif()
+
+ # Cache variables
+ if(PNetCDF_ROOT)
+ set(PNetCDF_ROOT "${PNetCDF_ROOT}" CACHE PATH "Path to search for PNetCDF include and library files")
+ endif()
+
+ if(PNetCDF_INCLUDE_DIR)
+ set(PNetCDF_INCLUDE_DIR "${PNetCDF_INCLUDE_DIR}" CACHE PATH "Path to search for PNetCDF include files")
+ endif()
+
+ if(PNetCDF_LIBRARY_DIR)
+ set(PNetCDF_LIBRARY_DIR "${PNetCDF_LIBRARY_DIR}" CACHE PATH "Path to search for PNetCDF library files")
+ endif()
+
+
+ # Search for include files
+ # Search order preference:
+ # (1) PNetCDF_INCLUDE_DIR - check existence of path AND if the include files exist
+ # (2) PNetCDF_ROOT/
+ # (3) Default CMake paths See cmake --html-help=out.html file for more information.
+ #
+ set(pnetcdf_inc_names "pnetcdf.h")
+ if (PNetCDF_INCLUDE_DIR)
+
+ if (EXISTS "${PNetCDF_INCLUDE_DIR}")
+
+ find_path(cdf_test_include_path
+ NAMES ${pnetcdf_inc_names}
+ HINTS ${PNetCDF_INCLUDE_DIR}
+ NO_DEFAULT_PATH)
+ if(NOT cdf_test_include_path)
+ message(SEND_ERROR "Can not locate ${pnetcdf_inc_names} in ${PNetCDF_INCLUDE_DIR}")
+ endif()
+ set(PNetCDF_INCLUDE_DIR "${cdf_test_include_path}")
+
+ else()
+ message(SEND_ERROR "PNetCDF_INCLUDE_DIR=${PNetCDF_INCLUDE_DIR} does not exist")
+ set(PNetCDF_INCLUDE_DIR "PNetCDF_INCLUDE_DIR-NOTFOUND")
+ endif()
+
+ else()
+
+ set(pnetcdf_inc_suffixes "include")
+ if(PNetCDF_ROOT)
+
+ if (EXISTS "${PNetCDF_ROOT}" )
+
+ find_path(PNetCDF_INCLUDE_DIR
+ NAMES ${pnetcdf_inc_names}
+ HINTS ${PNetCDF_ROOT}/include
+ PATH_SUFFIXES ${pnetcdf_inc_suffixes}
+ NO_DEFAULT_PATH)
+
+ else()
+ message(SEND_ERROR "PNetCDF_ROOT=${PNetCDF_ROOT} does not exist")
+ set(PNetCDF_INCLUDE_DIR "PNetCDF_INCLUDE_DIR-NOTFOUND")
+ endif()
+
+
+ else()
+
+ find_path(PNetCDF_INCLUDE_DIR
+ NAMES ${pnetcdf_inc_names}
+ PATH_SUFFIXES ${pnetcdf_inc_suffixes})
+
+ endif()
+
+ endif()
+
+
+ if ( NOT PNetCDF_INCLUDE_DIR )
+ message(SEND_ERROR "Can not locate PNetCDF include directory")
+ endif()
+
+ # Large dimension and parallel check here
+ if ( PNetCDF_INCLUDE_DIR )
+
+ set(pnetcdf_h "${PNetCDF_INCLUDE_DIR}/pnetcdf.h" )
+ message(STATUS "PNetCDF include file ${pnetcdf_h} will be searched for define values")
+
+ file(STRINGS "${pnetcdf_h}" pnetcdf_max_dims_string REGEX "^#define NC_MAX_DIMS")
+ string(REGEX REPLACE "[^0-9]" "" pnetcdf_max_dims "${pnetcdf_max_dims_string}")
+
+ file(STRINGS "${pnetcdf_h}" pnetcdf_max_vars_string REGEX "^#define NC_MAX_VARS")
+ string(REGEX REPLACE "[^0-9]" "" pnetcdf_max_vars "${pnetcdf_max_vars_string}")
+
+ if (
+ ( (pnetcdf_max_dims EQUAL 65536) OR (pnetcdf_max_dims GREATER 65536) ) AND
+ ( (pnetcdf_max_vars EQUAL 524288) OR (pnetcdf_max_vars GREATER 524288) )
+ )
+ set(PNetCDF_LARGE_DIMS TRUE)
+ else()
+ message(WARNING "WARNING: The PNetCDF found in ${PNetCDF_ROOT} does not have the correct NC_MAX_DIMS and NC_MAX_VARS. "
+ "It may not be compatible with Exodus. See NetCDF-Mapping.md for details\n" )
+ set(PNetCDF_LARGE_DIMS FALSE)
+ endif()
+
+ endif()
+
+ # Search for libraries
+ # Search order preference:
+ # (1) PNetCDF_LIBRARY_DIR - check existence of path AND if the include files exist
+ # (2) PNetCDF_ROOT/
+ # (3) Default CMake paths See cmake --html-help=out.html file for more information
+ #
+ if (PNetCDF_LIBRARY_DIR)
+
+ if (EXISTS "${PNetCDF_LIBRARY_DIR}")
+
+ find_library(PNetCDF_LIBRARY
+ NAMES pnetcdf
+ HINTS ${PNetCDF_LIBRARY_DIR}
+ NO_DEFAULT_PATH)
+
+ else()
+ message(SEND_ERROR "PNetCDF_LIBRARY_DIR=${PNetCDF_LIBRARY_DIR} does not exist")
+ set(PNetCDF_LIBRARY "PNetCDF_LIBRARY-NOTFOUND")
+ endif()
+
+ else()
+
+ if(PNetCDF_ROOT)
+
+ if (EXISTS "${PNetCDF_ROOT}" )
+
+ find_library(PNetCDF_LIBRARY
+ NAMES pnetcdf
+ HINTS ${PNetCDF_ROOT}
+ PATH_SUFFIXES "lib" "Lib"
+ NO_DEFAULT_PATH)
+
+ else()
+ message(SEND_ERROR "PNetCDF_ROOT=${PNetCDF_ROOT} does not exist")
+ set(PNetCDF_LIBRARY "PNetCDF_LIBRARY-NOTFOUND")
+ endif()
+
+
+ else()
+
+ find_library(PNetCDF_LIBRARY
+ NAMES pnetcdf
+ PATH_SUFFIXES ${pnetcdf_lib_suffixes})
+
+ endif()
+
+ endif()
+
+ if ( NOT PNetCDF_LIBRARY )
+ message(SEND_ERROR "Can not locate PNetCDF library")
+ endif()
+
+ # Define the LIBRARIES and INCLUDE_DORS
+ set(PNetCDF_INCLUDE_DIRS ${PNetCDF_INCLUDE_DIR})
+ set(PNetCDF_LIBRARIES ${PNetCDF_CXX_LIBRARY} ${PNetCDF_LIBRARY})
+
+endif(PNetCDF_LIBRARIES AND PNetCDF_INCLUDE_DIRS )
+
+# Send useful message if everything is found
+find_package_handle_standard_args(PNetCDF DEFAULT_MSG
+ PNetCDF_LIBRARIES
+ PNetCDF_INCLUDE_DIRS)
+
+# find_package)handle)standard_args should set PNetCDF_FOUND but it does not!
+if ( PNetCDF_LIBRARIES AND PNetCDF_INCLUDE_DIRS)
+ set(PNetCDF_FOUND TRUE)
+else()
+ set(PNetCDF_FOUND FALSE)
+endif()
+
+# --- Provide a summary of what the module found
+if ( NOT PNetCDF_FIND_QUIETLY )
+
+ # Create a not found list
+ message(STATUS "\tPNetCDF_INCLUDE_DIRS = ${PNetCDF_INCLUDE_DIRS}")
+ message(STATUS "\tPNetCDF_LIBRARIES = ${PNetCDF_LIBRARIES}")
+
+endif()
+# For compatability with TriBITS:
+SET(DOCSTR "List of semi-colon separated paths to look for the TPL PNetCDF")
+
+set(TPL_PNetCDF_LIBRARIES ${PNetCDF_LIBRARIES} CACHE PATH ${DOCSTR})
+set(TPL_PNetCDF_INCLUDE_DIRS ${PNetCDF_INCLUDE_DIRS} CACHE PATH ${DOCSTR})
+
+mark_as_advanced(
+ PNetCDF_INCLUDE_DIR
+ PNetCDF_INCLUDE_DIRS
+ PNetCDF_LIBRARY
+ PNetCDF_CXX_LIBRARY
+ PNetCDF_LIBRARIES
+ PNetCDF_LIBRARY_DIR
+)
diff --git a/tribits/common_tpls/utils/AddImportedLibrary.cmake b/tribits/common_tpls/utils/AddImportedLibrary.cmake
new file mode 100644
index 000000000..26f567c61
--- /dev/null
+++ b/tribits/common_tpls/utils/AddImportedLibrary.cmake
@@ -0,0 +1,115 @@
+# -*- mode: cmake -*-
+# @HEADER
+# ************************************************************************
+#
+# TriBITS: Tribal Build, Integrate, and Test System
+# Copyright 2016 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
+#
+# Based on version from MSTK project which has the following:
+# ACKNOWLEDGEMENT:
+# This capability was developed for the Amanzi code base under the DOE/ASCEM
+# project and used here in the MSTK project owing to its open source BSD license
+# Many thanks to the Amanzi build system developers
+#
+
+#
+# Print variable
+#
+#
+# ADD_IMPORTED_LIBRARY(name [SHARED | STATIC]
+# LOCATION
+# [ LINK_LANGUAGES ... ]
+# [ LINK_INTERFACE_LIBRARIES ... ]
+# )
+#
+#
+
+include(CMakeParseArguments)
+function(ADD_IMPORTED_LIBRARY target_name)
+
+ set(_options SHARED STATIC)
+ set(_oneValueArgs LOCATION)
+ set(_multiValueArgs LINK_LANGUAGES LINK_INTERFACE_LIBRARIES)
+
+ cmake_parse_arguments(PARSE "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN} )
+
+ # --- Check what has been passed in
+
+ # SHARED and STATIC can not be set at the same time
+ if ( "${PARSE_STATIC}" AND "${PARSE_SHARED}" )
+ message(FATAL_ERROR "Can not specify imported library as shared and static.")
+ endif()
+
+ # Require a location
+ if ( NOT PARSE_LOCATION )
+ message(FATAL_ERROR "Must specify a location to define an imported library target.")
+ endif()
+
+ # Check to see if name already exists as a target
+ if ( NOT TARGET "${target_name}" )
+
+ # --- Set the library type
+ set(lib_type UNKNOWN)
+ if(PARSE_STATIC)
+ set(lib_type STATIC)
+ endif()
+ if(PARSE_SHARED)
+ set(lib_type SHARED)
+ endif()
+
+ # --- Add the library target
+ add_library(${target_name} ${lib_type} IMPORTED)
+
+ # --- Update the global property that tracks imported targets
+ set(prop_name IMPORTED_${lib_type}_LIBRARIES)
+ get_property(prop_value GLOBAL PROPERTY ${prop_name})
+ set_property(GLOBAL PROPERTY ${prop_name} ${prop_value} ${target_name})
+
+ # --- Set the properties
+ set_target_properties(${target_name} PROPERTIES
+ IMPORTED_LOCATION ${PARSE_LOCATION})
+ if ( PARSE_LINK_LANGUAGES )
+ set_target_properties(${target_name} PROPERTIES
+ IMPORTED_LINK_INTERFACE_LANGUAGES "${PARSE_LINK_LANGUAGES}")
+ endif()
+ if ( PARSE_LINK_INTERFACE_LIBRARIES )
+ set_target_properties(${target_name} PROPERTIES
+ IMPORTED_LINK_INTERFACE_LIBRARIES "${PARSE_LINK_INTERFACE_LIBRARIES}")
+ endif()
+
+ endif()
+endfunction(ADD_IMPORTED_LIBRARY)
+
diff --git a/tribits/common_tpls/utils/AddPackageDependency.cmake b/tribits/common_tpls/utils/AddPackageDependency.cmake
new file mode 100644
index 000000000..bf1c82444
--- /dev/null
+++ b/tribits/common_tpls/utils/AddPackageDependency.cmake
@@ -0,0 +1,175 @@
+# -*- mode: cmake -*-
+# @HEADER
+# ************************************************************************
+#
+# TriBITS: Tribal Build, Integrate, and Test System
+# Copyright 2016 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
+#
+# Based on version from MSTK which is from Amanzi open source code -
+# https://software.lanl.gov/ascem/trac)
+#
+# ADD_PACKAGE_DEPENDENCY( DEPENDS_ON )
+#
+
+# CMake module
+include(CMakeParseArguments)
+
+# MSTK modules
+include(ParseLibraryList)
+
+function(ADD_PACKAGE_DEPENDENCY)
+
+ # Macro: _print_usage
+ macro(_print_usage)
+ message("\nADD_PACKAGE_DEPENDENCY( DEPENDS_ON )\n"
+ " Add req_package to target_package dependencies.\n")
+ endmacro(_print_usage)
+
+ # Parse the arguments
+ set(_options "")
+ set(_oneValue "DEPENDS_ON")
+ set(_multiValue "")
+ cmake_parse_arguments(ADD_PACK "${_options}" "${_oneValue}" "${_multiValue}" ${ARGN})
+
+ # Define the target package name
+ list(GET ADD_PACK_UNPARSED_ARGUMENTS 0 target_package)
+ if ( NOT target_package )
+ _print_usage()
+ message(FATAL_ERROR "Must define a target_package")
+ endif()
+
+ # Define the required package
+ set(req_package "")
+ if(ADD_PACK_DEPENDS_ON)
+ set(req_package ${ADD_PACK_DEPENDS_ON})
+ else()
+ _print_usage()
+ message(FATAL_ERROR "Must define a required package")
+ endif()
+
+ # Find required package
+ message(STATUS "${target_package} depends on ${req_package}")
+ message(STATUS "Updating ${target_package}_LIBRARIES and ${target_package}_INCLUDE_DIRS")
+ find_package(${req_package} REQUIRED)
+ if( ${req_package}_LIBRARIES AND ${req_package}_INCLUDE_DIRS )
+
+ # Add the include paths
+ set(_save_inc_list ${${target_package}_INCLUDE_DIRS})
+ list(APPEND _save_inc_list ${${req_package}_INCLUDE_DIRS})
+ set(${target_package}_INCLUDE_DIRS ${_save_inc_list} PARENT_SCOPE)
+ list(REMOVE_DUPLICATES ${target_package}_INCLUDE_DIRS)
+
+ # Add the libraries....this can be tricky because some packages
+ # *cough* HDF5 *cough* return a list with keywords debug, optimized
+ # general in the list. These keywords are flags that are used when
+ # CMAKE_BUILD_TYPE is set. Need to construct the LIBRARIES carefully
+ # if these are present.
+ parse_library_list(${${target_package}_LIBRARIES}
+ FOUND target_libs_split
+ DEBUG target_debug_libs
+ OPT target_opt_libs
+ GENERAL target_gen_libs)
+
+ parse_library_list(${${req_package}_LIBRARIES}
+ FOUND req_libs_split
+ DEBUG req_debug_libs
+ OPT req_opt_libs
+ GENERAL req_gen_libs)
+
+ # _save_lib_list tmp storage
+ set(_save_lib_list "")
+ if ( ${target_libs_split} OR ${req_libs_split} )
+
+ # Define the parsed lists if the orginal list did not contain keywords
+ if ( NOT ${target_libs_split} )
+ set(target_debug_libs ${${target_package}_LIBRARIES})
+ set(target_opt_libs ${${target_package}_LIBRARIES})
+ set(target_general_libs ${${target_package}_LIBRARIES})
+ endif()
+
+ if ( NOT ${req_libs_split} )
+ set(req_debug_libs ${${req_package}_LIBRARIES})
+ set(req_opt_libs ${${req_package}_LIBRARIES})
+ set(req_general_libs ${${req_package}_LIBRARIES})
+ endif()
+
+ # Define each type and store in tmp lists removing duplicates
+ set(_save_debug_list "")
+ set(_save_opt_list "")
+ set(_save_gen_list "")
+ if ( target_debug_libs OR req_debug_libs )
+ set(_save_debug_list "${target_debug_libs}" "${req_debug_libs}")
+ list(REMOVE_DUPLICATES _save_debug_list)
+ endif()
+ if ( target_opt_libs OR req_opt_libs )
+ set(_save_opt_list "${target_opt_libs}" "${req_opt_libs}")
+ list(REMOVE_DUPLICATES _save_opt_list)
+ endif()
+ if ( target_gen_libs OR req_gen_libs )
+ set(_save_gen_list "${target_gen_libs}" "${req_gen_libs}")
+ list(REMOVE_DUPLICATES _save_gen_list)
+ endif()
+
+ # Now build the _save_lib_list with the keywords
+ if(_save_debug_list)
+ list(APPEND _save_lib_list "debug")
+ list(APPEND _save_lib_list "${_save_debug_list}")
+ endif()
+
+ if(_save_opt_list)
+ list(APPEND _save_lib_list "optimized")
+ list(APPEND _save_lib_list "${_save_opt_list}")
+ endif()
+
+ if(_save_gen_list)
+ list(APPEND _save_lib_list "general")
+ list(APPEND _save_lib_list "${_save_gen_list}")
+ endif()
+
+ else()
+
+ # Neither list has keywords
+ set(_save_lib_list "${${target_package}_LIBRARIES}" "${${req_package}_LIBRARIES}")
+ list(REMOVE_DUPLICATES _save_lib_list)
+
+ endif()
+
+
+ set(${target_package}_LIBRARIES ${_save_lib_list} PARENT_SCOPE)
+
+ endif()
+
+endfunction(ADD_PACKAGE_DEPENDENCY)
diff --git a/tribits/common_tpls/utils/ParseLibraryList.cmake b/tribits/common_tpls/utils/ParseLibraryList.cmake
new file mode 100644
index 000000000..0e115ea98
--- /dev/null
+++ b/tribits/common_tpls/utils/ParseLibraryList.cmake
@@ -0,0 +1,116 @@
+# -*- mode: cmake -*-
+# @HEADER
+# ************************************************************************
+#
+# TriBITS: Tribal Build, Integrate, and Test System
+# Copyright 2016 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
+#
+# Modified version from MSTK which was originally based on Amanzi open
+# source code https://software.lanl.gov/ascem/trac)
+# PARSE_LIBRARY_LIST(
+# DEBUG
+# OPT
+# GENERAL )
+
+# CMake module
+include(CMakeParseArguments)
+
+function(PARSE_LIBRARY_LIST)
+
+ # Macro: _print_usage
+ macro(_print_usage)
+ message("PARSE_LIBRARY_LIST \n"
+ " FOUND \n"
+ " DEBUG \n"
+ " OPT \n"
+ " GENERAL \n"
+ "lib_list string to parse\n"
+ "FOUND flag to indicate if keywords were found\n"
+ "DEBUG variable containing debug libraries\n"
+ "OPT variable containing optimized libraries\n"
+ "GENERAL variable containing debug libraries\n")
+
+ endmacro()
+
+ # Read in args
+ cmake_parse_arguments(PARSE_ARGS "" "FOUND;DEBUG;OPT;GENERAL" "" ${ARGN})
+ set(_parse_list "${PARSE_ARGS_UNPARSED_ARGUMENTS}")
+ if ( (NOT PARSE_ARGS_FOUND) OR
+ (NOT PARSE_ARGS_DEBUG) OR
+ (NOT PARSE_ARGS_OPT) OR
+ (NOT PARSE_ARGS_GENERAL) OR
+ (NOT _parse_list )
+ )
+ _print_usage()
+ message(FATAL_ERROR "Invalid arguments")
+ endif()
+
+ # Now split the list
+ set(_debug_libs "")
+ set(_opt_libs "")
+ set(_gen_libs "")
+ foreach( item ${_parse_list} )
+ if( ${item} MATCHES debug OR
+ ${item} MATCHES optimized OR
+ ${item} MATCHES general )
+
+ if( ${item} STREQUAL "debug" )
+ set( mylist "_debug_libs" )
+ elseif( ${item} STREQUAL "optimized" )
+ set( mylist "_opt_libs" )
+ elseif( ${item} STREQUAL "general" )
+ set( mylist "_gen_libs" )
+ endif()
+ else()
+ list( APPEND ${mylist} ${item} )
+ endif()
+ endforeach()
+
+
+ # Now set output vairables
+ set(${PARSE_ARGS_DEBUG} "${_debug_libs}" PARENT_SCOPE)
+ set(${PARSE_ARGS_OPT} "${_opt_libs}" PARENT_SCOPE)
+ set(${PARSE_ARGS_GENERAL} "${_gen_libs}" PARENT_SCOPE)
+
+ # If any of the lib lists are defined set flag to TRUE
+ if ( (_debug_libs) OR (_opt_libs) OR (_gen_libs) )
+ set(${PARSE_ARGS_FOUND} TRUE PARENT_SCOPE)
+ else()
+ set(${PARSE_ARGS_FOUND} FALSE PARENT_SCOPE)
+ endif()
+
+endfunction(PARSE_LIBRARY_LIST)
+
diff --git a/tribits/core/package_arch/TribitsAddAdvancedTest.cmake b/tribits/core/package_arch/TribitsAddAdvancedTest.cmake
index a9b71db1b..3eb0946ff 100644
--- a/tribits/core/package_arch/TribitsAddAdvancedTest.cmake
+++ b/tribits/core/package_arch/TribitsAddAdvancedTest.cmake
@@ -89,6 +89,12 @@ INCLUDE(PrintVar)
# than just grepping STDOUT (e.g. by running separate post-processing programs
# to examine output files).
#
+# The test is only added if tests are enabled for the SE package
+# (i.e. `${PACKAGE_NAME}_ENABLE_TESTS`_) or the parent package (if this is a
+# subpackage) (i.e. ``${PARENT_PACKAGE_NAME}_ENABLE_TESTS``). (NOTE: A more
+# efficient way to optionally enable tests is to put them in a ``test/``
+# subdir and then include that subdir with `TRIBITS_ADD_TEST_DIRECTORIES()`_.)
+#
# Each atomic test case is either a package-built executable or just a basic
# command. An atomic test command block ``TEST_`` (i.e. ``TEST_0``,
# ``TEST_1``, ..., up to ``TEST_19``) takes the form::
@@ -110,7 +116,7 @@ INCLUDE(PrintVar)
# | PASS_REGULAR_EXPRESSION_ALL "" "" ... ""
# | STANDARD_PASS_OUTPUT ]
# [FAIL_REGULAR_EXPRESSION ""]
-# [ALWAYS_FAIL_ON_NONZERO_RETURN]
+# [ALWAYS_FAIL_ON_NONZERO_RETURN | ALWAYS_FAIL_ON_ZERO_RETURN]
# [WILL_FAIL]
#
# By default, each and every atomic test or command needs to pass (as defined below) in
@@ -247,8 +253,9 @@ INCLUDE(PrintVar)
# ``TIMEOUT ``
#
# If passed in, gives maximum number of seconds the test will be allowed
-# to run before being timed-out (see `TRIBITS_ADD_TEST()`_). This is for
-# the full CTest test, not individual ``TEST_`` commands!
+# to run before being timed-out and killed (see `Setting timeouts for
+# tests (TRIBITS_ADD_TEST())`_). This is for the full CTest test, not
+# individual ``TEST_`` commands!
#
# ``ADDED_TEST_NAME_OUT ``
#
@@ -403,7 +410,7 @@ INCLUDE(PrintVar)
#
# If specified, the test command will be assumed to pass if it matches the
# given regular expression. Otherwise, it is assumed to fail. TIPS:
-# Replace ';' with '[;]' or CMake will interpretet this as a array eleemnt
+# Replace ';' with '[;]' or CMake will interpret this as an array elemnt
# boundary. To match '.', use '[.]'.
#
# ``PASS_REGULAR_EXPRESSION_ALL "" "" ... ""``
@@ -412,7 +419,7 @@ INCLUDE(PrintVar)
# matches all of the provided regular expressions. Note that this is not
# a capability of raw ctest and represents an extension provided by
# TriBITS. NOTE: It is critical that you replace ';' with '[;]' or CMake
-# will interpretet this as a array eleemnt boundary.
+# will interpret this as an array elemnt boundary.
#
# ``STANDARD_PASS_OUTPUT``
#
@@ -435,9 +442,18 @@ INCLUDE(PrintVar)
# If specified, then the test case will be marked as failed if the test
# command returns nonzero, independent of the other pass/fail criteria.
# This option is used in cases where one wants to grep for strings in the
+# output but still wants to require a zero return code. This make for a
+# stronger test by requiring that both the strings are found and that the
+# command returns 0.
+#
+# ``ALWAYS_FAIL_ON_ZERO_RETURN``
+#
+# If specified, then the test case will be marked as failed if the test
+# command returns zero '0', independent of the other pass/fail criteria.
+# This option is used in cases where one wants to grep for strings in the
# output but still wants to require a nonzero return code. This make for
# a stronger test by requiring that both the strings are found and that
-# the command returns 0.
+# the command returns != 0.
#
# ``WILL_FAIL``
#
@@ -486,9 +502,11 @@ INCLUDE(PrintVar)
# TEST_CASE_PASSED = FALSE
# Endif
#
-# # C) Check for return code always 0?
+# # C) Check for return code always 0 or !=0?
# If ALWAYS_FAIL_ON_NONZERO_RETURN specified and return code != 0:
# TEST_CASE_PASSED = FALSE
+# ElseIf ALWAYS_FAIL_ON_ZERO_RETURN specified and return code == 0:
+# TEST_CASE_PASSED = FALSE
# Endif
#
# # D) Invert pass/fail result?
@@ -525,15 +543,15 @@ INCLUDE(PrintVar)
# **Argument Parsing and Ordering (TRIBITS_ADD_ADVANCED_TEST())**
#
# The basic tool used for parsing the arguments to this function is the macro
-# `PARSE_ARGUMENTS()`_ which has a certain set of behaviors. The parsing
-# using `PARSE_ARGUMENTS()`_ is actually done in two phases. There is a
-# top-level parsing of the "overall" arguments listed in `Overall Arguments
-# (TRIBITS_ADD_ADVANCED_TEST())`_ that also pulls out the test blocks. Then
-# there is a second level of parsing using ``PARSE_ARGUMENTS()`` for each of
-# the ``TEST_`` blocks. Because of this usage, there are a few
-# restrictions that one needs to be aware of when using
-# ``TRIBITS_ADD_ADVANCED_TEST()``. This short sections tries to explain the
-# behaviors and what is allowed and what is not allowed.
+# ``CMAKE_PARSE_ARGUMENTS()`` which has a certain set of behaviors. The
+# parsing using ``CMAKE_PARSE_ARGUMENTS()`` is actually done in two phases.
+# There is a top-level parsing of the "overall" arguments listed in `Overall
+# Arguments (TRIBITS_ADD_ADVANCED_TEST())`_ that also pulls out the test
+# blocks. Then there is a second level of parsing using
+# ``CMAKE_PARSE_ARGUMENTS()`` for each of the ``TEST_`` blocks. Because
+# of this usage, there are a few restrictions that one needs to be aware of
+# when using ``TRIBITS_ADD_ADVANCED_TEST()``. This short sections tries to
+# explain the behaviors and what is allowed and what is not allowed.
#
# For the most part, the "overall" arguments and the arguments inside of any
# individual ``TEST_`` blocks can be listed in any order but there are
@@ -601,6 +619,39 @@ INCLUDE(PrintVar)
# where the test writes a log file ``someTest.log`` that we want to submit to
# CDash also.
#
+# This approach will work no matter what TriBITS names the individual test(s)
+# or whether the test(s) are added or not (depending on other arguments like
+# ``COMM``, ``XHOST``, etc.).
+#
+# The following built-in CTest test properties are set through `Overall
+# Arguments (TRIBITS_ADD_ADVANCED_TEST())`_ or are otherwise automatically set
+# by this function and should **NOT** be overridden by direct calls to
+# ``SET_TESTS_PROPERTIES()``: ``ENVIRONMENT``, ``FAIL_REGULAR_EXPRESSION``,
+# ``LABELS``, ``PASS_REGULAR_EXPRESSION``, ``RUN_SERIAL``, ``TIMEOUT``,
+# ``WILL_FAIL``, and ``WORKING_DIRECTORY``.
+#
+# However, generally, other built-in CTest test properties can be set after
+# the test is added like show above. Examples of test properties that can be
+# set using direct calls to ``SET_TESTS_PROPERTIES()`` include
+# ``ATTACHED_FILES``, ``ATTACHED_FILES_ON_FAIL``, ``COST``, ``DEPENDS``,
+# ``MEASUREMENT``, and ``RESOURCE_LOCK``.
+#
+# For example, one can set a dependency between two tests using::
+#
+# TRIBITS_ADD_ADVANCED_TEST_TEST( test_a [...]
+# ADDED_TEST_NAME_OUT test_a_TEST_NAME )
+#
+# TRIBITS_ADD_ADVANCED_TEST_TEST( test_b [...]
+# ADDED_TEST_NAME_OUT test_z_TEST_NAME )
+#
+# IF (test_a_TEST_NAME AND test_b_TEST_NAME)
+# SET_TESTS_PROPERTIES(${test_b_TEST_NAME}
+# PROPERTIES DEPENDS ${test_a_TEST_NAME})
+# ENDIF()
+#
+# This ensures that test ``test_b`` will always be run after ``test_a`` if
+# both tests are run by CTest.
+#
# .. _Running multiple tests at the same time (TRIBITS_ADD_ADVANCED_TEST()):
#
# **Running multiple tests at the same time (TRIBITS_ADD_ADVANCED_TEST())**
@@ -675,13 +726,15 @@ FUNCTION(TRIBITS_ADD_ADVANCED_TEST TEST_NAME_IN)
ENDFOREACH()
#PRINT_VAR(TEST_IDX_LIST)
- PARSE_ARGUMENTS(
+ CMAKE_PARSE_ARGUMENTS(
#prefix
PARSE
- #lists
- "${TEST_IDX_LIST};OVERALL_WORKING_DIRECTORY;KEYWORDS;COMM;OVERALL_NUM_MPI_PROCS;OVERALL_NUM_TOTAL_CORES_USED;FINAL_PASS_REGULAR_EXPRESSION;CATEGORIES;HOST;XHOST;HOSTTYPE;XHOSTTYPE;EXCLUDE_IF_NOT_TRUE;FINAL_FAIL_REGULAR_EXPRESSION;TIMEOUT;ENVIRONMENT;ADDED_TEST_NAME_OUT"
#options
"FAIL_FAST;RUN_SERIAL;SKIP_CLEAN_OVERALL_WORKING_DIRECTORY"
+ # one_value_keywords
+ ""
+ # multi_value_keywords
+ "${TEST_IDX_LIST};OVERALL_WORKING_DIRECTORY;KEYWORDS;COMM;OVERALL_NUM_MPI_PROCS;OVERALL_NUM_TOTAL_CORES_USED;FINAL_PASS_REGULAR_EXPRESSION;CATEGORIES;HOST;XHOST;HOSTTYPE;XHOSTTYPE;EXCLUDE_IF_NOT_TRUE;FINAL_FAIL_REGULAR_EXPRESSION;TIMEOUT;ENVIRONMENT;ADDED_TEST_NAME_OUT"
${ARGN}
)
@@ -693,6 +746,12 @@ FUNCTION(TRIBITS_ADD_ADVANCED_TEST TEST_NAME_IN)
# B) Add or don't add tests based on a number of criteria
#
+ SET(ADD_THE_TEST FALSE)
+ TRIBITS_ADD_TEST_PROCESS_ENABLE_TESTS(ADD_THE_TEST)
+ IF (NOT ADD_THE_TEST)
+ RETURN()
+ ENDIF()
+
SET(ADD_THE_TEST FALSE)
TRIBITS_ADD_TEST_PROCESS_CATEGORIES(ADD_THE_TEST)
IF (NOT ADD_THE_TEST)
@@ -786,13 +845,15 @@ FUNCTION(TRIBITS_ADD_ADVANCED_TEST TEST_NAME_IN)
#PRINT_VAR(PARSE_TEST_${TEST_CMND_IDX})
- PARSE_ARGUMENTS(
+ CMAKE_PARSE_ARGUMENTS(
#prefix
PARSE
- #lists
- "EXEC;CMND;ARGS;DIRECTORY;MESSAGE;WORKING_DIRECTORY;OUTPUT_FILE;NUM_MPI_PROCS;NUM_TOTAL_CORES_USED;PASS_REGULAR_EXPRESSION_ALL;FAIL_REGULAR_EXPRESSION;PASS_REGULAR_EXPRESSION"
#options
- "NOEXEPREFIX;NOEXESUFFIX;NO_ECHO_OUTPUT;PASS_ANY;STANDARD_PASS_OUTPUT;ALWAYS_FAIL_ON_NONZERO_RETURN;WILL_FAIL;ADD_DIR_TO_NAME;SKIP_CLEAN_WORKING_DIRECTORY"
+ "NOEXEPREFIX;NOEXESUFFIX;NO_ECHO_OUTPUT;PASS_ANY;STANDARD_PASS_OUTPUT;ALWAYS_FAIL_ON_NONZERO_RETURN;ALWAYS_FAIL_ON_ZERO_RETURN;WILL_FAIL;ADD_DIR_TO_NAME;SKIP_CLEAN_WORKING_DIRECTORY"
+ # one_value_keywords
+ ""
+ # multi_value_keywords
+ "EXEC;CMND;ARGS;DIRECTORY;MESSAGE;WORKING_DIRECTORY;OUTPUT_FILE;NUM_MPI_PROCS;NUM_TOTAL_CORES_USED;PASS_REGULAR_EXPRESSION_ALL;FAIL_REGULAR_EXPRESSION;PASS_REGULAR_EXPRESSION"
${PARSE_TEST_${TEST_CMND_IDX}}
)
@@ -1003,6 +1064,13 @@ FUNCTION(TRIBITS_ADD_ADVANCED_TEST TEST_NAME_IN)
)
ENDIF()
+ IF (PARSE_ALWAYS_FAIL_ON_ZERO_RETURN)
+ APPEND_STRING_VAR( TEST_SCRIPT_STR
+ "\n"
+ "SET( TEST_${TEST_CMND_IDX}_ALWAYS_FAIL_ON_ZERO_RETURN TRUE )\n"
+ )
+ ENDIF()
+
IF (PARSE_WILL_FAIL)
APPEND_STRING_VAR( TEST_SCRIPT_STR
"\n"
diff --git a/tribits/core/package_arch/TribitsAddExecutable.cmake b/tribits/core/package_arch/TribitsAddExecutable.cmake
index 8eeb0b941..b5d7f8f07 100644
--- a/tribits/core/package_arch/TribitsAddExecutable.cmake
+++ b/tribits/core/package_arch/TribitsAddExecutable.cmake
@@ -45,7 +45,7 @@ INCLUDE(TribitsGeneralMacros)
INCLUDE(PrintVar)
INCLUDE(AppendSet)
-INCLUDE(ParseVariableArguments)
+INCLUDE(CMakeParseArguments)
###
### WARNING: See "NOTES TO DEVELOPERS" at the bottom of the file
@@ -93,7 +93,7 @@ INCLUDE(ParseVariableArguments)
#
# ````
#
-# The root name of the exectuable (and CMake target) (see `Executable and
+# The root name of the executable (and CMake target) (see `Executable and
# Target Name (TRIBITS_ADD_EXECUTABLE())`_). This must be the first
# argument.
#
@@ -106,15 +106,15 @@ INCLUDE(ParseVariableArguments)
# ``NOEXESUFFIX``
#
# If passed in, then ``${${PROJECT_NAME}_CMAKE_EXECUTABLE_SUFFIX}`` and
-# not added to the end of the executable name (see `Executable and
-# Target Name (TRIBITS_ADD_EXECUTABLE())`_).
+# not added to the end of the executable name (except for native Windows
+# builds, see `Executable and Target Name (TRIBITS_ADD_EXECUTABLE())`_).
#
# ``ADD_DIR_TO_NAME``
#
# If passed in, the directory path relative to the package's base
# directory (with "/" replaced by "_") is added to the executable name
# (see `Executable and Target Name (TRIBITS_ADD_EXECUTABLE())`_). This
-# provides a simple way to create unique test exectuable names inside of a
+# provides a simple way to create unique test executable names inside of a
# given TriBITS package. Only test executables in the same directory
# would need to have unique ```` passed in.
#
@@ -214,11 +214,25 @@ INCLUDE(ParseVariableArguments)
# ``LINKER_LANGUAGE (C|CXX|Fortran)``
#
# If specified, overrides the linker language used by setting the built-in
-# CMake target property ``LINKER_LANGUAGE``. By default, CMake chooses the
-# compiler to be used as the linker based on file extensions. The most
-# typical use case for this option is when Fortran-only or C-only sources
-# are passed in through ``SOURCES`` but a C++ linker is needed because
-# there are upstream C++ libraries.
+# CMake target property ``LINKER_LANGUAGE``. TriBITS sets the default
+# linker language as follows::
+#
+# IF (${PROJECT_NAME}_ENABLE_CXX)
+# SET(LINKER_LANGUAGE CXX)
+# ELSEIF (${PROJECT_NAME}_ENABLE_C)
+# SET(LINKER_LANGUAGE C)
+# ELSE()
+# # Let CMake set the default linker language it wants based
+# # on source file extensions passed into ``ADD_EXECUTABLE()``.
+# ENDIF()
+#
+# The reason for this logic is that on some platform if you have a Fortran
+# or C main that links to C++ libraries, then you need the C++ compiler to
+# do the final linking. CMake does not seem to automatically know that it
+# is pulling in C++ libraries and therefore needs to be told use C++ for
+# linking. This is the correct default behavior for mixed-language
+# projects. However, this argument allows the developer to override this
+# logic and use any linker language desired based on other considerations.
#
# ``TARGET_DEFINES -D -D ...``
#
@@ -239,7 +253,7 @@ INCLUDE(ParseVariableArguments)
# set with the name of the executable target passed to
# ``ADD_EXECUTABLE( ... )``. Having this name allows the
# calling ``CMakeLists.txt`` file access and set additional target
-# propeties (see `Additional Executable and Source File Properties
+# properties (see `Additional Executable and Source File Properties
# (TRIBITS_ADD_EXECUTABLE())`_).
#
# .. _Executable and Target Name (TRIBITS_ADD_EXECUTABLE()):
@@ -263,6 +277,9 @@ INCLUDE(ParseVariableArguments)
# The executable suffix ``${${PROJECT_NAME}_CMAKE_EXECUTABLE_SUFFIX}`` will be
# added to the actual executable file name if the option ``NOEXESUFFIX`` is
# *not* passed in but this suffix is never added to the target name.
+# (However, note that on Windows platforms, the default ``*.exe`` extension is
+# always added because windows will not run an executable in many contexts
+# unless it has the ``*.exe`` extension.)
#
# The reason that a default prefix is prepended to the executable and target
# name is because the primary reason to create an executable is typically to
@@ -322,13 +339,15 @@ FUNCTION(TRIBITS_ADD_EXECUTABLE EXE_NAME)
# A) Parse the input arguments
#
- PARSE_ARGUMENTS(
+ CMAKE_PARSE_ARGUMENTS(
#prefix
PARSE
- #lists
- "SOURCES;CATEGORIES;HOST;XHOST;HOSTTYPE;XHOSTTYPE;EXCLUDE_IF_NOT_TRUE;DIRECTORY;TESTONLYLIBS;IMPORTEDLIBS;DEPLIBS;COMM;LINKER_LANGUAGE;TARGET_DEFINES;DEFINES;ADDED_EXE_TARGET_NAME_OUT"
#options
"NOEXEPREFIX;NOEXESUFFIX;ADD_DIR_TO_NAME;INSTALLABLE"
+ #one_value_keywords
+ ""
+ #multi_value_keywords
+ "SOURCES;CATEGORIES;HOST;XHOST;HOSTTYPE;XHOSTTYPE;EXCLUDE_IF_NOT_TRUE;DIRECTORY;TESTONLYLIBS;IMPORTEDLIBS;DEPLIBS;COMM;LINKER_LANGUAGE;TARGET_DEFINES;DEFINES;ADDED_EXE_TARGET_NAME_OUT"
${ARGN}
)
@@ -336,7 +355,7 @@ FUNCTION(TRIBITS_ADD_EXECUTABLE EXE_NAME)
SET(${PARSE_ADDED_EXE_TARGET_NAME_OUT} PARENT_SCOPE)
ENDIF()
#
- # B) Exclude building the test executable based on some several criteria
+ # B) Exclude building the test executable based on some criteria
#
SET(ADD_THE_TEST FALSE)
diff --git a/tribits/core/package_arch/TribitsAddExecutableAndTest.cmake b/tribits/core/package_arch/TribitsAddExecutableAndTest.cmake
index b833b5d0a..4f86ad017 100644
--- a/tribits/core/package_arch/TribitsAddExecutableAndTest.cmake
+++ b/tribits/core/package_arch/TribitsAddExecutableAndTest.cmake
@@ -150,13 +150,15 @@ FUNCTION(TRIBITS_ADD_EXECUTABLE_AND_TEST EXE_NAME)
# A) Parse the input arguments
#
- PARSE_ARGUMENTS(
+ CMAKE_PARSE_ARGUMENTS(
#prefix
PARSE
- #lists
- "SOURCES;DEPLIBS;TESTONLYLIBS;IMPORTEDLIBS;NAME;NAME_POSTFIX;NUM_MPI_PROCS;DIRECTORY;KEYWORDS;COMM;ARGS;NAME;PASS_REGULAR_EXPRESSION;FAIL_REGULAR_EXPRESSION;ENVIRONMENT;TIMEOUT;CATEGORIES;HOST;XHOST;XHOST_TEST;HOSTTYPE;XHOSTTYPE;EXCLUDE_IF_NOT_TRUE;XHOSTTYPE_TEST;LINKER_LANGUAGE;TARGET_DEFINES;DEFINES;ADDED_EXE_TARGET_NAME_OUT;ADDED_TESTS_NAMES_OUT"
#options
"STANDARD_PASS_OUTPUT;WILL_FAIL;ADD_DIR_TO_NAME;INSTALLABLE;NOEXEPREFIX;NOEXESUFFIX"
+ #one_value_keywords
+ ""
+ #mulit_value_keywords
+ "SOURCES;DEPLIBS;TESTONLYLIBS;IMPORTEDLIBS;NAME;NAME_POSTFIX;NUM_MPI_PROCS;DIRECTORY;KEYWORDS;COMM;ARGS;PASS_REGULAR_EXPRESSION;FAIL_REGULAR_EXPRESSION;ENVIRONMENT;TIMEOUT;CATEGORIES;HOST;XHOST;XHOST_TEST;HOSTTYPE;XHOSTTYPE;EXCLUDE_IF_NOT_TRUE;XHOSTTYPE_TEST;LINKER_LANGUAGE;TARGET_DEFINES;DEFINES;ADDED_EXE_TARGET_NAME_OUT;ADDED_TESTS_NAMES_OUT"
${ARGN}
)
diff --git a/tribits/core/package_arch/TribitsAddTest.cmake b/tribits/core/package_arch/TribitsAddTest.cmake
index 894a5cb0f..eef4e3de3 100644
--- a/tribits/core/package_arch/TribitsAddTest.cmake
+++ b/tribits/core/package_arch/TribitsAddTest.cmake
@@ -53,6 +53,7 @@ INCLUDE(TribitsAddTestHelpers)
# [NAME | NAME_POSTFIX ]
# [DIRECTORY ]
# [ADD_DIR_TO_NAME]
+# [RUN_SERIAL]
# [ARGS " ..." " ..." ...
# | POSTFIX_AND_ARGS_0 ...
# POSTFIX_AND_ARGS_1 ... ]
@@ -74,6 +75,12 @@ INCLUDE(TribitsAddTestHelpers)
# [ADDED_TESTS_NAMES_OUT ]
# )
#
+# The tests are only added if tests are enabled for the SE package
+# (i.e. `${PACKAGE_NAME}_ENABLE_TESTS`_) or the parent package (if this is a
+# subpackage) (i.e. ``${PARENT_PACKAGE_NAME}_ENABLE_TESTS``). (NOTE: A more
+# efficient way to optionally enable tests is to put them in a ``test/``
+# subdir and then include that subdir with `TRIBITS_ADD_TEST_DIRECTORIES()`_.)
+#
# *Sections:*
#
# * `Formal Arguments (TRIBITS_ADD_TEST())`_
@@ -83,6 +90,7 @@ INCLUDE(TribitsAddTestHelpers)
# * `Determining Pass/Fail (TRIBITS_ADD_TEST())`_
# * `Setting additional test properties (TRIBITS_ADD_TEST())`_
# * `Running multiple tests at the same time (TRIBITS_ADD_TEST())`_
+# * `Setting timeouts for tests (TRIBITS_ADD_TEST())`_
# * `Debugging and Examining Test Generation (TRIBITS_ADD_TEST())`_
# * `Disabling Tests Externally (TRIBITS_ADD_TEST())`_
#
@@ -107,8 +115,8 @@ INCLUDE(TribitsAddTestHelpers)
#
# If specified, then the postfix
# ``${${PROJECT_NAME}_CMAKE_EXECUTABLE_SUFFIX}`` is assumed **not** to be
-# post-pended to ```` (see `Determining the Executable or
-# Command to Run (TRIBITS_ADD_TEST())`_).
+# post-pended to ```` (except on Windows platforms, see
+# `Determining the Executable or Command to Run (TRIBITS_ADD_TEST())`_).
#
# ``NAME ``
#
@@ -165,7 +173,7 @@ INCLUDE(TribitsAddTestHelpers)
# ``POSTFIX_AND_ARGS_`` form instead. **WARNING:** Multiple
# arguments passed to a single test invocation must be quoted or multiple
# tests taking single arguments will be created instead! See `Adding
-# Multiple Tests (TRIBITS_ADD_TEST())`_ for more details and exmaples.
+# Multiple Tests (TRIBITS_ADD_TEST())`_ for more details and examples.
#
# ``POSTFIX_AND_ARGS_ ...``
#
@@ -185,7 +193,7 @@ INCLUDE(TribitsAddTestHelpers)
# that one can give a meaningful name to each test case and one can
# specify multiple arguments without having to quote them and one can
# allow long argument lists to span multiple lines. See `Adding Multiple
-# Tests (TRIBITS_ADD_TEST())`_ for more details and exmaples.
+# Tests (TRIBITS_ADD_TEST())`_ for more details and examples.
#
# ``COMM [serial] [mpi]``
#
@@ -270,7 +278,7 @@ INCLUDE(TribitsAddTestHelpers)
# the environment``) for which the test is allowed to be added. If
# ``HOSTTYPE`` is specified and ``CMAKE_HOST_SYSTEM_NAME`` is not equal to
# one of the values of ````, then the test will **not** be
-# added. Typical host system type names include ``Linux``, ``Darwain``,
+# added. Typical host system type names include ``Linux``, ``Darwin``,
# ``Windows``, etc.
#
# ``XHOSTTYPE ...``
@@ -328,9 +336,10 @@ INCLUDE(TribitsAddTestHelpers)
# ``TIMEOUT ``
#
# If passed in, gives maximum number of seconds the test will be allowed
-# to run before being timed-out. This sets the CTest property
+# to run before being timed-out and killed. This sets the CTest property
# ``TIMEOUT``. The value ```` will be scaled by the value of
-# `${PROJECT_NAME}_SCALE_TEST_TIMEOUT`_.
+# `${PROJECT_NAME}_SCALE_TEST_TIMEOUT`_. See `Setting timeouts for tests
+# (TRIBITS_ADD_TEST())`_ for more details.
#
# **WARNING:** Rather than just increasing the timeout for an expensive
# test, please try to either make the test run faster or relegate the test
@@ -344,7 +353,7 @@ INCLUDE(TribitsAddTestHelpers)
# with the name(S) of the tests passed to ``ADD_TEST()``. If more than
# one test is added, then this will be a list of test names. Having this
# name allows the calling ``CMakeLists.txt`` file access and set
-# additional test propeties (see `Setting additional test properties
+# additional test properties (see `Setting additional test properties
# (TRIBITS_ADD_TEST())`_).
#
# In the end, this function just calls the built-in CMake commands
@@ -379,7 +388,8 @@ INCLUDE(TribitsAddTestHelpers)
# ${PACKAGE_NAME}_${${PROJECT_NAME}_CMAKE_EXECUTABLE_SUFFIX}
#
# which is (by no coincidence) identical to how it is selected in
-# `TRIBITS_ADD_EXECUTABLE()`_. This name can be altered by passing in
+# `TRIBITS_ADD_EXECUTABLE()`_ (see `Executable and Target Name
+# (TRIBITS_ADD_EXECUTABLE())`_). This name can be altered by passing in
# ``NOEXEPREFIX``, ``NOEXESUFFIX``, and ``ADD_DIR_TO_NAME`` as described in
# `Executable and Target Name (TRIBITS_ADD_EXECUTABLE())`_.
#
@@ -394,6 +404,9 @@ INCLUDE(TribitsAddTestHelpers)
# ``${CMAKE_CURRENT_BINARY_DIR}/`` is set as the executable to
# run in this case.
#
+# NOTE: On native Windows platforms, the ``NOEXESUFFIX`` will still allow
+# CTest to run executables that have the ``*.exe`` suffix.
+#
# Whatever executable path is specified using this logic, if the executable is
# not found, then when ``ctest`` goes to run the test, it will mark it as
# ``NOT RUN``.
@@ -452,7 +465,7 @@ INCLUDE(TribitsAddTestHelpers)
#
# may be preferable since it will not add any postfix name to the test. To
# add more than one test case using ``ARGS``, one will use more than one
-# quoted set of arugments such as with::
+# quoted set of arguments such as with::
#
# ARGS " " " "
#
@@ -470,7 +483,7 @@ INCLUDE(TribitsAddTestHelpers)
# the individual tests can be given more understandable names.
#
# The other advantage of the ``POSTFIX_AND_ARGS_`` form is that the
-# arugments ````, ````, ... do not need to be quoted and can
+# arguments ````, ````, ... do not need to be quoted and can
# therefore be extended over multiple lines like::
#
# POSTFIX_AND_ARGS_0 long_args --this-is-the-first-long-arg=very
@@ -530,8 +543,34 @@ INCLUDE(TribitsAddTestHelpers)
# or whether the test(s) are added or not (depending on other arguments like
# ``COMM``, ``XHOST``, etc.).
#
-# There are many other test properties that one may want to set also and this
-# is the way it needs to be done.
+# The following built-in CTest test properties are set through `Formal
+# Arguments (TRIBITS_ADD_TEST())`_ or are otherwise automatically set by this
+# function and should **NOT** be overridden by direct calls to
+# ``SET_TESTS_PROPERTIES()``: ``ENVIRONMENT``, ``FAIL_REGULAR_EXPRESSION``,
+# ``LABELS``, ``PASS_REGULAR_EXPRESSION``, ``RUN_SERIAL``, ``TIMEOUT``, and
+# ``WILL_FAIL``.
+#
+# However, generally, other built-in CTest test properties can be set after
+# the test is added like show above. Examples of test properties that can be
+# set using direct calls to ``SET_TESTS_PROPERTIES()`` include
+# ``ATTACHED_FILES``, ``ATTACHED_FILES_ON_FAIL``, ``COST``, ``DEPENDS``,
+# ``MEASUREMENT``, ``RESOURCE_LOCK`` and ``WORKING_DIRECTORY``.
+#
+# For example, one can set a dependency between two tests using::
+#
+# TRIBITS_ADD_TEST_TEST( test_a [...]
+# ADDED_TEST_NAME_OUT test_a_TEST_NAME )
+#
+# TRIBITS_ADD_TEST_TEST( test_b [...]
+# ADDED_TEST_NAME_OUT test_z_TEST_NAME )
+#
+# IF (test_a_TEST_NAME AND test_b_TEST_NAME)
+# SET_TESTS_PROPERTIES(${test_b_TEST_NAME}
+# PROPERTIES DEPENDS ${test_a_TEST_NAME})
+# ENDIF()
+#
+# This ensures that test ``test_b`` will always be run after ``test_a`` if
+# both tests are run by CTest.
#
# .. _Running multiple tests at the same time (TRIBITS_ADD_TEST()):
#
@@ -601,6 +640,55 @@ INCLUDE(TribitsAddTestHelpers)
# important when running multiple ``ctest -J`` invocations on the same test
# machine.
#
+# .. _Setting timeouts for tests (TRIBITS_ADD_TEST()):
+#
+# **Setting timeouts for tests (TRIBITS_ADD_TEST())**
+#
+# By default, all tests have a default timeout (1500 seconds for most
+# projects, see `DART_TESTING_TIMEOUT`_). That means that if they hang
+# (e.g. as is common when deadlocking occurs with multi-process MPI-based
+# tests and multi-threaded tests) then each test may hang for a long time,
+# causing the overall test suite to take a long time to complete. For many
+# CMake projects, this default timeout is way too long.
+#
+# Timeouts for tests can be adjusted in a couple of ways. First, a default
+# timeout for all tests is enforced by CTest given the configured value of the
+# variable `DART_TESTING_TIMEOUT`_ (typically set by the user but set by
+# default to 1500 for most projects). This is a global timeout that applies
+# to all tests that don't otherwise have individual timeouts set using the
+# ``TIMEOUT`` CTest property (see below). The value of
+# ``DART_TESTING_TIMEOUT`` in the CMake cache on input to CMake will get
+# scaled by `${PROJECT_NAME}_SCALE_TEST_TIMEOUT`_ and the scaled value gets
+# written into the file ``DartConfiguration.tcl`` as the field ``TimeOut``.
+# The``ctest`` executable reads ``TimeOut`` from this file when it runs to
+# determine the default global timeout. The value of this default global
+# ``TimeOut`` can be overridden using the ``ctest`` argument ``--timeout
+# `` (see `Overriding test timeouts`_).
+#
+# Alternatively, timeouts for individual tests can be set using the input
+# argument ``TIMEOUT`` (see `Formal Arguments (TRIBITS_ADD_TEST())`_ above).
+# The timeout value passed in to this function is then scaled by
+# ``${PROJECT_NAME}_SCALE_TEST_TIMEOUT`` and the scaled timeout is then set as
+# the CTest test property ``TIMEOUT``. One can observe the value of this
+# property in the CMake-generated file ``CTestTestfile.cmake`` in the current
+# build directory. Individual test timeouts set this way are not impacted by
+# the global default timeout ``DART_TESTING_TIMEOUT`` or the ``ctest``
+# argument ``--timeout ``.
+#
+# In summary, CTest determines the timeout for any individual test as follows:
+#
+# * If the ``TIMEOUT`` CTest property in ``CTestTestfile.cmake`` for that test
+# is set, then that value is used.
+#
+# * Else if the ``ctest`` commandline option ``--timeout `` is
+# provided, then that timeout is used.
+#
+# * Else if the property ``TimeOut`` in the base file
+# ``DartConfiguration.tcl`` is set to non-empty, then that timeout is used.
+#
+# * Else, no timeout is set and the test can run (and hang) forever until
+# manually killed by the user.
+#
# .. _Debugging and Examining Test Generation (TRIBITS_ADD_TEST()):
#
# **Debugging and Examining Test Generation (TRIBITS_ADD_TEST())**
@@ -659,13 +747,15 @@ FUNCTION(TRIBITS_ADD_TEST EXE_NAME)
ENDFOREACH()
#PRINT_VAR(POSTFIX_AND_ARGS_LIST)
- PARSE_ARGUMENTS(
+ CMAKE_PARSE_ARGUMENTS(
#prefix
PARSE
- #lists
- "DIRECTORY;KEYWORDS;COMM;NUM_MPI_PROCS;NUM_TOTAL_CORES_USED;ARGS;${POSTFIX_AND_ARGS_LIST};NAME;NAME_POSTFIX;CATEGORIES;HOST;XHOST;HOSTTYPE;XHOSTTYPE;EXCLUDE_IF_NOT_TRUE;PASS_REGULAR_EXPRESSION;FAIL_REGULAR_EXPRESSION;TIMEOUT;ENVIRONMENT;ADDED_TESTS_NAMES_OUT"
- #options
+ # options
"NOEXEPREFIX;NOEXESUFFIX;STANDARD_PASS_OUTPUT;WILL_FAIL;ADD_DIR_TO_NAME;RUN_SERIAL"
+ #one_value_keywords
+ ""
+ #multi_value_keywords
+"DIRECTORY;KEYWORDS;COMM;NUM_MPI_PROCS;NUM_TOTAL_CORES_USED;ARGS;${POSTFIX_AND_ARGS_LIST};NAME;NAME_POSTFIX;CATEGORIES;HOST;XHOST;HOSTTYPE;XHOSTTYPE;EXCLUDE_IF_NOT_TRUE;PASS_REGULAR_EXPRESSION;FAIL_REGULAR_EXPRESSION;TIMEOUT;ENVIRONMENT;ADDED_TESTS_NAMES_OUT"
${ARGN}
)
@@ -720,6 +810,12 @@ FUNCTION(TRIBITS_ADD_TEST EXE_NAME)
# B) Add or don't add tests based on a number of criteria
#
+ SET(ADD_THE_TEST FALSE)
+ TRIBITS_ADD_TEST_PROCESS_ENABLE_TESTS(ADD_THE_TEST)
+ IF (NOT ADD_THE_TEST)
+ RETURN()
+ ENDIF()
+
SET(ADD_THE_TEST FALSE)
TRIBITS_ADD_TEST_PROCESS_CATEGORIES(ADD_THE_TEST)
IF (NOT ADD_THE_TEST)
diff --git a/tribits/core/package_arch/TribitsAddTestHelpers.cmake b/tribits/core/package_arch/TribitsAddTestHelpers.cmake
index 8b90f4f20..e6b030e84 100644
--- a/tribits/core/package_arch/TribitsAddTestHelpers.cmake
+++ b/tribits/core/package_arch/TribitsAddTestHelpers.cmake
@@ -41,7 +41,7 @@
INCLUDE(TribitsAddExecutableTestHelpers)
INCLUDE(TribitsTestCategories)
-INCLUDE(ParseVariableArguments)
+INCLUDE(CMakeParseArguments)
INCLUDE(GlobalSet)
INCLUDE(AppendGlobalSet)
INCLUDE(AppendStringVarWithSep)
@@ -192,6 +192,31 @@ FUNCTION(TRIBITS_CONVERT_CMND_ARG_STRING_TO_ADD_TEST_ARG_ARRAY CMND_ARG_STRING A
ENDFUNCTION()
+#
+# Determine if to add the test based on if testing is enabled for the current
+# package or subpackage.
+#
+
+FUNCTION(TRIBITS_ADD_TEST_PROCESS_ENABLE_TESTS ADD_THE_TEST_OUT)
+ IF(${PACKAGE_NAME}_ENABLE_TESTS OR ${PARENT_PACKAGE_NAME}_ENABLE_TESTS)
+ SET(ADD_THE_TEST TRUE)
+ ELSE()
+ IF (PARENT_PACKAGE_NAME STREQUAL PACKAGE_NAME)
+ SET(PARENT_EANBLE_TESTS_DISABLE_MSG)
+ ELSE()
+ SET(PARENT_EANBLE_TESTS_DISABLE_MSG
+ ", ${PARENT_PACKAGE_NAME}_ENABLE_TESTS='${${PARENT_PACKAGE_NAME}_ENABLE_TESTS}'"
+ )
+ ENDIF()
+ MESSAGE_WRAPPER(
+ "-- ${TEST_NAME}: NOT added test because ${PACKAGE_NAME}_ENABLE_TESTS='${${PACKAGE_NAME}_ENABLE_TESTS}${PARENT_EANBLE_TESTS_DISABLE_MSG}'."
+ )
+ SET(ADD_THE_TEST FALSE)
+ ENDIF()
+ SET(${ADD_THE_TEST_OUT} ${ADD_THE_TEST} PARENT_SCOPE)
+ENDFUNCTION()
+
+
#
# Determine if to add the test or not based on [X]HOST and [X]HOSTTYPE arguments
#
diff --git a/tribits/core/package_arch/TribitsAdjustPackageEnables.cmake b/tribits/core/package_arch/TribitsAdjustPackageEnables.cmake
index 61e65daf8..9ad43af94 100644
--- a/tribits/core/package_arch/TribitsAdjustPackageEnables.cmake
+++ b/tribits/core/package_arch/TribitsAdjustPackageEnables.cmake
@@ -55,7 +55,7 @@ INCLUDE(RemoveGlobalDuplicates)
INCLUDE(SetDefault)
INCLUDE(MessageWrapper)
INCLUDE(DualScopeSet)
-INCLUDE(ParseVariableArguments)
+INCLUDE(CMakeParseArguments)
#
@@ -135,6 +135,8 @@ FUNCTION(TRIBITS_ABORT_ON_MISSING_PACKAGE DEP_PKG PACKAGE_NAME DEP_PKG_LIST_
"Error, the package '${DEP_PKG}' is listed as a dependency of the package"
" '${PACKAGE_NAME}' is in the list '${DEP_PKG_LIST_NAME}' but the package"
" '${DEP_PKG}' is either not defined or is listed later in the package order."
+ " This may also be an attempt to create a cicular dependency between"
+ " the packages '${DEP_PKG}' and '${PACKAGE_NAME}' (which is not allowed)."
" Check the spelling of '${DEP_PKG}' or see how it is listed in"
" ${PROJECT_NAME}_PACKAGES_AND_DIRS_AND_CLASSIFICATIONS in relationship to"
" '${PACKAGE_NAME}'.")
@@ -160,8 +162,8 @@ FUNCTION(TRIBITS_SET_DEP_PACKAGES PACKAGE_NAME LIB_OR_TEST REQUIRED_OR_OPTIO
ENDIF()
SET(LIST_TYPE ${LIB_OR_TEST}_${REQUIRED_OR_OPTIONAL}_DEP_PACKAGES)
-
SET(PACKAGE_DEPS_LIST)
+ SET(SE_PACKAGE_ENABLE_VAR ${PROJECT_NAME}_ENABLE_${PACKAGE_NAME})
FOREACH(DEP_PKG ${${LIST_TYPE}})
IF (TRIBITS_SET_DEP_PACKAGES_DEBUG_DUMP)
@@ -194,7 +196,6 @@ FUNCTION(TRIBITS_SET_DEP_PACKAGES PACKAGE_NAME LIB_OR_TEST REQUIRED_OR_OPTIO
" ${${DEP_PKG}_ALLOW_MISSING_EXTERNAL_PACKAGE}!")
ENDIF()
IF (REQUIRED_OR_OPTIONAL STREQUAL "REQUIRED")
- SET(SE_PACKAGE_ENABLE_VAR ${PROJECT_NAME}_ENABLE_${PACKAGE_NAME})
MESSAGE_WRAPPER("NOTE: Setting ${SE_PACKAGE_ENABLE_VAR}=OFF because"
" package ${PACKAGE_NAME} has a required dependency on missing"
" package ${DEP_PKG}!")
@@ -208,6 +209,11 @@ FUNCTION(TRIBITS_SET_DEP_PACKAGES PACKAGE_NAME LIB_OR_TEST REQUIRED_OR_OPTIO
" ${PACKAGE_NAME} being ignored because ${DEP_PKG} is missing!"
"\n***\n" )
ENDIF()
+ # Must set enable vars for missing package to off so that logic in
+ # existing downstream packages that key off of these vars will still
+ # work.
+ DUAL_SCOPE_SET(${PROJECT_NAME}_ENABLE_${DEP_PKG} OFF)
+ DUAL_SCOPE_SET(${PACKAGE_NAME}_ENABLE_${DEP_PKG} OFF)
ENDIF()
ENDIF()
ENDFOREACH()
@@ -456,18 +462,20 @@ ENDMACRO()
# directly setting the variables is that an SE package only needs to list
# dependencies that exist. Otherwise, the ``Dependencies.cmake`` file will
# need to set all of the above local variables, even those that are empty.
-# This is a error checking property of the TriBITS system to avoid misspelling
+# This is an error checking property of the TriBITS system to avoid misspelling
# the names of these variables.
#
MACRO(TRIBITS_PACKAGE_DEFINE_DEPENDENCIES)
- PARSE_ARGUMENTS(
+ CMAKE_PARSE_ARGUMENTS(
#prefix
PARSE
- #lists
- "LIB_REQUIRED_PACKAGES;LIB_OPTIONAL_PACKAGES;TEST_REQUIRED_PACKAGES;TEST_OPTIONAL_PACKAGES;LIB_REQUIRED_TPLS;LIB_OPTIONAL_TPLS;TEST_REQUIRED_TPLS;TEST_OPTIONAL_TPLS;REGRESSION_EMAIL_LIST;SUBPACKAGES_DIRS_CLASSIFICATIONS_OPTREQS"
#options
""
+ #one_value_keywords
+ ""
+ #multi_value_keywords
+ "LIB_REQUIRED_PACKAGES;LIB_OPTIONAL_PACKAGES;TEST_REQUIRED_PACKAGES;TEST_OPTIONAL_PACKAGES;LIB_REQUIRED_TPLS;LIB_OPTIONAL_TPLS;TEST_REQUIRED_TPLS;TEST_OPTIONAL_TPLS;REGRESSION_EMAIL_LIST;SUBPACKAGES_DIRS_CLASSIFICATIONS_OPTREQS"
${ARGN}
)
@@ -756,7 +764,7 @@ ENDMACRO()
#
MACRO(TRIBITS_READ_ALL_PACKAGE_SUBPACKAGE_DEPENDENCIES PACKAGE_NAME PACKAGE_DIR)
- #MESSAGE("TRIBITS_READ_ALL_PACKAGE_SUBPACKAGE_DEPENDENCIES: ${PACAKGE_NAME} ${PACKAGE_DIR}")
+ #MESSAGE("TRIBITS_READ_ALL_PACKAGE_SUBPACKAGE_DEPENDENCIES: ${PACKAGE_NAME} ${PACKAGE_DIR}")
#PRINT_VAR(${PROJECT_NAME}_SE_PACKAGES)
@@ -889,7 +897,7 @@ MACRO(TRIBITS_READ_PACKAGE_DEPENDENCIES PACKAGE_NAME PACKAGE_DIR)
MATH(EXPR SUBPACKAGE_IDX "${SUBPACKAGE_IDX}+1")
ENDFOREACH()
- # Append this package to list of SE pacakges *after* subpackages are added!
+ # Append this package to list of SE packages *after* subpackages are added!
LIST(APPEND ${PROJECT_NAME}_SE_PACKAGES ${PACKAGE_NAME})
# Process this parent package's dependency lists!
@@ -1077,7 +1085,8 @@ FUNCTION(TRIBITS_PRIVATE_PRINT_DISABLE
MESSAGE(
" ***\n"
" *** WARNING: Setting ${ENABLE_BEING_DISABLED_VAR_NAME}=OFF"
- " which was 'ON' because ${PACKAGE_WITH_SOMETHING_BEING_DISABLED} has"
+ " which was '${${ENABLE_BEING_DISABLED_VAR_NAME}}' because"
+ " ${PACKAGE_WITH_SOMETHING_BEING_DISABLED} has"
" a required ${DEP_TYPE_STR} dependence on disabled"
" ${THING_DISALBED_TYPE} ${THING_DISABLED_NAME}"
" but ${PROJECT_NAME}_DISABLE_ENABLED_FORWARD_DEP_PACKAGES=ON!\n"
@@ -1087,7 +1096,8 @@ FUNCTION(TRIBITS_PRIVATE_PRINT_DISABLE
MESSAGE(FATAL_ERROR
" ***\n"
" *** ERROR: Setting ${ENABLE_BEING_DISABLED_VAR_NAME}=OFF"
- " which was 'ON' because ${PACKAGE_WITH_SOMETHING_BEING_DISABLED} has"
+ " which was '${${ENABLE_BEING_DISABLED_VAR_NAME}}' because"
+ " ${PACKAGE_WITH_SOMETHING_BEING_DISABLED} has"
" a required ${DEP_TYPE_STR} dependence on disabled"
" ${THING_DISALBED_TYPE} ${THING_DISABLED_NAME}!\n"
" ***\n"
@@ -1237,10 +1247,18 @@ MACRO(TRIBITS_PRIVATE_DISABLE_OPTIONAL_PACKAGE_ENABLES
# Always disable the conditional enable but only print the message if the package is enabled.
#MESSAGE("-- Disasble ${PROJECT_NAME}_ENABLE_${FORWARD_DEP_PACKAGE_NAME} ...")
IF (${PROJECT_NAME}_ENABLE_${FORWARD_DEP_PACKAGE_NAME})
- MESSAGE("-- "
- "Setting ${FORWARD_DEP_PACKAGE_NAME}_ENABLE_${PACKAGE_NAME}=OFF"
- " because ${FORWARD_DEP_PACKAGE_NAME} has an optional library dependence"
- " on disabled package ${PACKAGE_NAME}")
+ IF (${FORWARD_DEP_PACKAGE_NAME}_ENABLE_${PACKAGE_NAME}) # is explicity try already!
+ MESSAGE("-- "
+ "NOTE: Setting ${FORWARD_DEP_PACKAGE_NAME}_ENABLE_${PACKAGE_NAME}=OFF"
+ " which was ${${FORWARD_DEP_PACKAGE_NAME}_ENABLE_${PACKAGE_NAME}}"
+ " because ${FORWARD_DEP_PACKAGE_NAME} has an optional library dependence"
+ " on disabled package ${PACKAGE_NAME}")
+ ELSE() # Not explicitly set
+ MESSAGE("-- "
+ "Setting ${FORWARD_DEP_PACKAGE_NAME}_ENABLE_${PACKAGE_NAME}=OFF"
+ " because ${FORWARD_DEP_PACKAGE_NAME} has an optional library dependence"
+ " on disabled package ${PACKAGE_NAME}")
+ ENDIF()
ENDIF()
SET(${FORWARD_DEP_PACKAGE_NAME}_ENABLE_${PACKAGE_NAME} OFF)
ENDIF()
@@ -1551,17 +1569,38 @@ ENDMACRO()
# Private helper macros
#
+
+#
+# Enable optional intra-package support for enabled target package
+# ${PACKAGE_NAME} (i.e. ${PROJECT_NAME}_ENABLE_${PACKAGE_NAME} is assumed to
+# be TRUE before calling this macro.
+#
MACRO(TRIBITS_PRIVATE_POSTPROCESS_OPTIONAL_PACKAGE_ENABLE PACKAGE_NAME OPTIONAL_DEP_PACKAGE)
#MESSAGE("TRIBITS_PRIVATE_POSTPROCESS_OPTIONAL_PACKAGE_ENABLE: ${PACKAGE_NAME} ${OPTIONAL_DEP_PACKAGE}")
-
- IF("${${PACKAGE_NAME}_ENABLE_${OPTIONAL_DEP_PACKAGE}}" STREQUAL "")
- IF(${PROJECT_NAME}_ENABLE_${PACKAGE_NAME} AND ${PROJECT_NAME}_ENABLE_${OPTIONAL_DEP_PACKAGE})
+ #PRINT_VAR(${PACKAGE_NAME}_ENABLE_${OPTIONAL_DEP_PACKAGE})
+ #PRINT_VAR(${PROJECT_NAME}_ENABLE_${OPTIONAL_DEP_PACKAGE})
+
+ IF (${PACKAGE_NAME}_ENABLE_${OPTIONAL_DEP_PACKAGE} AND ${PROJECT_NAME}_ENABLE_${OPTIONAL_DEP_PACKAGE})
+ MESSAGE("-- " "NOTE:"
+ " ${PACKAGE_NAME}_ENABLE_${OPTIONAL_DEP_PACKAGE}=${${PACKAGE_NAME}_ENABLE_${OPTIONAL_DEP_PACKAGE}}"
+ " is already set!")
+ ELSEIF ("${${PACKAGE_NAME}_ENABLE_${OPTIONAL_DEP_PACKAGE}}" STREQUAL "")
+ IF (${PROJECT_NAME}_ENABLE_${OPTIONAL_DEP_PACKAGE})
MESSAGE("-- " "Setting ${PACKAGE_NAME}_ENABLE_${OPTIONAL_DEP_PACKAGE}=ON"
" since ${PROJECT_NAME}_ENABLE_${PACKAGE_NAME}=ON AND"
" ${PROJECT_NAME}_ENABLE_${OPTIONAL_DEP_PACKAGE}=ON")
SET(${PACKAGE_NAME}_ENABLE_${OPTIONAL_DEP_PACKAGE} ON)
+ ELSE()
+ MESSAGE("-- " "NOT setting ${PACKAGE_NAME}_ENABLE_${OPTIONAL_DEP_PACKAGE}=ON"
+ " since ${OPTIONAL_DEP_PACKAGE} is NOT enabled at this point!")
ENDIF()
+ ELSEIF (NOT "${${PACKAGE_NAME}_ENABLE_${OPTIONAL_DEP_PACKAGE}}" STREQUAL ""
+ AND NOT ${PACKAGE_NAME}_ENABLE_${OPTIONAL_DEP_PACKAGE}
+ AND ${PROJECT_NAME}_ENABLE_${OPTIONAL_DEP_PACKAGE}
+ )
+ MESSAGE("-- " "NOTE: ${PACKAGE_NAME}_ENABLE_${OPTIONAL_DEP_PACKAGE}=${${PACKAGE_NAME}_ENABLE_${OPTIONAL_DEP_PACKAGE}}"
+ " is already set so not enabling even though ${PROJECT_NAME}_ENABLE_${OPTIONAL_DEP_PACKAGE}=${${PROJECT_NAME}_ENABLE_${OPTIONAL_DEP_PACKAGE}} is set!")
ENDIF()
STRING(TOUPPER ${PACKAGE_NAME} PACKAGE_NAME_UPPER)
@@ -1577,46 +1616,55 @@ MACRO(TRIBITS_PRIVATE_POSTPROCESS_OPTIONAL_PACKAGE_ENABLE PACKAGE_NAME OPTIONAL_
ENDMACRO()
+#
+# Enable optional intra-package support for enabled target package
+# ${PACKAGE_NAME} (i.e. ${PROJECT_NAME}_ENABLE_${PACKAGE_NAME} is assumed to
+# be TRUE before calling this macro.
+#
MACRO(TRIBITS_PRIVATE_POSTPROCESS_OPTIONAL_TPL_ENABLE PACKAGE_NAME OPTIONAL_DEP_TPL)
#MESSAGE("TRIBITS_PRIVATE_POSTPROCESS_OPTIONAL_TPL_ENABLE: ${PACKAGE_NAME} ${OPTIONAL_DEP_TPL}")
- IF (${PROJECT_NAME}_ENABLE_${PACKAGE_NAME})
-
- IF (
- (
- (NOT TPL_ENABLE_${OPTIONAL_DEP_TPL})
- AND
- (NOT "${TPL_ENABLE_${OPTIONAL_DEP_TPL}}" STREQUAL "")
- )
- AND
- ${PACKAGE_NAME}_ENABLE_${OPTIONAL_DEP_TPL}
- )
- MESSAGE(
- "\n***"
- "\n*** WARNING: Setting ${PACKAGE_NAME}_ENABLE_${OPTIONAL_DEP_TPL}=OFF"
- " which was ON since TPL_ENABLE_${OPTIONAL_DEP_TPL}=OFF"
- "\n***\n"
- )
- SET(${PACKAGE_NAME}_ENABLE_${OPTIONAL_DEP_TPL} OFF)
- ELSEIF ("${${PACKAGE_NAME}_ENABLE_${OPTIONAL_DEP_TPL}}" STREQUAL ""
- AND TPL_ENABLE_${OPTIONAL_DEP_TPL}
+ IF (${PACKAGE_NAME}_ENABLE_${OPTIONAL_DEP_TPL} AND TPL_ENABLE_${OPTIONAL_DEP_TPL})
+ MESSAGE("-- " "NOTE:"
+ " ${PACKAGE_NAME}_ENABLE_${OPTIONAL_DEP_TPL}=${${PACKAGE_NAME}_ENABLE_${OPTIONAL_DEP_TPL}}"
+ " is already set!")
+ ELSEIF (
+ (NOT TPL_ENABLE_${OPTIONAL_DEP_TPL})
+ AND
+ (NOT "${TPL_ENABLE_${OPTIONAL_DEP_TPL}}" STREQUAL "")
+ AND
+ ${PACKAGE_NAME}_ENABLE_${OPTIONAL_DEP_TPL}
+ )
+ MESSAGE(
+ "\n***"
+ "\n*** WARNING: Setting ${PACKAGE_NAME}_ENABLE_${OPTIONAL_DEP_TPL}=OFF"
+ " which was ON since TPL_ENABLE_${OPTIONAL_DEP_TPL}=OFF"
+ "\n***\n"
)
- MESSAGE("-- " "Setting ${PACKAGE_NAME}_ENABLE_${OPTIONAL_DEP_TPL}=ON"
- " since TPL_ENABLE_${OPTIONAL_DEP_TPL}=ON")
- SET(${PACKAGE_NAME}_ENABLE_${OPTIONAL_DEP_TPL} ON)
- ENDIF()
-
- STRING(TOUPPER ${PACKAGE_NAME} PACKAGE_NAME_UPPER)
- STRING(TOUPPER ${OPTIONAL_DEP_TPL} OPTIONAL_DEP_TPL_UPPER)
- SET(MACRO_DEFINE_NAME HAVE_${PACKAGE_NAME_UPPER}_${OPTIONAL_DEP_TPL_UPPER})
+ SET(${PACKAGE_NAME}_ENABLE_${OPTIONAL_DEP_TPL} OFF)
+ ELSEIF ("${${PACKAGE_NAME}_ENABLE_${OPTIONAL_DEP_TPL}}" STREQUAL ""
+ AND TPL_ENABLE_${OPTIONAL_DEP_TPL}
+ )
+ MESSAGE("-- " "Setting ${PACKAGE_NAME}_ENABLE_${OPTIONAL_DEP_TPL}=ON"
+ " since TPL_ENABLE_${OPTIONAL_DEP_TPL}=ON")
+ SET(${PACKAGE_NAME}_ENABLE_${OPTIONAL_DEP_TPL} ON)
+ ELSEIF (NOT "${${PACKAGE_NAME}_ENABLE_${OPTIONAL_DEP_TPL}}" STREQUAL ""
+ AND NOT ${PACKAGE_NAME}_ENABLE_${OPTIONAL_DEP_TPL}
+ AND TPL_ENABLE_${OPTIONAL_DEP_TPL}
+ )
+ MESSAGE("-- " "NOTE: ${PACKAGE_NAME}_ENABLE_${OPTIONAL_DEP_TPL}=${${PACKAGE_NAME}_ENABLE_${OPTIONAL_DEP_TPL}}"
+ " is already set so not enabling even though TPL_ENABLE_${OPTIONAL_DEP_TPL}=${TPL_ENABLE_${OPTIONAL_DEP_TPL}} is set!")
+ ENDIF()
- IF (${PACKAGE_NAME}_ENABLE_${OPTIONAL_DEP_TPL})
- SET(${MACRO_DEFINE_NAME} ON)
- ELSE()
- SET(${MACRO_DEFINE_NAME} OFF)
- ENDIF()
+ STRING(TOUPPER ${PACKAGE_NAME} PACKAGE_NAME_UPPER)
+ STRING(TOUPPER ${OPTIONAL_DEP_TPL} OPTIONAL_DEP_TPL_UPPER)
+ SET(MACRO_DEFINE_NAME HAVE_${PACKAGE_NAME_UPPER}_${OPTIONAL_DEP_TPL_UPPER})
+ IF (${PACKAGE_NAME}_ENABLE_${OPTIONAL_DEP_TPL})
+ SET(${MACRO_DEFINE_NAME} ON)
+ ELSE()
+ SET(${MACRO_DEFINE_NAME} OFF)
ENDIF()
ENDMACRO()
@@ -1632,7 +1680,7 @@ MACRO(TRIBITS_POSTPROCESS_OPTIONAL_PACKAGE_ENABLES PACKAGE_NAME)
#MESSAGE("\nPACKAGE_ARCH_POSTPROCESS_OPTIONAL_PACKAGE_ENABLES: ${PACKAGE_NAME}")
ASSERT_DEFINED(${PROJECT_NAME}_ENABLE_${PACKAGE_NAME})
- IF(${PROJECT_NAME}_ENABLE_${PACKAGE_NAME})
+ IF (${PROJECT_NAME}_ENABLE_${PACKAGE_NAME})
FOREACH(OPTIONAL_DEP_PACKAGE ${${PACKAGE_NAME}_LIB_OPTIONAL_DEP_PACKAGES})
TRIBITS_PRIVATE_POSTPROCESS_OPTIONAL_PACKAGE_ENABLE(
@@ -1700,16 +1748,20 @@ ENDMACRO()
MACRO(TRIBITS_POSTPROCESS_OPTIONAL_TPL_ENABLES PACKAGE_NAME)
#MESSAGE("\nPACKAGE_ARCH_ADD_OPTIONAL_TPL_ENABLES: ${PACKAGE_NAME}")
+
+ IF (${PROJECT_NAME}_ENABLE_${PACKAGE_NAME})
- FOREACH(OPTIONAL_DEP_TPL ${${PACKAGE_NAME}_LIB_OPTIONAL_DEP_TPLS})
- TRIBITS_PRIVATE_POSTPROCESS_OPTIONAL_TPL_ENABLE(
- ${PACKAGE_NAME} ${OPTIONAL_DEP_TPL} )
- ENDFOREACH()
+ FOREACH(OPTIONAL_DEP_TPL ${${PACKAGE_NAME}_LIB_OPTIONAL_DEP_TPLS})
+ TRIBITS_PRIVATE_POSTPROCESS_OPTIONAL_TPL_ENABLE(
+ ${PACKAGE_NAME} ${OPTIONAL_DEP_TPL} )
+ ENDFOREACH()
- FOREACH(OPTIONAL_DEP_TPL ${${PACKAGE_NAME}_TEST_OPTIONAL_DEP_TPLS})
- TRIBITS_PRIVATE_POSTPROCESS_OPTIONAL_TPL_ENABLE(
- ${PACKAGE_NAME} ${OPTIONAL_DEP_TPL} )
- ENDFOREACH()
+ FOREACH(OPTIONAL_DEP_TPL ${${PACKAGE_NAME}_TEST_OPTIONAL_DEP_TPLS})
+ TRIBITS_PRIVATE_POSTPROCESS_OPTIONAL_TPL_ENABLE(
+ ${PACKAGE_NAME} ${OPTIONAL_DEP_TPL} )
+ ENDFOREACH()
+
+ ENDIF()
ENDMACRO()
@@ -2173,8 +2225,6 @@ FUNCTION(TRIBITS_GET_NONENABLED_LIST LISTVAR ENABLED_PREFIX
ENDFUNCTION()
-
-
#
# Macro that sets up the basic lists of enabled packages and SE packages.
#
@@ -2218,24 +2268,6 @@ ENDMACRO()
#
MACRO(TRIBITS_ADJUST_PACKAGE_ENABLES)
- # Provide backward compatible support for ${PROJECT_NAME}_ENABLE_SECONDARY_STABLE_CODE
- IF (${PROJECT_NAME}_ENABLE_SECONDARY_STABLE_CODE)
- IF (${PROJECT_NAME}_ENABLE_SECONDARY_TESTED_CODE)
- MESSAGE(
- "WARNING: Set deprecated ${PROJECT_NAME}_ENABLE_SECONDARY_STABLE_CODE and"
- " updated ${PROJECT_NAME}_ENABLE_SECONDARY_TESTED_CODE at the same time!")
- ENDIF()
- MESSAGE(
- "WARNING: Set var ${PROJECT_NAME}_ENABLE_SECONDARY_STABLE_CODE is deprecated!"
- " Use ${PROJECT_NAME}_ENABLE_SECONDARY_TESTED_CODE instead!")
- SET(${PROJECT_NAME}_ENABLE_SECONDARY_TESTED_CODE ON)
- ENDIF()
-
- # We must set ${PROJECT_NAME}_ENABLE_SECONDARY_STABLE_CODE since many
- # TriBITS packages expect this to be set!
- SET(${PROJECT_NAME}_ENABLE_SECONDARY_STABLE_CODE
- ${${PROJECT_NAME}_ENABLE_SECONDARY_TESTED_CODE})
-
IF (${PROJECT_NAME}_UNENABLE_ENABLED_PACKAGES)
MESSAGE("")
MESSAGE("Setting to empty '' all enabled packages on reqeust ...")
@@ -2308,7 +2340,9 @@ MACRO(TRIBITS_ADJUST_PACKAGE_ENABLES)
IF (${PROJECT_NAME}_ENABLE_ALL_PACKAGES)
MESSAGE("")
MESSAGE("Enabling all SE packages that are not currently disabled because of"
- " ${PROJECT_NAME}_ENABLE_ALL_PACKAGES=ON ...")
+ " ${PROJECT_NAME}_ENABLE_ALL_PACKAGES=ON"
+ " (${PROJECT_NAME}_ENABLE_SECONDARY_TESTED_CODE=${${PROJECT_NAME}_ENABLE_SECONDARY_TESTED_CODE})"
+ " ...")
MESSAGE("")
FOREACH(TRIBITS_PACKAGE ${${PROJECT_NAME}_NOTDISABLED_SE_PACKAGES})
TRIBITS_APPLY_ALL_PACKAGE_ENABLES(${TRIBITS_PACKAGE})
@@ -2331,7 +2365,7 @@ MACRO(TRIBITS_ADJUST_PACKAGE_ENABLES)
TRIBITS_ENABLE_FORWARD_TEST_PACKAGE_ENABLES(${TRIBITS_PACKAGE})
ENDFOREACH()
# NOTE: Above, we want to sweep backward to enable test-dependent packages
- # because we don't want to enable pacakge Z just because pacakge Y was enabled
+ # because we don't want to enable package Z just because package Y was enabled
# because it had a test-only dependency on package X. Sweeping backwards through
# the packages makes sure this does not happen.
SET(${PROJECT_NAME}_ENABLE_ALL_OPTIONAL_PACKAGES ON)
@@ -2369,7 +2403,9 @@ MACRO(TRIBITS_ADJUST_PACKAGE_ENABLES)
MESSAGE("")
MESSAGE("Enabling all required${EXTRA_MSG_STR} upstream SE packages for current set of"
- " enabled packages ...")
+ " enabled packages"
+ " (${PROJECT_NAME}_ENABLE_SECONDARY_TESTED_CODE=${${PROJECT_NAME}_ENABLE_SECONDARY_TESTED_CODE})"
+ " ...")
MESSAGE("")
FOREACH(TRIBITS_PACKAGE ${${PROJECT_NAME}_REVERSE_NOTDISABLED_SE_PACKAGES})
TRIBITS_ENABLE_UPSTREAM_SE_PACKAGES(${TRIBITS_PACKAGE})
@@ -2404,7 +2440,8 @@ MACRO(TRIBITS_ADJUST_PACKAGE_ENABLES)
ENDFOREACH()
MESSAGE("")
- MESSAGE("Enabling all optional package TPL support for currently"
+ MESSAGE("Enabling all optional package TPL support"
+ " _ENABLE_ not currently disabled for"
" enabled TPLs ...")
MESSAGE("")
FOREACH(TRIBITS_PACKAGE ${${PROJECT_NAME}_ENABLED_SE_PACKAGES})
@@ -2437,7 +2474,7 @@ MACRO(TRIBITS_ADJUST_PACKAGE_ENABLES)
#
MESSAGE("")
- MESSAGE("Enabling all parent packages that have at least one subpackage enabled ...")
+ MESSAGE("Enabling the shell of non-enabled parent packages (mostly for show) that have at least one subpackage enabled ...")
MESSAGE("")
FOREACH(TRIBITS_PACKAGE ${${PROJECT_NAME}_PACKAGES})
TRIBITS_POSTPROCESS_PACKAGE_WITH_SUBPACKAGES_ENABLES(${TRIBITS_PACKAGE})
diff --git a/tribits/core/package_arch/TribitsCopyFilesToBinaryDir.cmake b/tribits/core/package_arch/TribitsCopyFilesToBinaryDir.cmake
index 43cf9e577..924a031c4 100644
--- a/tribits/core/package_arch/TribitsCopyFilesToBinaryDir.cmake
+++ b/tribits/core/package_arch/TribitsCopyFilesToBinaryDir.cmake
@@ -39,7 +39,7 @@
INCLUDE(TribitsAddTestHelpers)
-INCLUDE(ParseVariableArguments)
+INCLUDE(CMakeParseArguments)
#
@@ -172,16 +172,17 @@ FUNCTION(TRIBITS_COPY_FILES_TO_BINARY_DIR TARGET_NAME)
#
# A) Parse input arguments
#
-
- PARSE_ARGUMENTS(
+ CMAKE_PARSE_ARGUMENTS(
#prefix
PARSE
- #lists
- "SOURCE_DIR;SOURCE_FILES;SOURCE_PREFIX;DEST_DIR;DEST_FILES;EXEDEPS;TARGETDEPS;CATEGORIES"
#options
"NOEXEPREFIX"
+ #one_value_keywords
+ ""
+ #multi_value_keywords
+ "SOURCE_DIR;SOURCE_FILES;SOURCE_PREFIX;DEST_DIR;DEST_FILES;EXEDEPS;TARGETDEPS;CATEGORIES"
${ARGN}
- )
+ )
SET(ADD_THE_TEST FALSE)
TRIBITS_ADD_TEST_PROCESS_CATEGORIES(ADD_THE_TEST)
diff --git a/tribits/core/package_arch/TribitsCreateClientTemplateHeaders.cmake b/tribits/core/package_arch/TribitsCreateClientTemplateHeaders.cmake
index 027aa9617..659872b4f 100644
--- a/tribits/core/package_arch/TribitsCreateClientTemplateHeaders.cmake
+++ b/tribits/core/package_arch/TribitsCreateClientTemplateHeaders.cmake
@@ -38,7 +38,7 @@
# @HEADER
-INCLUDE(ParseVariableArguments)
+INCLUDE(CMakeParseArguments)
INCLUDE(PrintVar)
@@ -81,13 +81,15 @@ FUNCTION(TRIBITS_CREATE_CLIENT_TEMPLATE_HEADERS BASE_DIR)
# A) Parse the input arguments
#
- PARSE_ARGUMENTS(
+ CMAKE_PARSE_ARGUMENTS(
#prefix
PARSE
- #lists
- "ADDITIONAL_OUPTUT_DIRS"
#options
""
+ #one_value_keywords
+ ""
+ #multi_value_keywords
+ "ADDITIONAL_OUPTUT_DIRS"
${ARGN}
)
diff --git a/tribits/core/package_arch/TribitsETISupport.cmake b/tribits/core/package_arch/TribitsETISupport.cmake
index 58a07cf98..8b164749f 100644
--- a/tribits/core/package_arch/TribitsETISupport.cmake
+++ b/tribits/core/package_arch/TribitsETISupport.cmake
@@ -57,6 +57,7 @@ FUNCTION(TRIBITS_ETI_TYPE_EXPANSION outvar first_list)
SET(label "${CMAKE_MATCH_1}")
SET(tlist "${CMAKE_MATCH_2}")
ENDIF()
+ SET(eti_result "")
SPLIT("${tlist}" "\\|" tlist)
IF ("${${outvar}}" STREQUAL "")
SET(accumulate OFF)
@@ -70,20 +71,20 @@ FUNCTION(TRIBITS_ETI_TYPE_EXPANSION outvar first_list)
STRING(STRIP "${t}" t)
SET(t "{${t}}")
FOREACH(s ${sub})
- LIST(APPEND result "${label}=${t} ${s}")
+ LIST(APPEND eti_result "${label}=${t} ${s}")
ENDFOREACH()
ENDFOREACH()
ELSE()
FOREACH(t ${tlist})
STRING(STRIP "${t}" t)
SET(t "{${t}}")
- LIST(APPEND result "${label}=${t}")
+ LIST(APPEND eti_result "${label}=${t}")
ENDFOREACH()
ENDIF()
IF (accumulate)
- SET(${outvar} "${${outvar}};${result}" PARENT_SCOPE)
+ SET(${outvar} "${${outvar}};${eti_result}" PARENT_SCOPE)
ELSE()
- SET(${outvar} "${result}" PARENT_SCOPE)
+ SET(${outvar} "${eti_result}" PARENT_SCOPE)
ENDIF()
ENDFUNCTION()
@@ -91,18 +92,18 @@ ENDFUNCTION()
FUNCTION(TRIBITS_ETI_EXPLODE fields inst outvar)
foreach (field ${fields})
IF( "${inst}" MATCHES "( |^)${field}={([^{}$=]*)}( |$)")
- LIST(APPEND result "${CMAKE_MATCH_2}")
+ LIST(APPEND eti_result "${CMAKE_MATCH_2}")
ELSEIF("${inst}" MATCHES "( |^)${field}=([^{} $=]*)( |$)")
- LIST(APPEND result "${CMAKE_MATCH_2}")
+ LIST(APPEND eti_result "${CMAKE_MATCH_2}")
ELSEIF(NOT "${inst}" MATCHES "( |^)${field}=")
- LIST(APPEND result "TYPE-MISSING")
+ LIST(APPEND eti_result "TYPE-MISSING")
ELSE()
- SET(result "TRIBITS_ETI_BAD_PARSE")
+ SET(eti_result "TRIBITS_ETI_BAD_PARSE")
BREAK()
ENDIF()
endforeach()
- JOIN(result "|" FALSE ${result})
- SET(${outvar} "${result}" PARENT_SCOPE)
+ JOIN(eti_result "|" FALSE ${eti_result})
+ SET(${outvar} "${eti_result}" PARENT_SCOPE)
ENDFUNCTION()
# effectively, a tupled regex, wrapped in a for loop
diff --git a/tribits/core/package_arch/TribitsFindMostRecentFileTimestamp.cmake b/tribits/core/package_arch/TribitsFindMostRecentFileTimestamp.cmake
index 39f9d9b40..7011c052f 100644
--- a/tribits/core/package_arch/TribitsFindMostRecentFileTimestamp.cmake
+++ b/tribits/core/package_arch/TribitsFindMostRecentFileTimestamp.cmake
@@ -37,7 +37,7 @@
# ************************************************************************
# @HEADER
-INCLUDE(ParseVariableArguments)
+INCLUDE(CMakeParseArguments)
#
@@ -131,13 +131,15 @@ FUNCTION(TRIBITS_FIND_MOST_RECENT_FILE_TIMESTAMP)
# A) Parse the input arguments
#
- PARSE_ARGUMENTS(
+ CMAKE_PARSE_ARGUMENTS(
#prefix
PARSE
- #lists
- "BASE_DIRS;BASE_BASE_DIR;EXCLUDE_REGEXES;MOST_RECENT_TIMESTAMP_OUT;MOST_RECENT_FILEPATH_BASE_DIR_OUT;MOST_RECENT_RELATIVE_FILEPATH_OUT"
#options
"SHOW_MOST_RECENT_FILES;SHOW_OVERALL_MOST_RECENT_FILES"
+ #one_value_keywords
+ ""
+ #mulit_value_keywords
+ "BASE_DIRS;BASE_BASE_DIR;EXCLUDE_REGEXES;MOST_RECENT_TIMESTAMP_OUT;MOST_RECENT_FILEPATH_BASE_DIR_OUT;MOST_RECENT_RELATIVE_FILEPATH_OUT"
${ARGN}
)
@@ -319,13 +321,15 @@ FUNCTION(TRIBITS_FIND_MOST_RECENT_SOURCE_FILE_TIMESTAMP)
# A) Parse the input arguments
#
- PARSE_ARGUMENTS(
+ CMAKE_PARSE_ARGUMENTS(
#prefix
PARSE
- #lists
- "SOURCE_BASE_DIRS;SOURCE_BASE_BASE_DIR;MOST_RECENT_TIMESTAMP_OUT;MOST_RECENT_FILEPATH_BASE_DIR_OUT;MOST_RECENT_RELATIVE_FILEPATH_OUT"
#options
"SHOW_MOST_RECENT_FILES;SHOW_OVERALL_MOST_RECENT_FILES"
+ #one_value_keywords
+ ""
+ #multi_value_keywords
+ "SOURCE_BASE_DIRS;SOURCE_BASE_BASE_DIR;MOST_RECENT_TIMESTAMP_OUT;MOST_RECENT_FILEPATH_BASE_DIR_OUT;MOST_RECENT_RELATIVE_FILEPATH_OUT"
${ARGN}
)
@@ -402,13 +406,15 @@ FUNCTION(TRIBITS_FIND_MOST_RECENT_BINARY_FILE_TIMESTAMP)
# A) Parse the input arguments
#
- PARSE_ARGUMENTS(
+ CMAKE_PARSE_ARGUMENTS(
#prefix
PARSE
- #lists
- "BINARY_BASE_DIRS;BINARY_BASE_BASE_DIR;MOST_RECENT_TIMESTAMP_OUT;MOST_RECENT_FILEPATH_BASE_DIR_OUT;MOST_RECENT_RELATIVE_FILEPATH_OUT"
#options
"SHOW_MOST_RECENT_FILES;SHOW_OVERALL_MOST_RECENT_FILES"
+ #one_value_keywords
+ ""
+ #multi_value_keywords
+ "BINARY_BASE_DIRS;BINARY_BASE_BASE_DIR;MOST_RECENT_TIMESTAMP_OUT;MOST_RECENT_FILEPATH_BASE_DIR_OUT;MOST_RECENT_RELATIVE_FILEPATH_OUT"
${ARGN}
)
@@ -532,13 +538,15 @@ FUNCTION(TRIBITS_DETERMINE_IF_CURRENT_PACKAGE_NEEDS_REBUILT)
# A) Parse the input arguments
#
- PARSE_ARGUMENTS(
+ CMAKE_PARSE_ARGUMENTS(
#prefix
PARSE
- #lists
- "CURRENT_PACKAGE_OUT_OF_DATE_OUT"
#options
"SHOW_MOST_RECENT_FILES;SHOW_OVERALL_MOST_RECENT_FILES"
+ #one_value_keywords
+ ""
+ #mulit_value_keywords
+ "CURRENT_PACKAGE_OUT_OF_DATE_OUT"
${ARGN}
)
diff --git a/tribits/core/package_arch/TribitsGlobalMacros.cmake b/tribits/core/package_arch/TribitsGlobalMacros.cmake
index c292079f8..0aa6164db 100644
--- a/tribits/core/package_arch/TribitsGlobalMacros.cmake
+++ b/tribits/core/package_arch/TribitsGlobalMacros.cmake
@@ -115,6 +115,7 @@ MACRO(TRIBITS_ASSERT_AND_SETUP_PROJECT_AND_STATIC_SYSTEM_VARS)
#
PRINT_VAR(CMAKE_VERSION)
+ PRINT_VAR(CMAKE_GENERATOR)
ENDMACRO()
@@ -235,13 +236,7 @@ MACRO(TRIBITS_DEFINE_GLOBAL_OPTIONS_AND_DEFINE_EXTRA_REPOS)
"Enable the C++11 compiler options and related code (see ${PROJECT_NAME}_CXX11_FLAGS)"
${${PROJECT_NAME}_ENABLE_CXX11_DEFAULT} )
- IF(WIN32 AND NOT CYGWIN)
- IF ("${${PROJECT_NAME}_ENABLE_Fortran}" STREQUAL "")
- MESSAGE(STATUS "Warning: Setting ${PROJECT_NAME}_ENABLE_Fortran=OFF by default"
- " because this is Windows (not cygwin) and we assume to not have Fortran!")
- ENDIF()
- SET(${PROJECT_NAME}_ENABLE_Fortran_DEFAULT OFF)
- ELSE()
+ IF ("${${PROJECT_NAME}_ENABLE_Fortran_DEFAULT}" STREQUAL "")
SET(${PROJECT_NAME}_ENABLE_Fortran_DEFAULT ON)
ENDIF()
@@ -286,6 +281,23 @@ MACRO(TRIBITS_DEFINE_GLOBAL_OPTIONS_AND_DEFINE_EXTRA_REPOS)
OPTION(${PROJECT_NAME}_ENABLE_OpenMP
"Build with OpenMP support." OFF)
+ IF (NOT CMAKE_VERSION VERSION_LESS "3.7.0")
+ IF (
+ CMAKE_GENERATOR STREQUAL "Ninja"
+ AND
+ "${${PROJECT_NAME}_WRITE_NINJA_MAKEFILES_DEFAULT}" STREQUAL ""
+ )
+ SET(${PROJECT_NAME}_WRITE_NINJA_MAKEFILES_DEFAULT ON)
+ ELSE()
+ SET(${PROJECT_NAME}_WRITE_NINJA_MAKEFILES_DEFAULT OFF)
+ ENDIF()
+ SET(${PROJECT_NAME}_WRITE_NINJA_MAKEFILES
+ ${${PROJECT_NAME}_WRITE_NINJA_MAKEFILES_DEFAULT} CACHE BOOL
+ "Generate dummy makefiles to call ninja in every bulid subdirectory (requires CMake 3.7.0 or newer)." )
+ ELSE()
+ SET(${PROJECT_NAME}_WRITE_NINJA_MAKEFILES OFF)
+ ENDIF()
+
IF (CMAKE_BUILD_TYPE STREQUAL "DEBUG")
SET(${PROJECT_NAME}_ENABLE_DEBUG_DEFAULT ON)
ELSE()
@@ -498,6 +510,18 @@ MACRO(TRIBITS_DEFINE_GLOBAL_OPTIONS_AND_DEFINE_EXTRA_REPOS)
ADVANCED_SET(${PROJECT_NAME}_GENERATE_REPO_VERSION_FILE OFF CACHE BOOL
"Generate a RepoVersion.txt file.")
+ IF ("${DART_TESTING_TIMEOUT_DEFAULT}" STREQUAL "")
+ SET(DART_TESTING_TIMEOUT_DEFAULT 1500)
+ ENDIF()
+ ADVANCED_SET(
+ DART_TESTING_TIMEOUT ${DART_TESTING_TIMEOUT_DEFAULT}
+ CACHE STRING
+ "Raw CMake/CTest global default test timeout (default 1500). (NOTE: Does not impact timeouts of tests that have the TIMEOUT property set on a test-by-test basis.)"
+ )
+ # NOTE: 1500 is the CMake default set in Modules/CTest.cmake. We need to
+ # set the default here because we need to be able to scale it correctly in
+ # case the user does not explicilty set this var in the cache.
+
ADVANCED_SET(${PROJECT_NAME}_SCALE_TEST_TIMEOUT 1.0 CACHE STRING
"Scale factor for global DART_TESTING_TIMEOUT and individual test TIMEOUT (default 1.0)."
)
@@ -755,7 +779,7 @@ MACRO(TRIBITS_SETUP_INSTALLATION_PATHS)
ENDIF()
#
- # C) Set the cache varibles for the install dirs
+ # C) Set the cache variables for the install dirs
#
ADVANCED_SET( ${PROJECT_NAME}_INSTALL_INCLUDE_DIR
@@ -1491,26 +1515,38 @@ ENDFUNCTION()
#
-# Function that prints the current set of enabled/disabled packages
+# Function that prints the current set of enabled/disabled packages given
+# input list of packages.
#
-FUNCTION(TRIBITS_PRINT_ENABLED_PACKAGE_LIST DOCSTRING ENABLED_FLAG INCLUDE_EMPTY)
+FUNCTION(TRIBITS_PRINT_ENABLED_PACKAGES_LIST_FROM_VAR PACKAGES_LIST_VAR
+ DOCSTRING ENABLED_FLAG INCLUDE_EMPTY
+ )
IF (ENABLED_FLAG AND NOT INCLUDE_EMPTY)
- TRIBITS_GET_ENABLED_LIST(${PROJECT_NAME}_PACKAGES ${PROJECT_NAME}
+ TRIBITS_GET_ENABLED_LIST(${PACKAGES_LIST_VAR} ${PROJECT_NAME}
ENABLED_PACKAGES NUM_ENABLED)
ELSEIF (ENABLED_FLAG AND INCLUDE_EMPTY)
- TRIBITS_GET_NONDISABLED_LIST(${PROJECT_NAME}_PACKAGES ${PROJECT_NAME}
+ TRIBITS_GET_NONDISABLED_LIST(${PACKAGES_LIST_VAR} ${PROJECT_NAME}
ENABLED_PACKAGES NUM_ENABLED)
ELSEIF (NOT ENABLED_FLAG AND NOT INCLUDE_EMPTY)
- TRIBITS_GET_DISABLED_LIST(${PROJECT_NAME}_PACKAGES ${PROJECT_NAME}
+ TRIBITS_GET_DISABLED_LIST(${PACKAGES_LIST_VAR} ${PROJECT_NAME}
ENABLED_PACKAGES NUM_ENABLED)
ELSE() # NOT ENABLED_FLAG AND INCLUDE_EMPTY
- TRIBITS_GET_NONENABLED_LIST(${PROJECT_NAME}_PACKAGES ${PROJECT_NAME}
+ TRIBITS_GET_NONENABLED_LIST(${PACKAGES_LIST_VAR} ${PROJECT_NAME}
ENABLED_PACKAGES NUM_ENABLED)
ENDIF()
TRIBITS_PRINT_PREFIX_STRING_AND_LIST("${DOCSTRING}" "${ENABLED_PACKAGES}")
ENDFUNCTION()
+#
+# Function that prints the current set of enabled/disabled packages
+#
+FUNCTION(TRIBITS_PRINT_ENABLED_PACKAGE_LIST DOCSTRING ENABLED_FLAG INCLUDE_EMPTY)
+ TRIBITS_PRINT_ENABLED_PACKAGES_LIST_FROM_VAR( ${PROJECT_NAME}_PACKAGES
+ "${DOCSTRING}" ${ENABLED_FLAG} ${INCLUDE_EMPTY} )
+ENDFUNCTION()
+
+
#
# Function that prints the current set of enabled/disabled SE packages
#
@@ -1705,7 +1741,12 @@ MACRO(TRIBITS_SETUP_ENV)
# Set up MPI if MPI is being used
- ASSERT_DEFINED(TPL_ENABLE_MPI)
+ IF ("${TPL_ENABLE_MPI}" STREQUAL "")
+ # If TPL_ENABLE_MPI is undefined or empty because this project does not
+ # define an MPI TPL, then explicitly disable it.
+ SET(TPL_ENABLE_MPI FALSE)
+ ENDIF()
+
IF (TPL_ENABLE_MPI)
TRIBITS_SETUP_MPI()
ENDIF()
@@ -1929,6 +1970,21 @@ MACRO(TRIBITS_SETUP_ENV)
ENDMACRO()
+#
+# Set mapping of labels to subprojects (i.e. TriBITS packages) for local CTest
+# only.
+#
+# NOTE: This macro is only used define mapping of labels to subprojects for
+# running ctest locally. This results in summarizing the tests run for each
+# subproject (TriBITS package) if any tests were run. Therefore, it is
+# harmless to define the mapping for every TriBITS package. Only TriBITS
+# packages will be listed in the summary if they had one or more tests run.
+#
+
+MACRO(TRIBITS_SET_LABELS_TO_SUBPROJECTS_MAPPING)
+ SET(CTEST_LABELS_FOR_SUBPROJECTS ${${PROJECT_NAME}_PACKAGES})
+ENDMACRO()
+
#
# Macro to turn on CTest support
@@ -1948,6 +2004,11 @@ MACRO(TRIBITS_INCLUDE_CTEST_SUPPORT)
SET(DART_TESTING_TIMEOUT ${DART_TESTING_TIMEOUT} CACHE STRING "" FORCE)
ENDIF()
+ # Set up CTEst/CDash subprojects
+ TRIBITS_SET_LABELS_TO_SUBPROJECTS_MAPPING()
+ # NOTE: We do this after all of the packages have been defined but before
+ # the DartConfiguration.tcl file has been created.
+
INCLUDE(CTest) # Generates file DartConfiguration.tcl with 'TimeOut' set!
IF (DART_TESTING_TIMEOUT_IN)
@@ -2109,7 +2170,6 @@ FUNCTION(TRIBITS_REPOSITORY_CONFIGURE_ALL_VERSION_HEADER_FILES)
TRIBITS_REPOSITORY_CONFIGURE_VERSION_HEADER_FILE( ${REPO_NAME} ${REPO_DIR} TRUE
"${${PROJECT_NAME}_BINARY_DIR}/${REPO_DIR}/${REPO_NAME}_version.h")
ENDFOREACH()
-
ENDFUNCTION()
@@ -2261,8 +2321,9 @@ MACRO(TRIBITS_CONFIGURE_ENABLED_PACKAGES)
ENDFOREACH()
+
#
- # C part 2) Loop backwards over ETI packages if ETI is enabled
+ # D) Loop backwards over ETI packages if ETI is enabled
#
IF (NOT ${PROJECT_NAME}_TRACE_DEPENDENCY_HANDLING_ONLY)
@@ -2307,7 +2368,7 @@ MACRO(TRIBITS_CONFIGURE_ENABLED_PACKAGES)
ENDIF()
#
- # D) Check if no packages are enabled and if that is allowed
+ # E) Check if no packages are enabled and if that is allowed
#
ADVANCED_SET( ${PROJECT_NAME}_ALLOW_NO_PACKAGES ON
@@ -2333,7 +2394,7 @@ MACRO(TRIBITS_CONFIGURE_ENABLED_PACKAGES)
ENDIF()
#
- # E) Process the global variables and other cleanup
+ # F) Process the global variables and other cleanup
#
IF (NOT ${PROJECT_NAME}_TRACE_DEPENDENCY_HANDLING_ONLY)
@@ -2581,7 +2642,7 @@ ENDMACRO()
# CMake/CPack as a regex that is prefixed by the project's and package's
# source directory names so as to not exclude files and directories of the
# same name and path from other packages. If ```` is an absolute path
-# it it not prefixed but is appended to ``CPACK_SOURCE_IGNORE_FILES``
+# it is not prefixed but is appended to ``CPACK_SOURCE_IGNORE_FILES``
# unmodified.
#
# In general, do **NOT** put in excludes for files and directories that are
diff --git a/tribits/core/package_arch/TribitsIncludeDirectories.cmake b/tribits/core/package_arch/TribitsIncludeDirectories.cmake
index 10589effa..8cf77ea6a 100644
--- a/tribits/core/package_arch/TribitsIncludeDirectories.cmake
+++ b/tribits/core/package_arch/TribitsIncludeDirectories.cmake
@@ -37,7 +37,7 @@
# ************************************************************************
# @HEADER
-INCLUDE(ParseVariableArguments)
+INCLUDE(CMakeParseArguments)
#
@@ -68,33 +68,47 @@ INCLUDE(ParseVariableArguments)
# passed in to ensure the include paths are added for installation testing.
#
MACRO(TRIBITS_INCLUDE_DIRECTORIES)
- PARSE_ARGUMENTS(
- PARSE #prefix
- "" # Lists
- "REQUIRED_DURING_INSTALLATION_TESTING" #Options
+
+ CMAKE_PARSE_ARGUMENTS(
+ #prefix
+ PARSE
+ #options
+ "REQUIRED_DURING_INSTALLATION_TESTING"
+ #one_value_keywords
+ ""
+ #mulit_value_keywords
+ ""
${ARGN}
)
+
+
IF(NOT ${PROJECT_NAME}_ENABLE_INSTALLATION_TESTING OR PARSE_REQUIRED_DURING_INSTALLATION_TESTING)
- _INCLUDE_DIRECTORIES(${PARSE_DEFAULT_ARGS})
+ _INCLUDE_DIRECTORIES(${PARSE_UNPARSED_ARGUMENTS})
ENDIF()
ENDMACRO()
-# Depreciated. Use TRIBITS_INCLUDE_DIRECTORIES() instead!
+# Deprecated. Use TRIBITS_INCLUDE_DIRECTORIES() instead!
MACRO(INCLUDE_DIRECTORIES)
- PARSE_ARGUMENTS(
- PARSE #prefix
- "" # Lists
- "REQUIRED_DURING_INSTALLATION_TESTING" #Options
+
+ CMAKE_PARSE_ARGUMENTS(
+ #prefix
+ PARSE
+ #options
+ "REQUIRED_DURING_INSTALLATION_TESTING"
+ #one_value_keywords
+ ""
+ #mulit_value_keywords
+ ""
${ARGN}
)
+
# IF (PARSE_REQUIRED_DURING_INSTALLATION_TESTING)
# MESSAGE(WARNING "Warning: the override INCLUDE_DIRECTORIES() is deprecated,"
# " use TRIBITS_INCLUDE_DIRECTORIES() instead!")
# ENDIF()
- IF(NOT ${PROJECT_NAME}_ENABLE_INSTALLATION_TESTING
- OR PARSE_REQUIRED_DURING_INSTALLATION_TESTING
- )
- _INCLUDE_DIRECTORIES(${PARSE_DEFAULT_ARGS})
+
+ IF(NOT ${PROJECT_NAME}_ENABLE_INSTALLATION_TESTING OR PARSE_REQUIRED_DURING_INSTALLATION_TESTING)
+ _INCLUDE_DIRECTORIES(${PARSE_UNPARSED_ARGUMENTS})
ENDIF()
ENDMACRO()
diff --git a/tribits/core/package_arch/TribitsInstallHeaders.cmake b/tribits/core/package_arch/TribitsInstallHeaders.cmake
index b8a7b05ba..30bb77b22 100644
--- a/tribits/core/package_arch/TribitsInstallHeaders.cmake
+++ b/tribits/core/package_arch/TribitsInstallHeaders.cmake
@@ -38,7 +38,7 @@
# @HEADER
-INCLUDE(ParseVariableArguments)
+INCLUDE(CMakeParseArguments)
#
@@ -90,11 +90,16 @@ FUNCTION(TRIBITS_INSTALL_HEADERS)
MESSAGE("\nTRIBITS_INSTALL_HEADERS: ${ARGN}")
ENDIF()
- PARSE_ARGUMENTS(
- PARSE #prefix
- "HEADERS;INSTALL_SUBDIR;COMPONENT" # Lists
- "" #Options
- ${ARGN} # Remaining arguments passed in
+ CMAKE_PARSE_ARGUMENTS(
+ #prefix
+ PARSE
+ #Options
+ ""
+ #one_value_keywords
+ ""
+ #multi_value_keywords
+ "HEADERS;INSTALL_SUBDIR;COMPONENT"
+ ${ARGN}
)
# ToDo: Assert PARSE_HEADERS has at least one argument!
diff --git a/tribits/core/package_arch/TribitsLibraryMacros.cmake b/tribits/core/package_arch/TribitsLibraryMacros.cmake
index 61d8d0f73..f07027de7 100644
--- a/tribits/core/package_arch/TribitsLibraryMacros.cmake
+++ b/tribits/core/package_arch/TribitsLibraryMacros.cmake
@@ -38,7 +38,7 @@
# @HEADER
INCLUDE(TribitsCreateClientTemplateHeaders)
-INCLUDE(ParseVariableArguments)
+INCLUDE(CMakeParseArguments)
INCLUDE(GlobalSet)
INCLUDE(AppendSet)
INCLUDE(AppendGlob)
@@ -234,7 +234,7 @@ ENDFUNCTION()
#
# ````
#
-# Required base name of the library. The name of the actual libray name
+# Required base name of the library. The name of the actual library name
# will be prefixed by ``${${PROJECT_NAME}_LIBRARY_NAME_PREFIX}`` to
# produce::
#
@@ -355,7 +355,7 @@ ENDFUNCTION()
# If specified, then on output the variable ```` will be
# set with the name of the library passed to ``ADD_LIBRARY()``. Having
# this name allows the calling ``CMakeLists.txt`` file access and set
-# additional target propeties (see `Additional Library and Source File
+# additional target properties (see `Additional Library and Source File
# Properties (TRIBITS_ADD_LIBRARY())`_).
#
# .. _Include Directories (TRIBITS_ADD_LIBRARY()):
@@ -364,10 +364,49 @@ ENDFUNCTION()
#
# Any base directories for the header files listed in the arguments
# ``HEADERS`` or ``NOINSTALLHEADERS`` should be passed into the standard CMake
-# command ``INCLUDE_DIRECTORIES()`` *before* calling this function. These
-# include directories will then be added to current packages list of include
-# directories ``${PACKAGE_NAME}_INCLUDE_DIRS`` which is then exported to
-# downstream SE packages..
+# command ``INCLUDE_DIRECTORIES()`` **before** calling this function. For
+# example, a CMakeLists.txt file will look like::
+#
+# ...
+#
+# TRIBITS_CONFIGURE_FILE(${PACKAGE_NAME}_config.h)
+# CONFIGURE_FILE(...)
+#
+# ...
+#
+# INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
+# INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
+#
+# ...
+#
+# TRIBITS_ADD_LIBRARY(
+# SOURCES
+# .c
+# /.cpp
+# /.F90
+# ...
+# HEADERS
+# .h
+# /.hpp
+# ...
+# NONINSTALLHEADERS .hpp .hpp ...
+# ...
+# )
+#
+# The include of ``${CMAKE_CURRENT_BINARY_DIR}`` is needed for any generated
+# header files (e.g. using raw ``CONFIGURE_FILE()`` or
+# `TRIBITS_CONFIGURE_FILE()`_) or any generated Fortran ``*.mod`` module files
+# generated as a byproduct of compiling F90+ source files (that contain one or
+# more Fortran module declarations).
+#
+# The function ``TRIBITS_ADD_LIBRARY()`` will grab the list of all of the
+# include directories in scope from prior calls to ``INCLUDE_DIRECTORIES()``
+# and will append these to the variable ``${PACKAGE_NAME}_INCLUDE_DIRS``.
+# This list of include directories is exported to downstream SE packages so
+# they appear on the compile lines of all downstream object file compiles.
+# This is a critical part of the "glue" that allows TriBITS packages to link
+# up automatically (just by clearing dependencies in
+# `/cmake/Dependencies.cmake`_ files).
#
# .. _Install Targets (TRIBITS_ADD_LIBRARY()):
#
@@ -448,11 +487,16 @@ FUNCTION(TRIBITS_ADD_LIBRARY LIBRARY_NAME_IN)
PRINT_VAR(${PACKAGE_NAME}_LIBRARIES)
ENDIF()
- PARSE_ARGUMENTS(
- PARSE #prefix
- "HEADERS;HEADERS_INSTALL_SUBDIR;NOINSTALLHEADERS;SOURCES;DEPLIBS;IMPORTEDLIBS;DEFINES;ADDED_LIB_TARGET_NAME_OUT" # Lists
- "STATIC;SHARED;TESTONLY;NO_INSTALL_LIB_OR_HEADERS;CUDALIBRARY" #Options
- ${ARGN} # Remaining arguments passed in
+ CMAKE_PARSE_ARGUMENTS(
+ #prefix
+ PARSE
+ #Options
+ "STATIC;SHARED;TESTONLY;NO_INSTALL_LIB_OR_HEADERS;CUDALIBRARY"
+ #one_value_keywords
+ ""
+ #mulit_value_keywords
+ "HEADERS;HEADERS_INSTALL_SUBDIR;NOINSTALLHEADERS;SOURCES;DEPLIBS;IMPORTEDLIBS;DEFINES;ADDED_LIB_TARGET_NAME_OUT"
+ ${ARGN}
)
# ToDo: Assert that HEADERS_INSTALL_SUBDIR has 0 or 1 entries!
diff --git a/tribits/core/package_arch/TribitsPackageMacros.cmake b/tribits/core/package_arch/TribitsPackageMacros.cmake
index a03f204b6..6da27399e 100644
--- a/tribits/core/package_arch/TribitsPackageMacros.cmake
+++ b/tribits/core/package_arch/TribitsPackageMacros.cmake
@@ -41,7 +41,7 @@ INCLUDE(TribitsPackageSetupCompilerFlags)
INCLUDE(TribitsWriteClientExportFiles)
INCLUDE(TribitsGeneralMacros)
-INCLUDE(ParseVariableArguments)
+INCLUDE(CMakeParseArguments)
INCLUDE(GlobalNullSet)
INCLUDE(AppendGlobalSet)
INCLUDE(PrintVar)
@@ -192,13 +192,15 @@ MACRO(TRIBITS_PACKAGE_DECL PACKAGE_NAME_IN)
# A) Parse the input arguments
#
- PARSE_ARGUMENTS(
+ CMAKE_PARSE_ARGUMENTS(
#prefix
PARSE
- #lists
- ""
#options
"CLEANED;ENABLE_SHADOWING_WARNINGS;DISABLE_STRONG_WARNINGS;DISABLE_CIRCULAR_REF_DETECTION_FAILURE"
+ #one_value_keywords
+ ""
+ #multi_value_keywords
+ ""
${ARGN}
)
@@ -239,6 +241,11 @@ MACRO(TRIBITS_PACKAGE_DECL PACKAGE_NAME_IN)
# Set up parent package linkage varaibles
TRIBITS_DEFINE_TARGET_VARS(${PACKAGE_NAME})
+ IF (${PROJECT_NAME}_CTEST_USE_NEW_AAO_FEATURES)
+ # Define this as a CMake/CTest "Subproject"
+ SET_DIRECTORY_PROPERTIES(PROPERTIES LABELS "${PACKAGE_NAME}")
+ ENDIF()
+
#
# Append the local package's cmake directory in order to help pull in
# configure-time testing macros
diff --git a/tribits/core/package_arch/TribitsProcessEnabledTpl.cmake b/tribits/core/package_arch/TribitsProcessEnabledTpl.cmake
index 1f6f7aff5..0bce0a671 100644
--- a/tribits/core/package_arch/TribitsProcessEnabledTpl.cmake
+++ b/tribits/core/package_arch/TribitsProcessEnabledTpl.cmake
@@ -49,7 +49,7 @@ INCLUDE(AppendStringVar)
#
# @FUNCTION: TRIBITS_PROCESS_ENABLED_TPL()
#
-# Processs an enabled TPL's FindTPL${TPL_NAME}.cmake module.
+# Process an enabled TPL's FindTPL${TPL_NAME}.cmake module.
#
FUNCTION(TRIBITS_PROCESS_ENABLED_TPL TPL_NAME)
diff --git a/tribits/core/package_arch/TribitsProcessExtraRepositoriesList.cmake b/tribits/core/package_arch/TribitsProcessExtraRepositoriesList.cmake
index 14d4c5c53..10ff67808 100644
--- a/tribits/core/package_arch/TribitsProcessExtraRepositoriesList.cmake
+++ b/tribits/core/package_arch/TribitsProcessExtraRepositoriesList.cmake
@@ -103,7 +103,7 @@ INCLUDE(TribitsSortListAccordingToMasterList)
# in this repo come before the project's native packages. If the keyword
# ``POST`` is provided then the packages are listed after the project's
# native packages. The default is assumed to be ``POST`` if neither of
-# these keywords are provided. The keywords must be separated by a comm
+# these keywords are provided. The keywords must be separated by a comma
# with no spaces such as with "``PRE,HASPACKAGES``",
# "``HASPACKAGES,POST``", "``POST,NOPACKAGES``", etc. If no keywords are
# provided, then the empty string "" must be used (which defaults to
diff --git a/tribits/core/package_arch/TribitsProcessPackagesAndDirsLists.cmake b/tribits/core/package_arch/TribitsProcessPackagesAndDirsLists.cmake
index 2aa90c42e..77fb68fef 100644
--- a/tribits/core/package_arch/TribitsProcessPackagesAndDirsLists.cmake
+++ b/tribits/core/package_arch/TribitsProcessPackagesAndDirsLists.cmake
@@ -77,7 +77,7 @@ INCLUDE(TribitsListHelpers)
# TriBITS repo that might be combined into a single TriBITS project
# meta-build (see `Globally unique TriBITS package names`_). The name
# should be a valid identifier (e.g. matches the regex
-# ``[a-zA-Z_][a-zA-Z0-9_]*``). The package names tend to used mixed case
+# ``[a-zA-Z_][a-zA-Z0-9_]*``). The package names tend to use mixed case
# (e.g. ```SomePackge`` not ``SOMEPACKGE``).
#
# 1. **DIR** (````): The relative directory for the package
diff --git a/tribits/core/package_arch/TribitsProjectImpl.cmake b/tribits/core/package_arch/TribitsProjectImpl.cmake
index a78812713..910c96476 100644
--- a/tribits/core/package_arch/TribitsProjectImpl.cmake
+++ b/tribits/core/package_arch/TribitsProjectImpl.cmake
@@ -250,7 +250,33 @@ MACRO(TRIBITS_PROJECT_IMPL)
TRIBITS_CONFIGURE_ENABLED_PACKAGES()
#
- # K) Setup for packaging and distribution
+ # K) Write dummy makefiles for Ninja
+ #
+
+ IF (CMAKE_GENERATOR STREQUAL "Ninja" AND ${PROJECT_NAME}_WRITE_NINJA_MAKEFILES)
+
+ MESSAGE("")
+ MESSAGE("Generating dummy makefiles in each directory to call Ninja ...")
+ MESSAGE("")
+
+ IF (${PROJECT_NAME}_ENABLE_CONFIGURE_TIMING)
+ TIMER_GET_RAW_SECONDS(NINJA_MAKEFILES_TIME_START_SECONDS)
+ ENDIF()
+
+ INCLUDE(GenerateNinjaMakefiles)
+ GENERATE_NINJA_MAKEFILES(${CMAKE_SOURCE_DIR})
+
+ IF (${PROJECT_NAME}_ENABLE_CONFIGURE_TIMING)
+ TIMER_GET_RAW_SECONDS(NINJA_MAKEFILES_TIME_END_SECONDS)
+ TIMER_PRINT_REL_TIME(${NINJA_MAKEFILES_TIME_START_SECONDS}
+ ${NINJA_MAKEFILES_TIME_END_SECONDS}
+ "Total time generate Ninja makefiles ${PROJECT_NAME}")
+ ENDIF()
+
+ ENDIF()
+
+ #
+ # L) Setup for packaging and distribution
#
IF (${PROJECT_NAME}_ENABLE_CPACK_PACKAGING)
@@ -271,7 +297,7 @@ MACRO(TRIBITS_PROJECT_IMPL)
ENDIF()
#
- # L) Set up for installation
+ # M) Set up for installation
#
IF (NOT ${PROJECT_NAME}_TRACE_DEPENDENCY_HANDLING_ONLY)
@@ -279,7 +305,7 @@ MACRO(TRIBITS_PROJECT_IMPL)
ENDIF()
#
- # M) Show final timing and end
+ # N) Show final timing and end
#
MESSAGE("")
diff --git a/tribits/core/package_arch/TribitsTplFindIncludeDirsAndLibraries.cmake b/tribits/core/package_arch/TribitsTplFindIncludeDirsAndLibraries.cmake
index c3785aa63..a41267c93 100644
--- a/tribits/core/package_arch/TribitsTplFindIncludeDirsAndLibraries.cmake
+++ b/tribits/core/package_arch/TribitsTplFindIncludeDirsAndLibraries.cmake
@@ -50,7 +50,7 @@ INCLUDE(DualScopeSet)
INCLUDE(GlobalNullSet)
INCLUDE(GlobalSet)
INCLUDE(MultilineSet)
-INCLUDE(ParseVariableArguments)
+INCLUDE(CMakeParseArguments)
INCLUDE(SetNotFound)
INCLUDE(Split)
@@ -151,7 +151,7 @@ ENDFUNCTION()
#
# Function that sets up cache variables for users to specify where to find a
# `TriBITS TPL`_'s headers and libraries. This function is typically called
-# inside of a ``FindTPL.cmake`` moulde file (see
+# inside of a ``FindTPL.cmake`` module file (see
# `${TPL_NAME}_FINDMOD`_).
#
# Usage::
@@ -260,13 +260,15 @@ FUNCTION(TRIBITS_TPL_FIND_INCLUDE_DIRS_AND_LIBRARIES TPL_NAME)
# Make sure the right name is used
ASSERT_DEFINED(TPL_ENABLE_${TPL_NAME})
- PARSE_ARGUMENTS(
+ CMAKE_PARSE_ARGUMENTS(
#prefix
PARSE
- #lists
- "REQUIRED_HEADERS;REQUIRED_LIBS_NAMES"
#options
"MUST_FIND_ALL_LIBS;MUST_FIND_ALL_HEADERS;NO_PRINT_ENABLE_SUCCESS_FAIL"
+ #one_value_keywords
+ ""
+ #multi_value_keywords
+ "REQUIRED_HEADERS;REQUIRED_LIBS_NAMES"
${ARGN}
)
@@ -690,7 +692,7 @@ ENDFUNCTION()
# TRIBITS_TPL_TENTATIVELY_ENABLE()
#
# This function can be called from any CMakeLists.txt file to put a TPL in
-# tentative enable mode. But typically, it is called from an SE Pakcage's
+# tentative enable mode. But typically, it is called from an SE Package's
# `/cmake/Dependencies.cmake`_ file (see `How to tentatively
# enable a TPL`_).
#
@@ -702,7 +704,7 @@ ENDFUNCTION()
# not already been set, and sets ``TPL_TENTATIVE_ENABLE_=ON`` in the
# cache.
#
-# NOTE: This function will only tentatively enable a TPL it its enable has not
+# NOTE: This function will only tentatively enable a TPL if its enable has not
# be explicitly set on input, i.e. if ``-D TPL_ENABLE_=""``. If the
# TPL has been explicitly enabled (i.e. ``-D TPL_ENABLE_=ON``) or
# disabled (i.e. ``-D TPL_ENABLE_=OFF``), then this function has no
diff --git a/tribits/core/package_arch/TribitsWriteClientExportFiles.cmake b/tribits/core/package_arch/TribitsWriteClientExportFiles.cmake
index 6429daeb1..fd1849ae6 100644
--- a/tribits/core/package_arch/TribitsWriteClientExportFiles.cmake
+++ b/tribits/core/package_arch/TribitsWriteClientExportFiles.cmake
@@ -124,7 +124,7 @@ ENDFUNCTION()
# Usage::
#
# TRIBITS_WRITE_FLEXIBLE_PACKAGE_CLIENT_EXPORT_FILES(
-# PACKAGE_NAME
+# PACKAGE_NAME
# [EXPORT_FILE_VAR_PREFIX ]
# [WRITE_CMAKE_CONFIG_FILE ]
# [WRITE_EXPORT_MAKEFILE ]
@@ -134,7 +134,7 @@ ENDFUNCTION()
#
# The arguments are:
#
-# ``PACKAGE_NAME ``
+# ``PACKAGE_NAME ``
#
# Gives the name of the TriBITS package for which the export files should
# be created.
@@ -143,7 +143,7 @@ ENDFUNCTION()
#
# If specified, then all of the variables in the generated export files
# will be prefixed with ``_`` instead of
-# ``_``.
+# ``_``.
#
# ``WRITE_CMAKE_CONFIG_FILE ``
#
@@ -195,13 +195,15 @@ FUNCTION(TRIBITS_WRITE_FLEXIBLE_PACKAGE_CLIENT_EXPORT_FILES)
# A) Process the command-line arguments
#
- PARSE_ARGUMENTS(
+ CMAKE_PARSE_ARGUMENTS(
#prefix
PARSE
- #lists
- "PACKAGE_NAME;WRITE_CMAKE_CONFIG_FILE;WRITE_EXPORT_MAKEFILE;EXPORT_FILE_VAR_PREFIX"
#options
"WRITE_INSTALL_CMAKE_CONFIG_FILE;WRITE_INSTALL_EXPORT_MAKEFILE"
+ #one_value_keywords
+ ""
+ #multi_value_keywords
+ "PACKAGE_NAME;WRITE_CMAKE_CONFIG_FILE;WRITE_EXPORT_MAKEFILE;EXPORT_FILE_VAR_PREFIX"
${ARGN}
)
@@ -658,6 +660,9 @@ ENDFUNCTION()
#
# Write the outer TriBITS project configure and/or export makefiles
#
+# If ${PROJECT_NAME}_VERSION is not set or is '' on input, then it will be set
+# to 0.0.0 in order to create the ${PROJECT_NAME}ConfigVersion.cmake file.
+#
# ToDo: Finish documentation!
#
@@ -669,8 +674,9 @@ FUNCTION(TRIBITS_WRITE_PROJECT_CLIENT_EXPORT_FILES)
# Reversing the package list so that libraries will be produced in order of
# most dependent to least dependent.
SET(PACKAGE_LIST ${${PROJECT_NAME}_SE_PACKAGES})
- LIST(REVERSE PACKAGE_LIST)
-
+ IF (PACKAGE_LIST)
+ LIST(REVERSE PACKAGE_LIST)
+ ENDIF()
# Loop over all packages to determine which were enabled. Then build a list
# of all their libraries/includes in the proper order for linking
@@ -691,8 +697,10 @@ FUNCTION(TRIBITS_WRITE_PROJECT_CLIENT_EXPORT_FILES)
# Reversing the tpl list so that the list of tpls will be produced in
# order of most dependent to least dependent.
- SET(TPL_LIST ${${PROJECT_NAME}_TPLS})
- LIST(REVERSE TPL_LIST)
+ IF (${PROJECT_NAME}_TPLS)
+ SET(TPL_LIST ${${PROJECT_NAME}_TPLS})
+ LIST(REVERSE TPL_LIST)
+ ENDIF()
# Loop over all TPLs to determine which were enabled. Then build a list
# of all their libraries/includes in the proper order for linking
@@ -908,6 +916,9 @@ include(\"\${CMAKE_CURRENT_LIST_DIR}/../${TRIBITS_PACKAGE}/${TRIBITS_PACKAGE}Con
# Configure the version file for ${PROJECT_NAME}
#
INCLUDE(CMakePackageConfigHelpers)
+ IF ("${${PROJECT_NAME}_VERSION}" STREQUAL "")
+ SET(${PROJECT_NAME}_VERSION 0.0.0)
+ ENDIF()
WRITE_BASIC_PACKAGE_VERSION_FILE(
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake
VERSION ${${PROJECT_NAME}_VERSION}
diff --git a/tribits/core/utils/AddSubdirectories.cmake b/tribits/core/utils/AddSubdirectories.cmake
index 4cc90aa40..23d2e7ff1 100644
--- a/tribits/core/utils/AddSubdirectories.cmake
+++ b/tribits/core/utils/AddSubdirectories.cmake
@@ -40,7 +40,7 @@
#
# @MACRO: ADD_SUBDIRECTORIES()
#
-# Macro that adds a list of subdirectories all at once (removes boiler-place
+# Macro that adds a list of subdirectories all at once (removes boiler-plate
# code).
#
# Usage::
diff --git a/tribits/core/utils/CMakeOverrides.cmake b/tribits/core/utils/CMakeOverrides.cmake
index c0fb734c0..8a7717400 100644
--- a/tribits/core/utils/CMakeOverrides.cmake
+++ b/tribits/core/utils/CMakeOverrides.cmake
@@ -37,7 +37,7 @@
# ************************************************************************
# @HEADER
-INCLUDE(ParseVariableArguments)
+INCLUDE(CMakeParseArguments)
#
# FUNCTION: TRIBITS_INCLUDE_DIRECTORIES()
@@ -67,10 +67,15 @@ INCLUDE(ParseVariableArguments)
# directory does need to be set for instaltion testing.
#
FUNCTION(TRIBITS_INCLUDE_DIRECTORIES)
- PARSE_ARGUMENTS(
- PARSE #prefix
- "" # Lists
- "REQUIRED_DURING_INSTALLATION_TESTING" #Options
+ CMAKE_PARSE_ARGUMENTS(
+ #prefix
+ PARSE
+ #Options
+ "REQUIRED_DURING_INSTALLATION_TESTING"
+ #one_value_keywords
+ ""
+ #multi_value_keywords
+ ""
${ARGN}
)
@@ -90,10 +95,15 @@ ENDFUNCTION()
#For that case we allow people to set "REQUIRED_DURING_INSTALLATION_TESTING" to
#tell us that this include directory does need to be set for instaltion testing.
FUNCTION(INCLUDE_DIRECTORIES)
- PARSE_ARGUMENTS(
- PARSE #prefix
- "" # Lists
- "REQUIRED_DURING_INSTALLATION_TESTING" #Options
+ CMAKE_PARSE_ARGUMENTS(
+ #prefix
+ PARSE
+ #Options
+ "REQUIRED_DURING_INSTALLATION_TESTING"
+ #one_value_keywords
+ ""
+ #multi_value_keywords
+ ""
${ARGN}
)
diff --git a/tribits/core/utils/CombinedOption.cmake b/tribits/core/utils/CombinedOption.cmake
index dad3f38f9..ce0efe9ca 100644
--- a/tribits/core/utils/CombinedOption.cmake
+++ b/tribits/core/utils/CombinedOption.cmake
@@ -37,7 +37,7 @@
# ************************************************************************
# @HEADER
-INCLUDE(ParseVariableArguments)
+INCLUDE(CMakeParseArguments)
INCLUDE(MultilineSet)
INCLUDE(ConcatStrings)
@@ -52,7 +52,7 @@ INCLUDE(ConcatStrings)
#
# COMBINED_OPTION(
# DEP_OPTIONS_NAMES ...
-# DOCSTR "" "" "" ...
# )
#
# This sets up a ``BOOL`` cache variable ```` which is
@@ -68,20 +68,22 @@ INCLUDE(ConcatStrings)
#
FUNCTION(COMBINED_OPTION COMBINED_OPTION_NAME)
- PARSE_ARGUMENTS(
+ CMAKE_PARSE_ARGUMENTS(
#prefix
PARSE
- #lists
- "DEP_OPTIONS_NAMES;DOCSTR"
#options
""
+ #one_value_keywords
+ ""
+ #multi_value_keywords
+ "DEP_OPTIONS_NAMES;DOCSTR"
${ARGN}
)
# ToDo: Assert that the right input was passed in!
SET(DEFAULT_VAL ON)
- FOREACH( DEP_OPTION_NAME ${PARSE_DEP_OPTIONS_NAMES})
+ FOREACH( DEP_OPTION_NAME ${PARSE_DEP_OPTIONS_NAMES} )
IF (NOT ${DEP_OPTION_NAME})
SET(DEFAULT_VAL OFF)
ENDIF()
@@ -126,7 +128,7 @@ FUNCTION(COMBINED_OPTION COMBINED_OPTION_NAME)
MESSAGE(FATAL_ERROR
"Error: you can not enable the option ${COMBINED_OPTION_NAME} unless"
" you also enable the options ${OPTION_NAMES}. The current option"
- "values are:\n${OPTION_NAMES_AND_VALUES}" )
+ " values are:\n${OPTION_NAMES_AND_VALUES}" )
ENDIF()
diff --git a/tribits/core/utils/DriveAdvancedTest.cmake b/tribits/core/utils/DriveAdvancedTest.cmake
index 51c6c413f..2d9f4f668 100644
--- a/tribits/core/utils/DriveAdvancedTest.cmake
+++ b/tribits/core/utils/DriveAdvancedTest.cmake
@@ -58,8 +58,8 @@ FUNCTION(PRINT_UPTIME PREFIX_STR)
ENDFUNCTION()
-FUNCTION(PRINT_SINGLE_CHECK_RESULT MSG_BEGIN TEST_CASE_PASSED)
- IF (TEST_CASE_PASSED)
+FUNCTION(PRINT_SINGLE_CHECK_RESULT MSG_BEGIN TEST_CASE_PASSED_IN)
+ IF (TEST_CASE_PASSED_IN)
MESSAGE("${MSG_BEGIN} [PASSED]")
ELSE()
MESSAGE("${MSG_BEGIN} [FAILED]")
@@ -307,14 +307,24 @@ FUNCTION(DRIVE_ADVANCED_TEST)
# C) Check for return code always 0?
IF (TEST_${CMND_IDX}_ALWAYS_FAIL_ON_NONZERO_RETURN)
IF (NOT EXEC_RESULT EQUAL 0)
- SET(ALWAYS_FAIL_ON_NONZERO_RETURN_RESULT PASSED)
+ SET(ALWAYS_FAIL_ON_NONZERO_RETURN_PASSED FALSE)
SET(TEST_CASE_PASSED FALSE)
ELSE()
- SET(ALWAYS_FAIL_ON_NONZERO_RETURN_RESULT FAILED)
+ SET(ALWAYS_FAIL_ON_NONZERO_RETURN_PASSED TRUE)
ENDIF()
PRINT_SINGLE_CHECK_RESULT(
"TEST_${CMND_IDX}: Pass criteria = ALWAYS_FAIL_ON_NONZERO_RETURN"
- ${ALWAYS_FAIL_ON_NONZERO_RETURN_RESULT} )
+ ${ALWAYS_FAIL_ON_NONZERO_RETURN_PASSED} )
+ ELSEIF (TEST_${CMND_IDX}_ALWAYS_FAIL_ON_ZERO_RETURN)
+ IF (EXEC_RESULT EQUAL 0)
+ SET(ALWAYS_FAIL_ON_ZERO_RETURN_PASSED FALSE)
+ SET(TEST_CASE_PASSED FALSE)
+ ELSE()
+ SET(ALWAYS_FAIL_ON_ZERO_RETURN_PASSED TRUE)
+ ENDIF()
+ PRINT_SINGLE_CHECK_RESULT(
+ "TEST_${CMND_IDX}: Pass criteria = ALWAYS_FAIL_ON_ZERO_RETURN"
+ ${ALWAYS_FAIL_ON_ZERO_RETURN_PASSED} )
ENDIF()
# D) Invert pass/fail result?
diff --git a/tribits/core/utils/FindProgramPlus.cmake b/tribits/core/utils/FindProgramPlus.cmake
index 012a926fa..ea628ba84 100644
--- a/tribits/core/utils/FindProgramPlus.cmake
+++ b/tribits/core/utils/FindProgramPlus.cmake
@@ -37,7 +37,7 @@
# ************************************************************************
# @HEADER
-INCLUDE(ParseVariableArguments)
+INCLUDE(CMakeParseArguments)
INCLUDE(PrintNonemptyVar)
#
@@ -57,10 +57,15 @@ INCLUDE(PrintNonemptyVar)
FUNCTION(FIND_PROGRAM_PLUS PROG_VAR)
- PARSE_ARGUMENTS(
+ CMAKE_PARSE_ARGUMENTS(
+ #prefix
PARSE
- "NAMES;PATHS;DOC"
+ #options
+ ""
+ #one_value_keywords
""
+ #multi_value_keywords
+ "NAMES;PATHS;DOC"
${ARGN}
)
diff --git a/tribits/core/utils/GenerateNinjaMakefiles.cmake b/tribits/core/utils/GenerateNinjaMakefiles.cmake
new file mode 100644
index 000000000..4a9e5cedf
--- /dev/null
+++ b/tribits/core/utils/GenerateNinjaMakefiles.cmake
@@ -0,0 +1,33 @@
+set(_GenerateNinjaMakefiles_DIR ${CMAKE_CURRENT_LIST_DIR})
+function(generate_ninja_makefiles srcdir)
+ # Recurse into subdirectories.
+ get_property(dirs DIRECTORY ${srcdir} PROPERTY SUBDIRECTORIES)
+ foreach(d IN LISTS dirs)
+ generate_ninja_makefiles(${d})
+ endforeach()
+
+ # Get the targets from this directory.
+ get_property(targets DIRECTORY ${srcdir} PROPERTY BUILDSYSTEM_TARGETS)
+
+ # Accumulate a global list of all targets.
+ set_property(GLOBAL APPEND PROPERTY _GenerateNinjaMakefiles_TARGETS ${targets})
+
+ # Compute paths to/from this directory and the top.
+ get_property(bindir DIRECTORY ${srcdir} PROPERTY BINARY_DIR)
+ if("${bindir}" STREQUAL "${CMAKE_BINARY_DIR}")
+ set(topdir ".")
+ set(subdir ".")
+ # The top level provides all targets.
+ get_property(targets GLOBAL PROPERTY _GenerateNinjaMakefiles_TARGETS)
+ else()
+ file(RELATIVE_PATH subdir ${CMAKE_BINARY_DIR} ${bindir})
+ string(REGEX REPLACE "[^/]+" ".." topdir "${subdir}")
+ endif()
+
+ # Write the Makefile for this directory.
+ string(REPLACE ";" " " NINJA_MAKEFILE_TARGETS "${targets}")
+ file(TO_NATIVE_PATH "${topdir}" NINJA_MAKEFILE_TOPDIR)
+ file(TO_NATIVE_PATH "${subdir}" NINJA_MAKEFILE_SUBDIR)
+ file(TO_NATIVE_PATH "${_GenerateNinjaMakefiles_DIR}/NinjaMakefileCommon.make" NINJA_MAKEFILE_COMMON)
+ configure_file(${_GenerateNinjaMakefiles_DIR}/NinjaMakefile.in ${bindir}/Makefile)
+endfunction()
diff --git a/tribits/core/utils/MessageWrapper.cmake b/tribits/core/utils/MessageWrapper.cmake
index 9494014a9..1b48033df 100644
--- a/tribits/core/utils/MessageWrapper.cmake
+++ b/tribits/core/utils/MessageWrapper.cmake
@@ -59,7 +59,7 @@ INCLUDE(GlobalSet)
# function. However, when the variable ``MESSAGE_WRAPPER_UNIT_TEST_MODE`` is
# set to ``TRUE``, then this function will not call ``MESSAGE(...)`` but
# instead will prepend set to the global variable ``MESSAGE_WRAPPER_INPUT``
-# the input argument that would have gon to ``MESSAGE()``. To capture just
+# the input argument that would have gone to ``MESSAGE()``. To capture just
# this call's input, first call::
#
# GLOBAL_NULL_SET(MESSAGE_WRAPPER_INPUT)
diff --git a/tribits/core/utils/NinjaMakefile.in b/tribits/core/utils/NinjaMakefile.in
new file mode 100644
index 000000000..d166d7f80
--- /dev/null
+++ b/tribits/core/utils/NinjaMakefile.in
@@ -0,0 +1,4 @@
+TOPDIR := @NINJA_MAKEFILE_TOPDIR@
+SUBDIR := @NINJA_MAKEFILE_SUBDIR@
+TARGETS := @NINJA_MAKEFILE_TARGETS@
+include @NINJA_MAKEFILE_COMMON@
diff --git a/tribits/core/utils/NinjaMakefileCommon.make b/tribits/core/utils/NinjaMakefileCommon.make
new file mode 100644
index 000000000..56d3a4f55
--- /dev/null
+++ b/tribits/core/utils/NinjaMakefileCommon.make
@@ -0,0 +1,42 @@
+default_target: all
+.NOTPARALLEL:
+
+NINJA := ninja
+
+NINJA_FLAGS :=
+ifdef VERBOSE
+NINJA_FLAGS += -v
+endif
+ifdef NP
+NINJA_FLAGS += -j $(NP)
+endif
+
+STANDARD_TARGETS := install test package package_source edit_cache rebuild_cache
+
+BUILD_OBJ := "^build $(SUBDIR)/CMakeFiles/\([^:]*\.o\):.*"
+OBJECTS := $(shell sed -n "\|"$(BUILD_OBJ)"| {s|"$(BUILD_OBJ)"|CMakeFiles/\1|;p}" $(TOPDIR)/build.ninja)
+
+all $(STANDARD_TARGETS):
+ $(NINJA) -C $(TOPDIR) $(NINJA_FLAGS) $(SUBDIR)/$@
+$(TARGETS):
+ $(NINJA) -C $(TOPDIR) $(NINJA_FLAGS) $@
+$(OBJECTS):
+ $(NINJA) -C $(TOPDIR) $(NINJA_FLAGS) $(SUBDIR)/$@
+clean:
+ $(NINJA) -C $(TOPDIR) $(NINJA_FLAGS) -t clean $(SUBDIR)/all
+help:
+ @echo "This Makefile supports the following standard targets:"
+ @echo ""
+ @for t in "all (default)" clean help $(STANDARD_TARGETS); do echo " $$t"; done
+ @echo ""
+ @echo "and the following project targets:"
+ @echo ""
+ @for t in $(sort $(TARGETS)); do echo " $$t"; done
+ @echo ""
+ @echo "Run 'make help-objects' to list object files."
+help-objects:
+ @echo "This Makefile supports the following object files:"
+ @echo ""
+ @for t in $(sort $(OBJECTS)); do echo " $$t"; done
+
+.PHONY: all clean help help-objects $(STANDARD_TARGETS) $(TARGETS) $(OBJECTS)
diff --git a/tribits/core/utils/ParseVariableArguments.cmake b/tribits/core/utils/ParseVariableArguments.cmake
index 42eea539e..07bc84f61 100644
--- a/tribits/core/utils/ParseVariableArguments.cmake
+++ b/tribits/core/utils/ParseVariableArguments.cmake
@@ -37,6 +37,17 @@
# ************************************************************************
# @HEADER
+# Set up to use CMAKE_PARSE_ARGUMENTS() function!
+INCLUDE(CMakeParseArguments)
+# NOTE: For CMake versions 3.5.0 and above, this module is empty so the
+# natively implemented function CMAKE_PARSE_ARGUMENTS() will get used!
+
+MACRO(PARSE_ARGUMENTS_DEPRECATED_WARNING)
+ MESSAGE(WARNING "PARSE_ARGUMENTS() is deprecated and should not be used."
+ " Instead use CMAKE_PARSE_ARGUMENTS()")
+ENDMACRO()
+
+PARSE_ARGUMENTS_DEPRECATED_WARNING()
# Set PARSE_ARGUMENTS_DUMP_OUTPUT_ENABLED to TRUE to see output from parsing.
@@ -190,7 +201,9 @@ ENDFUNCTION()
# names and input argument list names.
#
MACRO(PARSE_ARGUMENTS prefix arg_names option_names)
-
+
+ PARSE_ARGUMENTS_DEPRECATED_WARNING()
+
PARSE_ARGUMENTS_DUMP_OUTPUT("PARSE_ARGUMENTS: prefix='${prefix}'")
PARSE_ARGUMENTS_DUMP_OUTPUT("PARSE_ARGUMENTS: arg_names='${arg_names}'")
PARSE_ARGUMENTS_DUMP_OUTPUT("PARSE_ARGUMENTS: option_names='${option_names}'")
@@ -236,11 +249,11 @@ ENDMACRO()
# NOTE: If the above function turns out to be a performance bottle neck, there
# are a few things that could be done to improve performance. One thing you
# could do is repalce the O(len(arg_names)) and O(len(option_names)) lookups
-# with O(1) lookups by creating CMake varibles of the name
+# with O(1) lookups by creating CMake variables of the name
# ${OUTER_FUNC_NAME}_arg_ and then just look of that varible exists
# or not. That should use a hash function. That might actually slow things
# down for short lists however so we would have to measure, measure,
-# measure. I we would have to pass in the function/macro name to disabiguate
+# measure. I would have to pass in the function/macro name to disabiguate
# the varible names. It would really be better if cmake would provide a
# sorted list find operation. That would make this much faster for large
# numbers of argument and option names.
diff --git a/tribits/core/utils/PrependSet.cmake b/tribits/core/utils/PrependSet.cmake
index 979abe36e..ebfe9ecd9 100644
--- a/tribits/core/utils/PrependSet.cmake
+++ b/tribits/core/utils/PrependSet.cmake
@@ -40,7 +40,7 @@
#
# @MACRO: PREPEND_SET()
#
-# Utility macro to prepend elements to a varible (reduces boiler-plate code).
+# Utility macro to prepend elements to a variable (reduces boiler-plate code).
#
# Usage::
#
diff --git a/tribits/core/utils/PrintNonemptyVar.cmake b/tribits/core/utils/PrintNonemptyVar.cmake
index 5cc084514..226a4d0dd 100644
--- a/tribits/core/utils/PrintNonemptyVar.cmake
+++ b/tribits/core/utils/PrintNonemptyVar.cmake
@@ -52,9 +52,9 @@ INCLUDE(PrintVar)
#
# Calls ``PRINT_VAR()`` if ``${}`` is not empty.
#
-FUNCTION(PRINT_NONEMPTY_VAR VARIBLE_NAME)
- ASSERT_DEFINED(VARIBLE_NAME)
- IF (NOT "${${VARIBLE_NAME}}" STREQUAL "")
- PRINT_VAR(${VARIBLE_NAME})
+FUNCTION(PRINT_NONEMPTY_VAR VARIABLE_NAME)
+ ASSERT_DEFINED(VARIABLE_NAME)
+ IF (NOT "${${VARIABLE_NAME}}" STREQUAL "")
+ PRINT_VAR(${VARIABLE_NAME})
ENDIF()
ENDFUNCTION()
diff --git a/tribits/core/utils/UnitTestHelpers.cmake b/tribits/core/utils/UnitTestHelpers.cmake
index 06e88a151..d563710e7 100644
--- a/tribits/core/utils/UnitTestHelpers.cmake
+++ b/tribits/core/utils/UnitTestHelpers.cmake
@@ -37,7 +37,7 @@
# ************************************************************************
# @HEADER
-INCLUDE(ParseVariableArguments)
+INCLUDE(CMakeParseArguments)
INCLUDE(GlobalSet)
@@ -104,13 +104,15 @@ ENDFUNCTION()
#
FUNCTION(UNITTEST_STRING_REGEX INPUT_STRING)
- PARSE_ARGUMENTS(
+ CMAKE_PARSE_ARGUMENTS(
#prefix
PARSE
- #lists
- "REGEX_STRINGS"
#options
""
+ #one_value_keywords
+ ""
+ #multi_value_keywords
+ "REGEX_STRINGS"
${ARGN}
)
diff --git a/tribits/ctest_driver/TribitsAddDashboardTarget.cmake b/tribits/ctest_driver/TribitsAddDashboardTarget.cmake
index d0fcb25ca..bbb1b63db 100644
--- a/tribits/ctest_driver/TribitsAddDashboardTarget.cmake
+++ b/tribits/ctest_driver/TribitsAddDashboardTarget.cmake
@@ -85,9 +85,17 @@ MACRO(TRIBITS_ADD_DASHBOARD_TARGET)
APPEND_SET(EXPR_CMND_ARGS "TRIBITS_PROJECT_ROOT=${${PROJECT_NAME}_SOURCE_DIR}")
APPEND_SET(EXPR_CMND_ARGS "${PROJECT_NAME}_TRIBITS_DIR=${${PROJECT_NAME}_TRIBITS_DIR}")
APPEND_SET(EXPR_CMND_ARGS "${PROJECT_NAME}_WARNINGS_AS_ERRORS_FLAGS='${${PROJECT_NAME}_WARNINGS_AS_ERRORS_FLAGS}'")
+ APPEND_SET(EXPR_CMND_ARGS "${PROJECT_NAME}_ENABLE_SECONDARY_TESTED_CODE='${${PROJECT_NAME}_ENABLE_SECONDARY_TESTED_CODE}'")
- # Conditionally override options used only for testing. These options have no use in a
- # a basic build/test so we don't want to interfere with options users might set on the env.
+ # Conditionally override options used only for testing. These options
+ # have no use in a a basic build/test so we don't want to interfere with
+ # options users might set on the env.
+ IF (${PROJECT_NAME}_CTEST_DO_ALL_AT_ONCE)
+ APPEND_SET(EXPR_CMND_ARGS "${PROJECT_NAME}_CTEST_DO_ALL_AT_ONCE=TRUE")
+ ENDIF()
+ IF (${PROJECT_NAME}_CTEST_USE_NEW_AAO_FEATURES)
+ APPEND_SET(EXPR_CMND_ARGS "${PROJECT_NAME}_CTEST_USE_NEW_AAO_FEATURES=TRUE")
+ ENDIF()
IF (${PROJECT_NAME}_ENABLE_COVERAGE_TESTING)
APPEND_SET(EXPR_CMND_ARGS "CTEST_DO_COVERAGE_TESTING=TRUE")
ENDIF()
@@ -97,6 +105,9 @@ MACRO(TRIBITS_ADD_DASHBOARD_TARGET)
IF (CTEST_PARALLEL_LEVEL)
APPEND_SET(EXPR_CMND_ARGS "CTEST_PARALLEL_LEVEL=${CTEST_PARALLEL_LEVEL}")
ENDIF()
+ IF (NOT "${CTEST_DO_SUBMIT}" STREQUAL "")
+ APPEND_SET(EXPR_CMND_ARGS "CTEST_DO_SUBMIT=${CTEST_DO_SUBMIT}")
+ ENDIF()
IF (CTEST_DROP_SITE)
APPEND_SET(EXPR_CMND_ARGS "CTEST_DROP_SITE=${CTEST_DROP_SITE}")
ENDIF()
@@ -126,38 +137,91 @@ MACRO(TRIBITS_ADD_DASHBOARD_TARGET)
# H.2) Add the custom target to enable all the packages with tests enabled
- ADD_CUSTOM_TARGET(dashboard
+ IF (${PROJECT_NAME}_CTEST_DO_ALL_AT_ONCE)
+
+ SET(RUNNING_EXP_DASHBOARD_MSG_HEADER
+ "Running all-at-once experimental dashboard"
+ )
+
+ SET(DASHBOARD_TARGET_PRE_CTEST_DRIVER_CMNDS)
+
+ SET(DASHBOARD_TARGET_CTEST_DRIVER_CMND_NUM)
+
+ SET(DASHBOARD_TARGET_POST_CTEST_DRIVER_CMNDS)
+
+ ELSE()
+
+ SET(RUNNING_EXP_DASHBOARD_MSG_HEADER
+ "Running package-by-package experimental dashboard"
+ )
+
+ SET(DASHBOARD_TARGET_PRE_CTEST_DRIVER_CMNDS
+ COMMAND echo
+ COMMAND echo "***"
+ COMMAND echo "*** A) Clean out the list of packages"
+ COMMAND echo "***"
+ COMMAND echo
+ COMMAND echo Running: ${CMAKE_COMMAND} -D${PROJECT_NAME}_UNENABLE_ENABLED_PACKAGES:BOOL=TRUE
+ -D${PROJECT_NAME}_ALLOW_NO_PACKAGES:BOOL=ON -D${PROJECT_NAME}_ENABLE_ALL_PACKAGES:BOOL=OFF ${PROJECT_SOURCE_DIR}
+ COMMAND echo
+ COMMAND ${CMAKE_COMMAND} -D${PROJECT_NAME}_UNENABLE_ENABLED_PACKAGES:BOOL=TRUE
+ -D${PROJECT_NAME}_ALLOW_NO_PACKAGES:BOOL=ON -D${PROJECT_NAME}_ENABLE_ALL_PACKAGES:BOOL=OFF ${PROJECT_SOURCE_DIR}
+ # NOTE: Above, if ${PROJECT_NAME}_ENABLE_ALL_PACKAGES was set in CMakeCache.txt, then setting
+ # -D${PROJECT_NAME}_ENABLE_ALL_PACKAGES:BOOL=OFF will turn it off in the cache. Note that it will
+ # never be turned on again which means that the list of packages will be set explicitly below.
+ )
+
+ SET(DASHBOARD_TARGET_CTEST_DRIVER_CMND_NUM "B) ")
+
+ SET(DASHBOARD_TARGET_POST_CTEST_DRIVER_CMNDS
+ COMMAND echo
+ COMMAND echo "***"
+ COMMAND echo "*** C) Clean out the list of packages again to clean the cache file"
+ COMMAND echo "***"
+ COMMAND echo
+ COMMAND echo Running: ${CMAKE_COMMAND} -D${PROJECT_NAME}_UNENABLE_ENABLED_PACKAGES:BOOL=TRUE
+ -D${PROJECT_NAME}_ALLOW_NO_PACKAGES:BOOL=ON -D${PROJECT_NAME}_ENABLE_ALL_PACKAGES:BOOL=OFF ${PROJECT_SOURCE_DIR}
+ COMMAND echo
+ COMMAND ${CMAKE_COMMAND} -D${PROJECT_NAME}_UNENABLE_ENABLED_PACKAGES:BOOL=TRUE
+ -D${PROJECT_NAME}_ALLOW_NO_PACKAGES:BOOL=ON -D${PROJECT_NAME}_ENABLE_ALL_PACKAGES:BOOL=OFF ${PROJECT_SOURCE_DIR}
+
+ COMMAND echo
+ COMMAND echo "***"
+ COMMAND echo "*** D) Reconfigure with the original package list"
+ COMMAND echo "***"
+ COMMAND echo
+ COMMAND echo Running: ${CMAKE_COMMAND} ${${PROJECT_NAME}_ENABLED_PACKAGES_CMAKE_ARG_LIST}
+ -D${PROJECT_NAME}_ALLOW_NO_PACKAGES:BOOL=ON ${PROJECT_SOURCE_DIR}
+ COMMAND echo
+ COMMAND ${CMAKE_COMMAND} ${${PROJECT_NAME}_ENABLED_PACKAGES_CMAKE_ARG_LIST}
+ -D${PROJECT_NAME}_ALLOW_NO_PACKAGES:BOOL=ON ${PROJECT_SOURCE_DIR}
+
+ COMMAND echo
+ COMMAND echo "See the results at http://${CTEST_DROP_SITE}${CTEST_DROP_LOCATION}&display=project\#Experimental"
+ COMMAND echo
+ )
+
+ ENDIF()
+
+ ADD_CUSTOM_TARGET( dashboard
VERBATIM
# WARNING: The echoed command and the actual commands are duplicated! You have to reproduce them!
COMMAND echo
- COMMAND echo "***************************************************"
- COMMAND echo "*** Running incremental experimental dashboard ***"
- COMMAND echo "***************************************************"
+ COMMAND echo "**************************************************"
+ COMMAND echo "*** ${RUNNING_EXP_DASHBOARD_MSG_HEADER} ***"
+ COMMAND echo "**************************************************"
COMMAND echo
COMMAND echo ${PROJECT_NAME}_ENABLED_PACKAGES_LIST=${${PROJECT_NAME}_ENABLED_PACKAGES_LIST}
COMMAND echo
- COMMAND echo
- COMMAND echo "***"
- COMMAND echo "*** A) Clean out the list of packages"
- COMMAND echo "***"
- COMMAND echo
- COMMAND echo Running: ${CMAKE_COMMAND} -D${PROJECT_NAME}_UNENABLE_ENABLED_PACKAGES:BOOL=TRUE
- -D${PROJECT_NAME}_ALLOW_NO_PACKAGES:BOOL=ON -D${PROJECT_NAME}_ENABLE_ALL_PACKAGES:BOOL=OFF ${PROJECT_SOURCE_DIR}
- COMMAND echo
- COMMAND ${CMAKE_COMMAND} -D${PROJECT_NAME}_UNENABLE_ENABLED_PACKAGES:BOOL=TRUE
- -D${PROJECT_NAME}_ALLOW_NO_PACKAGES:BOOL=ON -D${PROJECT_NAME}_ENABLE_ALL_PACKAGES:BOOL=OFF ${PROJECT_SOURCE_DIR}
-
- # NOTE: Above, if ${PROJECT_NAME}_ENABLE_ALL_PACKAGES was set in CMakeCache.txt, then setting
- # -D${PROJECT_NAME}_ENABLE_ALL_PACKAGES:BOOL=OFF will turn it off in the cache. Note that it will
- # never be turned on again which means that the list of packages will be set explicitly below.
+ ${DASHBOARD_TARGET_PRE_CTEST_DRIVER_CMNDS}
COMMAND echo
COMMAND echo "***"
- COMMAND echo "*** B) Run the dashboard command setting the list of packages"
+ COMMAND echo "*** ${DASHBOARD_TARGET_CTEST_DRIVER_CMND_NUM}Run the dashboard command setting the list of packages"
COMMAND echo "***"
COMMAND echo
COMMAND echo Running: env ${EXPR_CMND_ARGS}
@@ -171,32 +235,11 @@ MACRO(TRIBITS_ADD_DASHBOARD_TARGET)
PROJECT_SOURCE_DIR=${PROJECT_SOURCE_DIR}
${CMAKE_CTEST_COMMAND} ${${PROJECT_NAME}_DASHBOARD_CTEST_ARGS} -S
${${PROJECT_NAME}_TRIBITS_DIR}/ctest_driver/experimental_build_test.cmake || echo
-
# 2009/07/05: rabartl: Above, I added the ending '|| echo' to always make
# the command pass so that 'make' will not stop and avoid this last command
# to set back the enabled packages.
- COMMAND echo
- COMMAND echo "***"
- COMMAND echo "*** C) Clean out the list of packages again to clean the cache file"
- COMMAND echo "***"
- COMMAND echo
- COMMAND echo Running: ${CMAKE_COMMAND} -D${PROJECT_NAME}_UNENABLE_ENABLED_PACKAGES:BOOL=TRUE
- -D${PROJECT_NAME}_ALLOW_NO_PACKAGES:BOOL=ON -D${PROJECT_NAME}_ENABLE_ALL_PACKAGES:BOOL=OFF ${PROJECT_SOURCE_DIR}
- COMMAND echo
- COMMAND ${CMAKE_COMMAND} -D${PROJECT_NAME}_UNENABLE_ENABLED_PACKAGES:BOOL=TRUE
- -D${PROJECT_NAME}_ALLOW_NO_PACKAGES:BOOL=ON -D${PROJECT_NAME}_ENABLE_ALL_PACKAGES:BOOL=OFF ${PROJECT_SOURCE_DIR}
-
- COMMAND echo
- COMMAND echo "***"
- COMMAND echo "*** D) Reconfigure with the original package list"
- COMMAND echo "***"
- COMMAND echo
- COMMAND echo Running: ${CMAKE_COMMAND} ${${PROJECT_NAME}_ENABLED_PACKAGES_CMAKE_ARG_LIST}
- -D${PROJECT_NAME}_ALLOW_NO_PACKAGES:BOOL=ON ${PROJECT_SOURCE_DIR}
- COMMAND echo
- COMMAND ${CMAKE_COMMAND} ${${PROJECT_NAME}_ENABLED_PACKAGES_CMAKE_ARG_LIST}
- -D${PROJECT_NAME}_ALLOW_NO_PACKAGES:BOOL=ON ${PROJECT_SOURCE_DIR}
+ ${DASHBOARD_TARGET_POST_CTEST_DRIVER_CMNDS}
COMMAND echo
COMMAND echo "See the results at http://${CTEST_DROP_SITE}${CTEST_DROP_LOCATION}&display=project\#Experimental"
diff --git a/tribits/ctest_driver/TribitsCTestDriverCore.cmake b/tribits/ctest_driver/TribitsCTestDriverCore.cmake
index 3abe7682f..10c4c8bbe 100644
--- a/tribits/ctest_driver/TribitsCTestDriverCore.cmake
+++ b/tribits/ctest_driver/TribitsCTestDriverCore.cmake
@@ -104,11 +104,11 @@ MESSAGE("PROJECT_NAME = ${PROJECT_NAME}")
#
# Set ${PROJECT_NAME}_TRIBITS_DIR
#
-IF (NOT ${PROJECT_NAME}_TRIBITS_DIR)
+IF (NOT "$ENV{${PROJECT_NAME}_TRIBITS_DIR}" STREQUAL "")
SET(${PROJECT_NAME}_TRIBITS_DIR "$ENV{${PROJECT_NAME}_TRIBITS_DIR}")
ENDIF()
-IF (NOT ${PROJECT_NAME}_TRIBITS_DIR)
- SET(${PROJECT_NAME}_TRIBITS_DIR "${TRIBITS_PROJECT_ROOT}/cmake//tribits")
+IF ("${${PROJECT_NAME}_TRIBITS_DIR}" STREQUAL "")
+ SET(${PROJECT_NAME}_TRIBITS_DIR "${TRIBITS_PROJECT_ROOT}/cmake/tribits")
ENDIF()
MESSAGE("${PROJECT_NAME}_TRIBITS_DIR = ${${PROJECT_NAME}_TRIBITS_DIR}")
@@ -202,46 +202,45 @@ SET(GITDIST_EXE "${${PROJECT_NAME}_TRIBITS_DIR}/python_utils/gitdist")
SITE_NAME(CTEST_SITE_DEFAULT)
-# Get the helper functions
-
+# Get helper functions
INCLUDE(${CMAKE_CURRENT_LIST_DIR}/TribitsCTestDriverCoreHelpers.cmake)
-
#
# @FUNCTION: TRIBITS_CTEST_DRIVER()
#
-# Platform-independent package-by-package CTest/CDash driver (run by ``ctest``
-# **NOT** ``cmake``).
+# Platform-independent CTest/CDash driver
#
# Usage::
#
# TRIBITS_CTEST_DRIVER()
#
-# This driver code that is platform independent. This script drives the
-# testing process by doing a version control (VC) source update on all of the
-# VC repos and then configuring and building the top-level TriBITS packages
-# one at a time, in order. This function gets called from inside of a
-# platform and build-specific ``ctest -S`` driver script.
+# This driver code is platform independent. CTest -S scripts use this
+# function to drive the testing process for a TriBITS projects by doing a
+# version control (VC) source update on all of the VC repos and then
+# configuring, building, testing, and submitting results to CDash for the
+# TriBITS packages in a project either in package-by-package mode (the
+# default), or in an all-at-once mode (see
+# ``${PROJECT_NAME}_CTEST_DO_ALL_AT_ONCE``).
#
-# To understand this script, one must understand that it gets run in several
-# different modes:
+# **Source and Binary Directory Locations:**
+#
+# To understand how to set the source and binary directories, one must
+# understand that it gets run in one of two different modes:
#
# **Mode 1**: Run where there are already existing source and binary
-# directories (``CTEST_DASHBOARD_ROOT`` is set empty before call). This is
-# for when the ctest driver script is run on an existing source and binary
-# tree. In this case, there is one project source tree and
-# ``CTEST_SOURCE_DIRECTORY`` and ``CTEST_BINARY_DIRECTORY`` must be set by the
-# user before calling this function. This is used to test a local build and
-# post to CDash.
+# directories (i.e. ``CTEST_DASHBOARD_ROOT`` is set empty before call). In
+# this case, ``CTEST_SOURCE_DIRECTORY`` and ``CTEST_BINARY_DIRECTORY`` must be
+# set by the user before calling this function. This is used to test a local
+# build and post to CDash (see the custom ``dashboard`` target).
#
# **Mode 2**: A new binary directory is created and new sources are cloned (or
-# updated) in a driver directory (``CTEST_DASHBOARD_ROOT`` is set before
+# updated) in a driver directory (i.e. ``CTEST_DASHBOARD_ROOT`` is set before
# call). In this case, there are always two (partial) project source tree's,
-# i) a "driver" skeleton source tree (typically embedded with TriBITS
-# directory) that bootstraps the testing process, and ii) a true full "source"
-# that is (optionally) cloned and/or updated.
+# a) a "driver" skeleton source tree (typically embedded with TriBITS
+# directory) that bootstraps the testing process, and b) a true full "source"
+# that is (optionally) cloned and/or updated and tested..
#
# There are a few different directory locations are significant for this
# script:
@@ -249,8 +248,8 @@ INCLUDE(${CMAKE_CURRENT_LIST_DIR}/TribitsCTestDriverCoreHelpers.cmake)
# ``TRIBITS_PROJECT_ROOT``
#
# The root directory to an existing source tree where the project's
-# `/ProjectName.cmake`_ (defining ``PROJECT_NAME`` variable)
-# and ``Version.cmake`` file's can be found.
+# `/ProjectName.cmake`_ (defining the ``PROJECT_NAME``
+# variable) and ``Version.cmake`` files can be found.
#
# ``${PROJECT_NAME}_TRIBITS_DIR``
#
@@ -263,16 +262,17 @@ INCLUDE(${CMAKE_CURRENT_LIST_DIR}/TribitsCTestDriverCoreHelpers.cmake)
#
# If set, this is the base directory where this script runs that clones
# the sources for the project. If this directory does not exist, it will
-# be created. If empty, then has no effect on the script.
+# be created. If provided as the special value "PWD", then the present
+# working directory is used. If empty, then this var has no effect.
#
# ``CTEST_SOURCE_DIRECTORY``
#
# Determines the location of the sources that are used to define packages,
-# dependencies and configure and build the software. This is a variable
-# that CTest directly reads and must therefore be set. This is used to set
-# `PROJECT_SOURCE_DIR`_ which is used by the TriBITS system. If
-# ``CTEST_DASHBOARD_ROOT`` is set, then this is hard-coded internally to
-# ``${CTEST_DASHBOARD_ROOT}/${CTEST_SOURCE_NAME}``.
+# dependencies and configure, build, and test the software. This is a
+# variable that CTest directly reads and must therefore be set. This is
+# used to set `PROJECT_SOURCE_DIR`_ which is used by the TriBITS system.
+# If ``CTEST_DASHBOARD_ROOT`` is set, then this is hard-coded internally
+# to ``${CTEST_DASHBOARD_ROOT}/${CTEST_SOURCE_NAME}``.
#
# ``CTEST_BINARY_DIRECTORY``
#
@@ -281,15 +281,84 @@ INCLUDE(${CMAKE_CURRENT_LIST_DIR}/TribitsCTestDriverCoreHelpers.cmake)
# the TriBITS system. If ``CTEST_DASHBOARD_ROOT`` is set, then this is
# hard-coded internally to ``${CTEST_DASHBOARD_ROOT}/BUILD``.
#
-# ToDo: Document input variables that have defaults, to be set before, and can
-# be overridden from the env.
+# **Determining What Packages Get Tested:**
+#
+# Before any testing is done, the set of packages to be tested is determined
+# are determined. By default, the set of packages to be tested is determined
+# by the var:
+#
+# ``${PROJECT_NAME}_PACKAGES``
+#
+# Determines the specific set of packages to test. If left at the default
+# value of empty "", then `${PROJECT_NAME}_ENABLE_ALL_PACKAGES`_ is set to
+# ``ON`` and that enables packages as described in
+# `_ENABLE_ALL_PACKAGES enables all PT (cond. ST) SE packages`_.
+# This variable can also be specified and read from from the env and can
+# use `,` to separate package names instead of ';'.
+#
+# ToDo: Document other variables that determine what packages get tested.
+#
+# The other mode is to only test the packages that have changes since the last
+# time this build was run and testing packages that previously failed. That
+# mode is turned on by the var:
+#
+# ``CTEST_ENABLE_MODIFIED_PACKAGES_ONLY``
+#
+# If ``TRUE``, then only packages that have changes pulled from the git
+# repos since the last time the build ran will be tested (in addition to
+# packages that failed in the last build). If ``FALSE``, the set of
+# packages to be tested is determined by ``${PROJECT_NAME}_PACKAGES`` and
+# other variables as described above.
+#
+# ToDo: Document other input variables that have defaults, to be set before,
+# and can be overridden from the env.
+#
+# **All-at-once vs. package-by-package mode:**
+#
+# This function supports driving the configure, build, testing, and submitting
+# to CDash of the packages in the TriBITS project either all-at-once or
+# package-by-package, based on the value:
#
-# **Repository updates:**
+# ``${PROJECT_NAME}_CTEST_DO_ALL_AT_ONCE``
+#
+# If ``TRUE``, then single calls to ``CTEST_CONFIGURE()``,
+# ``CTEST_BUILD()`` and ``CTEST_TEST()` are made for all of the packages
+# to be tested all at once with ``CTEST_SUBMIT()`` called after each of
+# these. If ``FALSE`` then ``CTEST_CONFIGURE()``, ``CTEST_BUILD()`` and
+# ``CTEST_TEST()` and ``CTEST_SUBMIT()`` are called in a loop, once for
+# each package to be explicitly tested.
+#
+# Both the all-at-once mode and the package-by-package mode should produce
+# equivalent builds of the project and submits to CDash (for correctly
+# constructed TriBITS projects and package). But the package-by-package mode
+# will disable failing packages when processing downstream packages, and
+# therefore reduce the propagation of failures to downstream packages.
+#
+# For versions of CMake 3.10.0 and above and newer versions of CDash, the
+# all-at-once mode will break down the build and test results on a
+# package-by-package basis on CDash. For older versions of CMake or CDash, it
+# will not break down results on a package-by-package basis on CDash and all
+# of the build warnings and errors and test will be all globed together.
+#
+# **Repository Updates:**
#
# Like the rest of TriBITS, ``ctest -S`` scripts written using this function
-# supports a collection of extra repositories in addition to the base
+# supports a collection of extra repositories in addition to the base git
# repository. The basic clone of the extra repositories requires all repos to
-# use the version control system.
+# use the git version control system.
+#
+# Whether the repos are updated (or left as is) is determined by the var:
+#
+# ``CTEST_DO_UPDATES``
+#
+# If set to ``TRUE``, then each of the git repos will be cloned if they are
+# missing and if already present will be updated as described below (and
+# will wipe out any local changes). If ``FALSE``, then the git repos will
+# be left alone (and must therefore already be cloned and updated at the
+# desired state).
+#
+# **WARNING:** If you don't want local changes in your git repos to get blown
+# away, then set ``CTEST_DO_UPDATES`` to ``FALSE``!
#
# CTest itself is used for handling the cloning and the pull of the base
# repository by calling ``CTEST_UPDATE()``. The other extra git repositories
@@ -301,13 +370,14 @@ INCLUDE(${CMAKE_CURRENT_LIST_DIR}/TribitsCTestDriverCoreHelpers.cmake)
#
# git clone
#
-# Therefore, by default, whatever the default branch is set to on clone, that
-# is the branch that will be used. Also, future repository updates will be
-# done on those branches.
+# Therefore, by default, whatever the default branch is set to on clone in the
+# base repos, that is the branch that will be used. Also, future repository
+# updates will be done on those branches.
#
# However, if ``${PROJECT_NAME}_BRANCH`` is set to non-empty, then that branch
# will be checked out in all of the repositories. For the base repository,
-# after the clone or update, that branch is checked out using the command::
+# after the clone or update is performed in the call to ``CTEST_UPDATE()``,
+# then that branch is checked out using the command::
#
# $ git checkout -B ${${PROJECT_NAME}_BRANCH} \
# --track origin/${${PROJECT_NAME}_BRANCH}`
@@ -325,9 +395,9 @@ INCLUDE(${CMAKE_CURRENT_LIST_DIR}/TribitsCTestDriverCoreHelpers.cmake)
#
# The command ``git clone -fdx`` removes any untracked ignored files that may
# have been created since the last update (either by the build process or by
-# someone messing around in that git repository). The command ``git reset
-# --hard HEAD`` removes any untracked non-ignored files, any modified tracked
-# files, and sets ``ORIG_HEAD`` to the current ``HEAD``. This sets
+# someone messing around in that local git repository). The command ``git
+# reset --hard HEAD`` removes any untracked non-ignored files, any modified
+# tracked files, and sets ``ORIG_HEAD`` to the current ``HEAD``. This sets
# ``ORIG_HEAD`` after the initial clone (as ``ORIG_HEAD`` is not set after a
# ``git clone``). This allows using the range ``ORIG_HEAD..HEAD`` with git
# diff and log commands even after the initial clone. The ``git fetch``
@@ -359,12 +429,13 @@ INCLUDE(${CMAKE_CURRENT_LIST_DIR}/TribitsCTestDriverCoreHelpers.cmake)
#
# Note that the repository updating approach using non-empty
# ``${PROJECT_NAME}_BRANCH`` is more robust, because it can recover from a
-# state where someone may have put the repo on a detached head or checked out
-# a different branch. This might occur when a person is messing around in the
-# Nightly build and source directories to try to figure out what happened and
-# forgot to put the repos back on the correct tracking branch. Therefore, it
-# is recommended to always set ``${PROJECT_NAME}_BRANCH`` to a non-null value
-# like ``master`` for git repos.
+# state where someone may have put A repo on a detached head or checked out a
+# different branch. One of these repos might get into this state when a
+# person is messing around in the Nightly build and source directories to try
+# to figure out what happened and forgot to put the repos back on the correct
+# tracking branch. Therefore, it is recommended to always set
+# ``${PROJECT_NAME}_BRANCH`` to a non-null value like ``master`` for git
+# repos.
#
# ToDo: Finish Documentation!
#
@@ -417,6 +488,10 @@ FUNCTION(TRIBITS_CTEST_DRIVER)
# The root of the dasbhoard where ${PROJECT_NAME} will be cloned and the
# BUILD directory will be create (only override for separate testing)
SET_DEFAULT_AND_FROM_ENV( CTEST_DASHBOARD_ROOT "" )
+ IF (CTEST_DASHBOARD_ROOT STREQUAL "PWD")
+ SET(CTEST_DASHBOARD_ROOT ${CMAKE_CURRENT_BINARY_DIR})
+ PRINT_VAR(CTEST_DASHBOARD_ROOT)
+ ENDIF()
# The build type (e.g. DEBUG, RELEASE, NONE)
SET_DEFAULT_AND_FROM_ENV( BUILD_TYPE NONE )
@@ -427,7 +502,7 @@ FUNCTION(TRIBITS_CTEST_DRIVER)
# Set the default compiler version
SET_DEFAULT_AND_FROM_ENV(COMPILER_VERSION UNKNOWN)
- # The name of the build that appears in the dashbaord
+ # The name of the build that appears in the dashboard
SET_DEFAULT_AND_FROM_ENV( CTEST_BUILD_NAME
"${HOST_TYPE}-${COMPILER_VERSION}-${BUILD_DIR_NAME}" )
@@ -455,6 +530,20 @@ FUNCTION(TRIBITS_CTEST_DRIVER)
# Flags used on update when doing a Git update
SET_DEFAULT_AND_FROM_ENV( CTEST_UPDATE_OPTIONS "")
+ # If doing all-at-one approach, use new CMkae/CTest/CDash features to allow
+ # it to split out results into different rows on CDash like the
+ # package-by-packages appraoch.
+ SET_DEFAULT_AND_FROM_ENV( ${PROJECT_NAME}_CTEST_USE_NEW_AAO_FEATURES FALSE )
+
+ # Do all-at-once configure, build, test and submit (or package-by-package)
+ IF (${PROJECT_NAME}_CTEST_USE_NEW_AAO_FEATURES)
+ SET(${PROJECT_NAME}_CTEST_DO_ALL_AT_ONCE_DEFAULT TRUE)
+ ELSE()
+ SET(${PROJECT_NAME}_CTEST_DO_ALL_AT_ONCE_DEFAULT FALSE)
+ ENDIF()
+ SET_DEFAULT_AND_FROM_ENV( ${PROJECT_NAME}_CTEST_DO_ALL_AT_ONCE
+ ${${PROJECT_NAME}_CTEST_DO_ALL_AT_ONCE_DEFAULT} )
+
# Flags passed to 'make' assume gnumake with unix makefiles
IF("${CTEST_CMAKE_GENERATOR}" MATCHES "Unix Makefiles")
SET_DEFAULT_AND_FROM_ENV( CTEST_BUILD_FLAGS "-j2")
@@ -517,9 +606,6 @@ FUNCTION(TRIBITS_CTEST_DRIVER)
SET_DEFAULT_AND_FROM_ENV( ${PROJECT_NAME}_ENABLE_SECONDARY_TESTED_CODE OFF )
- # ${PROJECT_NAME}_ENABLE_SECONDARY_STABLE_CODE is deprecated!
- SET_DEFAULT_AND_FROM_ENV( ${PROJECT_NAME}_ENABLE_SECONDARY_STABLE_CODE OFF )
-
# List of additional packges that will be enabled over the current set
# of all packagess (that would be set by ${PROJECT_NAME}_ENABLE_ALL_PACKAGES).
SET_DEFAULT_AND_FROM_ENV( ${PROJECT_NAME}_ADDITIONAL_PACKAGES "" )
@@ -604,7 +690,8 @@ FUNCTION(TRIBITS_CTEST_DRIVER)
# Set as part of CI testing in order to only enable modified packages
SET_DEFAULT_AND_FROM_ENV( CTEST_ENABLE_MODIFIED_PACKAGES_ONLY OFF )
- # Set if implicitly enabled packages should be explicitly processes
+ # Set if implicitly enabled packages should be explicitly processed in
+ # package-by-package mode.
IF (CTEST_ENABLE_MODIFIED_PACKAGES_ONLY AND NOT CTEST_START_WITH_EMPTY_BINARY_DIRECTORY)
SET( CTEST_EXPLICITLY_ENABLE_IMPLICITLY_ENABLED_PACKAGES_DEFAULT FALSE )
ELSE()
@@ -679,7 +766,6 @@ FUNCTION(TRIBITS_CTEST_DRIVER)
#
INCLUDE("${TRIBITS_PROJECT_ROOT}/CTestConfig.cmake")
- SET(CMAKE_CACHE_CLEAN_FILE "${CTEST_BINARY_DIRECTORY}/CMakeCache.clean.txt")
SET(CTEST_USE_LAUNCHERS 1)
# For coverage dashboards, send results to specialized dashboard if
@@ -851,13 +937,13 @@ FUNCTION(TRIBITS_CTEST_DRIVER)
IF (NOT CTEST_ENABLE_MODIFIED_PACKAGES_ONLY)
MESSAGE(
"\n***"
- "\n*** Determining what packages to enable based what was set in ${PROJECT_NAME}_PACKAGES ..."
+ "\n*** Determining what packages to enable based what was set in ${PROJECT_NAME}_PACKAGES by the user ..."
"\n***\n")
ENABLE_USER_SELECTED_PACKAGES()
ELSE()
MESSAGE(
"\n***"
- "\n*** Determining what packages to enable based on what changed ..."
+ "\n*** Determining what packages to enable based on what changed (and failed last CI iteration) ..."
"\n***\n")
ENABLE_ONLY_MODIFIED_PACKAGES()
SET(${PROJECT_NAME}_ENABLE_ALL_FORWARD_DEP_PACKAGES ON)
@@ -875,11 +961,13 @@ FUNCTION(TRIBITS_CTEST_DRIVER)
SET(${PROJECT_NAME}_ENABLE_EXAMPLES ON)
SET(${PROJECT_NAME}_ENABLE_ALL_OPTIONAL_PACKAGES ON)
SET(DO_PROCESS_MPI_ENABLES FALSE) # Should not be needed but CMake is messing up
- TRIBITS_ADJUST_AND_PRINT_PACKAGE_DEPENDENCIES() # Sets ${PROJECT_NAME}_NUM_ENABLED_PACKAGES
+ TRIBITS_ADJUST_AND_PRINT_PACKAGE_DEPENDENCIES()
+ # Above sets ${PROJECT_NAME}_NUM_ENABLED_PACKAGES
- SELECT_FINAL_SET_OF_PACKAGES_TO_PROCESS()
+ SELECT_FINAL_SET_OF_PACKAGES_TO_DIRECTLY_TEST()
+ # Above sets ${PROJECT_NAME}_PACKAGES_TO_DIRECTLY_TEST
- TRIBITS_PRINT_ENABLED_PACKAGE_LIST(
+ TRIBITS_PRINT_ENABLED_PACKAGES_LIST_FROM_VAR( ${PROJECT_NAME}_PACKAGES_TO_DIRECTLY_TEST
"\nFinal set of packages to be explicitly processed by CTest/CDash" ON FALSE)
MESSAGE(
@@ -887,16 +975,12 @@ FUNCTION(TRIBITS_CTEST_DRIVER)
"\n*** Determine if to go ahead with configure, build, test ..."
"\n***")
- IF (CTEST_ENABLE_MODIFIED_PACKAGES_ONLY)
- IF (MODIFIED_PACKAGES_LIST)
- MESSAGE("\nMODIFIED_PACKAGES_LIST='${MODIFIED_PACKAGES_LIST}'"
- ": Found modified packages, processing enabled packages!\n")
- ELSE()
- MESSAGE("\nMODIFIED_PACKAGES_LIST='${MODIFIED_PACKAGES_LIST}'"
- ": No modified packages to justify continuous integration test iteration!\n")
- REPORT_QUEUED_ERRORS()
- RETURN()
- ENDIF()
+ IF (CTEST_ENABLE_MODIFIED_PACKAGES_ONLY
+ AND ${PROJECT_NAME}_NUM_ENABLED_PACKAGES GREATER 0
+ AND MODIFIED_PACKAGES_LIST
+ )
+ MESSAGE("\nMODIFIED_PACKAGES_LIST='${MODIFIED_PACKAGES_LIST}'"
+ ": Found modified packages, processing enabled packages!\n")
ELSE()
MESSAGE(
"\nCTEST_ENABLE_MODIFIED_PACKAGES_ONLY=${CTEST_ENABLE_MODIFIED_PACKAGES_ONLY}"
@@ -974,296 +1058,22 @@ FUNCTION(TRIBITS_CTEST_DRIVER)
MESSAGE("\nSkipping submitted subproject dependencies XML file on request!")
ENDIF()
-
MESSAGE(
"\n***"
- "\n*** Loop through ${PROJECT_NAME} packages to configure, build, and test ..."
+ "\n*** Configure, build, test, and submit results for ${PROJECT_NAME} packages:"
"\n***")
- SET(${PROJECT_NAME}_LAST_CONFIGURED_PACKAGE)
- SET(${PROJECT_NAME}_FAILED_LIB_BUILD_PACKAGES)
+ SET(CMAKE_CACHE_CLEAN_FILE "${CTEST_BINARY_DIRECTORY}/CMakeCache.clean.txt")
SET(${PROJECT_NAME}_FAILED_PACKAGES)
- SET(PACKAGE_IDX 0)
-
- FOREACH(TRIBITS_PACKAGE ${${PROJECT_NAME}_PACKAGES})
-
- MESSAGE("")
- MESSAGE("${PACKAGE_IDX}) Processing current package ${TRIBITS_PACKAGE}:"
- " libs='${${PROJECT_NAME}_ENABLE_${TRIBITS_PACKAGE}}',"
- " tests='${${TRIBITS_PACKAGE}_ENABLE_TESTS}'")
- MESSAGE("")
-
- SET_PROPERTY(GLOBAL PROPERTY SubProject ${TRIBITS_PACKAGE})
- SET_PROPERTY(GLOBAL PROPERTY Label ${TRIBITS_PACKAGE})
-
- #
- # A) Configure the package and its dependent packages
- #
-
- MESSAGE("Configuring TRIBITS_PACKAGE='${TRIBITS_PACKAGE}'")
-
- # Create CONFIGURE_OPTIONS for this TRIBITS_PACKAGE
- SET( CONFIGURE_OPTIONS
- "-D${PROJECT_NAME}_TRIBITS_DIR=${${PROJECT_NAME}_TRIBITS_DIR}"
- "-DCTEST_USE_LAUNCHERS:BOOL=${CTEST_USE_LAUNCHERS}"
- "-D${PROJECT_NAME}_ENABLE_ALL_OPTIONAL_PACKAGES:BOOL=ON"
- "-D${PROJECT_NAME}_ENABLE_TESTS:BOOL=${${TRIBITS_PACKAGE}_ENABLE_TESTS}"
- "-D${PROJECT_NAME}_WARNINGS_AS_ERRORS_FLAGS:STRING=${${PROJECT_NAME}_WARNINGS_AS_ERRORS_FLAGS}"
- "-D${PROJECT_NAME}_ALLOW_NO_PACKAGES:BOOL=ON"
- "-D${PROJECT_NAME}_DISABLE_ENABLED_FORWARD_DEP_PACKAGES=${${PROJECT_NAME}_DISABLE_ENABLED_FORWARD_DEP_PACKAGES}"
- )
- IF (NOT CTEST_GENERATE_DEPS_XML_OUTPUT_FILE)
- LIST(APPEND CONFIGURE_OPTIONS
- "-D${PROJECT_NAME}_DEPS_XML_OUTPUT_FILE:FILEPATH=")
- ENDIF()
- IF (${PROJECT_NAME}_ENABLE_SECONDARY_TESTED_CODE)
- LIST(APPEND CONFIGURE_OPTIONS
- "-D${PROJECT_NAME}_ENABLE_SECONDARY_TESTED_CODE:BOOL=ON")
- ENDIF()
- # ${PROJECT_NAME}_ENABLE_SECONDARY_STABLE_CODE is deprecated!
- IF (${PROJECT_NAME}_ENABLE_SECONDARY_STABLE_CODE)
- LIST(APPEND CONFIGURE_OPTIONS
- "-D${PROJECT_NAME}_ENABLE_SECONDARY_STABLE_CODE:BOOL=ON")
- ENDIF()
- IF (NOT MPI_EXEC_MAX_NUMPROCS STREQUAL 0)
- LIST(APPEND CONFIGURE_OPTIONS
- "-DMPI_EXEC_MAX_NUMPROCS:STRING=${MPI_EXEC_MAX_NUMPROCS}")
- ENDIF()
- IF (CTEST_DO_COVERAGE_TESTING)
- LIST(APPEND CONFIGURE_OPTIONS
- "-D${PROJECT_NAME}_ENABLE_COVERAGE_TESTING:BOOL=ON")
- ENDIF()
- LIST(APPEND CONFIGURE_OPTIONS
- "-D${PROJECT_NAME}_EXTRAREPOS_FILE:STRING=${${PROJECT_NAME}_EXTRAREPOS_FILE}")
- LIST(APPEND CONFIGURE_OPTIONS # See TRIBITS_SETUP_PACKAGES
- "-D${PROJECT_NAME}_IGNORE_MISSING_EXTRA_REPOSITORIES:BOOL=ON")
- LIST(APPEND CONFIGURE_OPTIONS
- "-D${PROJECT_NAME}_ENABLE_KNOWN_EXTERNAL_REPOS_TYPE:STRING=${${PROJECT_NAME}_ENABLE_KNOWN_EXTERNAL_REPOS_TYPE}")
- IF (DEFINED ${PROJECT_NAME}_LAST_CONFIGURED_PACKAGE)
- LIST(APPEND CONFIGURE_OPTIONS
- "-D${PROJECT_NAME}_ENABLE_${${PROJECT_NAME}_LAST_CONFIGURED_PACKAGE}:BOOL=")
- SET(${PROJECT_NAME}_LAST_CONFIGURED_PACKAGE)
- ENDIF()
- FOREACH(FAILED_PACKAGE ${${PROJECT_NAME}_FAILED_LIB_BUILD_PACKAGES})
- LIST(APPEND CONFIGURE_OPTIONS
- "-D${PROJECT_NAME}_ENABLE_${FAILED_PACKAGE}:BOOL=OFF")
- ENDFOREACH()
- SET(CONFIGURE_OPTIONS ${CONFIGURE_OPTIONS}
- ${EXTRA_SYSTEM_CONFIGURE_OPTIONS} ${EXTRA_CONFIGURE_OPTIONS})
- LIST(APPEND CONFIGURE_OPTIONS # Package enable must be at the very end to override other stuff!
- "-D${PROJECT_NAME}_ENABLE_${TRIBITS_PACKAGE}:BOOL=ON" )
- MESSAGE("\nCONFIGURE_OPTIONS = '${CONFIGURE_OPTIONS}'")
-
- # Remember this package so we can set its enable to "" next time
- SET(${PROJECT_NAME}_LAST_CONFIGURED_PACKAGE "${TRIBITS_PACKAGE}")
-
- #
- # B) Configure the package and its dependent packages
- #
-
- IF (NOT CTEST_DEPENDENCY_HANDLING_UNIT_TESTING)
-
- CTEST_CONFIGURE(
- BUILD "${CTEST_BINARY_DIRECTORY}"
- OPTIONS "${CONFIGURE_OPTIONS}" # New option!
- RETURN_VALUE CONFIGURE_RETURN_VAL
- )
-
- MESSAGE("Generating the file '${CMAKE_CACHE_CLEAN_FILE}' ...")
- TRIBITS_STRIP_COMMENTS_FROM_CMAKE_CACHE_FILE(
- "${CTEST_BINARY_DIRECTORY}/CMakeCache.txt"
- "${CMAKE_CACHE_CLEAN_FILE}"
- )
-
- # If the configure failed, add the package to the list
- # of failed packages
- IF (NOT "${CONFIGURE_RETURN_VAL}" EQUAL "0")
- MESSAGE("${TRIBITS_PACKAGE} FAILED to configure")
- LIST(APPEND ${PROJECT_NAME}_FAILED_LIB_BUILD_PACKAGES ${TRIBITS_PACKAGE})
- LIST(APPEND ${PROJECT_NAME}_FAILED_PACKAGES ${TRIBITS_PACKAGE})
- ELSE()
- # load target properties and test keywords
- CTEST_READ_CUSTOM_FILES(BUILD "${CTEST_BINARY_DIRECTORY}")
- # Overridde from this file!
- INCLUDE("${TRIBITS_PROJECT_ROOT}/CTestConfig.cmake")
- ENDIF()
-
- IF (EXISTS ${CMAKE_CACHE_CLEAN_FILE})
- SET(CTEST_NOTES_FILES "${CTEST_NOTES_FILES_WO_CACHE};${CMAKE_CACHE_CLEAN_FILE}")
- ELSE()
- SET(CTEST_NOTES_FILES "${CTEST_NOTES_FILES_WO_CACHE}")
- ENDIF()
-
- SET(REPO_VERSION_FILE "${CTEST_BINARY_DIRECTORY}/${PROJECT_NAME}RepoVersion.txt")
- IF (EXISTS "${REPO_VERSION_FILE}")
- SET(CTEST_NOTES_FILES "${REPO_VERSION_FILE};${CTEST_NOTES_FILES}")
- ENDIF()
-
- PRINT_VAR(CTEST_NOTES_FILES)
-
- # Submit configure results and the notes to the dashboard
- IF (CTEST_DO_SUBMIT)
- MESSAGE("\nSubmitting configure and notes ...")
- TRIBITS_CTEST_SUBMIT( PARTS configure notes )
- ENDIF()
-
- ENDIF()
-
- #
- # C) If configure passed then try the build. Otherwise, move on to
- # to the next package.
- #
-
- IF ("${CONFIGURE_RETURN_VAL}" EQUAL "0" AND
- NOT CTEST_DEPENDENCY_HANDLING_UNIT_TESTING AND
- NOT CTEST_CONFIGURATION_UNIT_TESTING
- )
-
- # Start by trying to build just the libraries for the current package
-
- SET( CTEST_BUILD_TARGET ${TRIBITS_PACKAGE}_libs )
- MESSAGE("\nBuilding target: '${CTEST_BUILD_TARGET}' ...\n")
- CTEST_BUILD(
- BUILD "${CTEST_BINARY_DIRECTORY}"
- RETURN_VALUE BUILD_LIBS_RETURN_VAL
- NUMBER_ERRORS BUILD_LIBS_NUM_ERRORS
- APPEND
- )
- MESSAGE("Build return: RETURN_VALUE=${BUILD_LIBS_RETURN_VAL},"
- " NUMBER_ERRORS=${BUILD_LIBS_NUM_ERRORS}")
-
- # Determine if the build failed or not.
-
- SET(BUILD_LIBS_SUCCESS FALSE)
- IF ("${BUILD_LIBS_NUM_ERRORS}" EQUAL "0")
- SET(BUILD_LIBS_SUCCESS TRUE)
- ENDIF()
- # Above: Since make -i is used BUILD_LIBS_RETURN_VAL might be 0, but
- # if there are errors the build should fail, so both
- # BUILD_LIBS_RETURN_VAL and BUILD_LIBS_NUM_ERRORS should be 0 for a
- # good build and for the all target to be built.
-
- # Submit the library build results to the dashboard
-
- IF (CTEST_DO_SUBMIT)
- TRIBITS_CTEST_SUBMIT( PARTS build )
- ENDIF()
-
- # If the build of the libraries passed, then go on the build
- # the tests/examples and run them.
-
- IF (BUILD_LIBS_SUCCESS)
-
- SET(BUILD_OR_TEST_FAILED FALSE)
-
- # Build the ALL target, but append the results to the last build.xml
- SET(CTEST_BUILD_TARGET)
- MESSAGE("\nBuild ALL target for '${TRIBITS_PACKAGE}' ...\n")
- CTEST_BUILD(
- BUILD "${CTEST_BINARY_DIRECTORY}"
- RETURN_VALUE BUILD_ALL_RETURN_VAL
- NUMBER_ERRORS BUILD_ALL_NUM_ERRORS
- APPEND
- )
- MESSAGE("Build all: BUILD_ALL_NUM_ERRORS='${BUILD_ALL_NUM_ERRORS}',"
- "BUILD_ALL_RETURN_VAL='${BUILD_ALL_RETURN_VAL}'" )
-
- IF (NOT "${BUILD_LIBS_NUM_ERRORS}" EQUAL "0")
- SET(BUILD_OR_TEST_FAILED TRUE)
- ENDIF()
-
- # Submit the build for all target
- IF (CTEST_DO_SUBMIT)
- TRIBITS_CTEST_SUBMIT( PARTS build )
- ENDIF()
-
- IF (CTEST_DO_TEST)
- # Remove the LastTestsFailed log so we can detect if there are any
- # failed tests.
- SET(TEST_TMP_DIR "${CTEST_BINARY_DIRECTORY}/Testing/Temporary")
- FILE(GLOB logfiles "${TEST_TMP_DIR}/LastTestsFailed*.log")
- FOREACH(logfile ${logfiles})
- FILE(REMOVE "${logfile}")
- ENDFOREACH()
- # Run the tests that match the ${TRIBITS_PACKAGE} name
- MESSAGE("\nRunning test for package '${TRIBITS_PACKAGE}'"
- " (parallel level ${CTEST_PARALLEL_LEVEL}) ...\n")
- CTEST_TEST(
- BUILD "${CTEST_BINARY_DIRECTORY}"
- PARALLEL_LEVEL "${CTEST_PARALLEL_LEVEL}"
- INCLUDE_LABEL "^${TRIBITS_PACKAGE}$"
- #NUMBER_FAILED TEST_NUM_FAILED
- )
- # See if a 'LastTestsFailed*.log' file exists to determine if there
- # are failed tests
- FILE(GLOB FAILED_TEST_LOG_FILE "${TEST_TMP_DIR}/LastTestsFailed*.log")
- PRINT_VAR(FAILED_TEST_LOG_FILE)
- IF (FAILED_TEST_LOG_FILE)
- SET(BUILD_OR_TEST_FAILED TRUE)
- ENDIF()
- # 2009/12/05: ToDo: We need to add an argument to CTEST_TEST(...)
- # called something like 'NUMBER_FAILED numFailedTests' to allow us
- # to detect when the tests have filed.
- #IF (TEST_NUM_FAILED GREATER 0)
- # SET(BUILD_OR_TEST_FAILED TRUE)
- #ENDIF()
- IF (CTEST_DO_SUBMIT)
- TRIBITS_CTEST_SUBMIT( PARTS Test )
- ENDIF()
- ENDIF()
-
- IF (CTEST_DO_COVERAGE_TESTING)
- MESSAGE("\nRunning coverage for package '${TRIBITS_PACKAGE}' ...\n")
- CTEST_COVERAGE(
- BUILD "${CTEST_BINARY_DIRECTORY}"
- LABELS ${TRIBITS_PACKAGE} ${TRIBITS_PACKAGE}Libs ${TRIBITS_PACKAGE}Exes
- )
- IF (CTEST_DO_SUBMIT)
- TRIBITS_CTEST_SUBMIT( PARTS Coverage )
- ENDIF()
- ENDIF()
-
- IF (CTEST_DO_MEMORY_TESTING)
- MESSAGE("\nRunning memory testing for package '${TRIBITS_PACKAGE}' ...\n")
- PRINT_VAR(CTEST_MEMORYCHECK_COMMAND)
- PRINT_VAR(CTEST_MEMORYCHECK_COMMAND_OPTIONS)
- PRINT_VAR(CTEST_MEMORYCHECK_SUPPRESSIONS_FILE)
- CTEST_MEMCHECK(
- BUILD "${CTEST_BINARY_DIRECTORY}"
- PARALLEL_LEVEL "${CTEST_PARALLEL_LEVEL}"
- INCLUDE_LABEL "^${TRIBITS_PACKAGE}$")
- IF (CTEST_DO_SUBMIT)
- TRIBITS_CTEST_SUBMIT( PARTS MemCheck )
- ENDIF()
- ENDIF()
-
- IF (BUILD_OR_TEST_FAILED)
- LIST(APPEND ${PROJECT_NAME}_FAILED_PACKAGES ${TRIBITS_PACKAGE})
- ENDIF()
-
- ELSE()
-
- MESSAGE("FAILED library build for package '${TRIBITS_PACKAGE}'")
- LIST(APPEND ${PROJECT_NAME}_FAILED_LIB_BUILD_PACKAGES ${TRIBITS_PACKAGE})
- LIST(APPEND ${PROJECT_NAME}_FAILED_PACKAGES ${TRIBITS_PACKAGE})
-
- ENDIF()
- ENDIF()
+ IF (${PROJECT_NAME}_CTEST_DO_ALL_AT_ONCE)
- IF (CTEST_DO_SUBMIT)
- MESSAGE("\nSubmit the update file that will trigger the notification email ...\n")
- TRIBITS_CTEST_SUBMIT( PARTS update )
- ENDIF()
+ TRIBITS_CTEST_ALL_AT_ONCE()
- MATH(EXPR PACKAGE_IDX "${PACKAGE_IDX}+1")
+ ELSE()
- ENDFOREACH(TRIBITS_PACKAGE)
+ TRIBITS_CTEST_PACKAGE_BY_PACKAGE()
- IF(${PROJECT_NAME}_FAILED_LIB_BUILD_PACKAGES)
- MESSAGE(
- "\nFinal set packages that failed to configure or have the libraries build:"
- " '${${PROJECT_NAME}_FAILED_LIB_BUILD_PACKAGES}'")
ENDIF()
IF(${PROJECT_NAME}_FAILED_PACKAGES)
@@ -1275,12 +1085,6 @@ FUNCTION(TRIBITS_CTEST_DRIVER)
# iteration since these packages must be enabled
FILE(WRITE "${FAILED_PACKAGES_FILE_NAME}" "${${PROJECT_NAME}_FAILED_PACKAGES}\n")
- # This is no longer necessary with CMake 2.8.1
- #MESSAGE("\nKill all hanging Zoltan processes ...")
- #EXECUTE_PROCESS(COMMAND killall -s 9 zdrive.exe)
-
- MESSAGE("\nDone with the incremental building and testing of ${PROJECT_NAME} packages!\n")
-
REPORT_QUEUED_ERRORS()
STRING(REPLACE "submit.php"
@@ -1301,6 +1105,8 @@ FUNCTION(TRIBITS_CTEST_DRIVER)
"${SEE_CDASH_LINK_STR}\n"
"TRIBITS_CTEST_DRIVER: OVERALL: ALL PASSSED\n")
ELSE()
+ # ToDo: Find out why other breaking tests don't fail when FATAL_ERROR is
+ # removed!
MESSAGE(FATAL_ERROR
"${SEE_CDASH_LINK_STR}\n"
"TRIBITS_CTEST_DRIVER: OVERALL: ALL FAILED\n")
@@ -1308,7 +1114,7 @@ FUNCTION(TRIBITS_CTEST_DRIVER)
# 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.
+ # CTEST_TEST() will be printed last :-(
ENDIF()
ENDFUNCTION()
diff --git a/tribits/ctest_driver/TribitsCTestDriverCoreHelpers.cmake b/tribits/ctest_driver/TribitsCTestDriverCoreHelpers.cmake
index 196f74188..1d9e1a090 100644
--- a/tribits/ctest_driver/TribitsCTestDriverCoreHelpers.cmake
+++ b/tribits/ctest_driver/TribitsCTestDriverCoreHelpers.cmake
@@ -128,28 +128,6 @@ FUNCTION(TRIBITS_UPDATE_GIT_EXTRAREPO GIT_EXE EXTRAREPO_SRC_DIR)
ENDFUNCTION()
-
-
-
-#
-# Wrapper used for unit testing purposes
-#
-
-MACRO(EXTRAREPO_EXECUTE_PROCESS_WRAPPER)
- IF (NOT CTEST_DEPENDENCY_HANDLING_UNIT_TESTING)
- EXECUTE_PROCESS(${ARGN}
- RESULT_VARIABLE EXTRAREPO_EXECUTE_PROCESS_WRAPPER_RTN_VAL)
- IF (NOT EXTRAREPO_EXECUTE_PROCESS_WRAPPER_RTN_VAL STREQUAL "0")
- MESSAGE(SEND_ERROR
- "Error: EXECUTE_PROCESS(${ARGN}) returned"
- " '${EXTRAREPO_EXECUTE_PROCESS_WRAPPER_RTN_VAL}'")
- ENDIF()
- ELSE()
- MESSAGE("EXECUTE_PROCESS(${ARGN})")
- ENDIF()
-ENDMACRO()
-
-
#
# Update or clone a single extra repo
#
@@ -419,6 +397,8 @@ MACRO(ENABLE_USER_SELECTED_PACKAGES)
# ${PROJECT_NAME}_PACKAGES_USER_SELECTED
IF (NOT ${PROJECT_NAME}_PACKAGES_USER_SELECTED)
+ MESSAGE("Setting ${PROJECT_NAME}_ENABLE_ALL_PACKAGES=ON since"
+ " ${PROJECT_NAME}_PACKAGES_USER_SELECTED='${${PROJECT_NAME}_PACKAGES_USER_SELECTED}'")
SET(${PROJECT_NAME}_ENABLE_ALL_PACKAGES ON)
ELSE()
FOREACH(TRIBITS_PACKAGE ${${PROJECT_NAME}_PACKAGES_USER_SELECTED})
@@ -553,29 +533,68 @@ MACRO(ENABLE_ONLY_MODIFIED_PACKAGES)
#PRINT_VAR(${PROJECT_NAME}_ENABLE_${TRIBITS_PACKAGE})
ASSERT_DEFINED(${PROJECT_NAME}_ENABLE_${TRIBITS_PACKAGE})
IF ("${${PROJECT_NAME}_ENABLE_${TRIBITS_PACKAGE}}" STREQUAL "")
- MESSAGE("Enabling modified package: ${TRIBITS_PACKAGE}")
- SET(${PROJECT_NAME}_ENABLE_${TRIBITS_PACKAGE} ON)
+ IF (
+ ${TRIBITS_PACKAGE}_TESTGROUP STREQUAL "PT"
+ OR
+ (
+ ${TRIBITS_PACKAGE}_TESTGROUP STREQUAL "ST"
+ AND
+ ${PROJECT_NAME}_ENABLE_SECONDARY_TESTED_CODE
+ )
+ )
+ MESSAGE("Enabling modified package: ${TRIBITS_PACKAGE}")
+ SET(${PROJECT_NAME}_ENABLE_${TRIBITS_PACKAGE} ON)
+ ELSE()
+ MESSAGE("NOT enabling modified ST package: ${TRIBITS_PACKAGE}")
+ ENDIF()
ELSE()
MESSAGE("Not enabling explicitly disabled modified package: ${TRIBITS_PACKAGE}")
ENDIF()
ENDFOREACH()
- FOREACH(TRIBITS_PACKAGE ${FAILING_PACKAGES_LIST})
- IF ("${${PROJECT_NAME}_ENABLE_${TRIBITS_PACKAGE}}" STREQUAL "")
- MESSAGE("Enabling previously failing package: ${TRIBITS_PACKAGE}")
- SET(${PROJECT_NAME}_ENABLE_${TRIBITS_PACKAGE} ON)
- ELSE()
- MESSAGE("Not enabling explicitly disabled previously"
- " failing package: ${TRIBITS_PACKAGE}")
- ENDIF()
- ENDFOREACH()
+ IF (FAILING_PACKAGES_LIST STREQUAL "ALL_PACKAGES")
+ MESSAGE("Enabling previously failing ALL_PACKAGES")
+ SET(${PROJECT_NAME}_ENABLE_ALL_PACKAGES ON)
+ ELSE()
+ FOREACH(TRIBITS_PACKAGE ${FAILING_PACKAGES_LIST})
+ IF ("${${PROJECT_NAME}_ENABLE_${TRIBITS_PACKAGE}}" STREQUAL "")
+ IF (
+ ${TRIBITS_PACKAGE}_TESTGROUP STREQUAL "PT"
+ OR
+ (
+ ${TRIBITS_PACKAGE}_TESTGROUP STREQUAL "ST"
+ AND
+ ${PROJECT_NAME}_ENABLE_SECONDARY_TESTED_CODE
+ )
+ )
+ MESSAGE("Enabling previously failing package: ${TRIBITS_PACKAGE}")
+ SET(${PROJECT_NAME}_ENABLE_${TRIBITS_PACKAGE} ON)
+ ELSE()
+ MESSAGE("NOT enabling previously failing ST package: ${TRIBITS_PACKAGE}")
+ ENDIF()
+ ELSE()
+ MESSAGE("Not enabling explicitly disabled previously"
+ " failing package: ${TRIBITS_PACKAGE}")
+ ENDIF()
+ ENDFOREACH()
+ ENDIF()
#
# D) Print the final status
#
- TRIBITS_PRINT_ENABLED_SE_PACKAGE_LIST(
- "\nDirectly modified or failing non-disabled packages that need to be tested" ON FALSE)
+ IF (${PROJECT_NAME}_ENABLE_ALL_PACKAGES)
+ IF (NOT ${PROJECT_NAME}_CTEST_DO_ALL_AT_ONCE)
+ MESSAGE(FATAL_ERROR
+ "Error, failing 'ALL_PACKAGES' only allowed with all-at-once mode!")
+ ENDIF()
+ MESSAGE("\nDirectly modified or failing non-disabled packages that need"
+ " to be tested: ALL_PACKAGES")
+ ELSE()
+ TRIBITS_PRINT_ENABLED_SE_PACKAGE_LIST(
+ "\nDirectly modified or failing non-disabled packages that need to be tested"
+ ON FALSE )
+ ENDIF()
ENDMACRO()
@@ -600,9 +619,9 @@ ENDMACRO()
# Remove packages that are only implicitly enabled but don't have tests
# enabled.
#
-MACRO(SELECT_FINAL_SET_OF_PACKAGES_TO_PROCESS)
+MACRO(SELECT_FINAL_SET_OF_PACKAGES_TO_DIRECTLY_TEST)
- SET(${PROJECT_NAME}_PACKAGES_TO_PROCESS)
+ SET(${PROJECT_NAME}_PACKAGES_TO_DIRECTLY_TEST)
FOREACH(TRIBITS_PACKAGE ${${PROJECT_NAME}_PACKAGES})
@@ -619,13 +638,29 @@ MACRO(SELECT_FINAL_SET_OF_PACKAGES_TO_PROCESS)
ENDIF()
IF(PROCESS_THE_PACKAGE)
- APPEND_SET(${PROJECT_NAME}_PACKAGES_TO_PROCESS ${TRIBITS_PACKAGE})
+ APPEND_SET(${PROJECT_NAME}_PACKAGES_TO_DIRECTLY_TEST ${TRIBITS_PACKAGE})
ENDIF()
ENDFOREACH()
- SET(${PROJECT_NAME}_PACKAGES ${${PROJECT_NAME}_PACKAGES_TO_PROCESS})
+ENDMACRO()
+
+#
+# Set mapping of labels to subprojects (i.e. TriBITS packages) for CDash.
+#
+# NOTE: Unlike for the inner CMake configure, only subprojects that are
+# explicitly tested will be marked as a CDash subproject. This limits the
+# rows in CDash. This does not seem to be a problem for when running ctest
+# locally. When run locally, ctest will just report aggregated times for
+# subprojects that have 1 or more tests. Not true for CDash.
+#
+
+MACRO(TRIBITS_CTEST_DRIVER_SET_LABELS_TO_SUBPROJECTS_MAPPING)
+ SET(CTEST_LABELS_FOR_SUBPROJECTS)
+ FOREACH(TRIBITS_PACKAGE ${${PROJECT_NAME}_PACKAGES_TO_DIRECTLY_TEST})
+ LIST(APPEND CTEST_LABELS_FOR_SUBPROJECTS ${TRIBITS_PACKAGE})
+ ENDFOREACH()
ENDMACRO()
@@ -684,7 +719,7 @@ MACRO(REPORT_QUEUED_ERRORS)
IF ("${TRIBITS_CTEST_DRIVER_ERROR_QUEUE}" STREQUAL "")
MESSAGE("TRIBITS_CTEST_DRIVER_ERROR_QUEUE is empty. All is well.")
ELSE()
- MESSAGE("error: TRIBITS_CTEST_DRIVER_ERROR_QUEUE reports the following error message queue:")
+ MESSAGE("ERROR: TRIBITS_CTEST_DRIVER_ERROR_QUEUE reports the following error message queue:")
FOREACH(err_msg ${TRIBITS_CTEST_DRIVER_ERROR_QUEUE})
MESSAGE("${err_msg}")
ENDFOREACH()
@@ -779,3 +814,675 @@ MACRO(CTEST_UPDATE_WRAPPER)
SET(UPDATE_RETURN_VAL ${CTEST_UPDATE_RETURN_VAL})
ENDIF()
ENDMACRO()
+
+
+#
+# Helper macros to pass through common CMake configure arguments used by both
+# package-by-pacakge approach and all-at-once approach
+#
+
+MACRO(TRIBITS_FWD_CMAKE_CONFIG_ARGS_0)
+ SET( CONFIGURE_OPTIONS
+ "-D${PROJECT_NAME}_TRIBITS_DIR=${${PROJECT_NAME}_TRIBITS_DIR}"
+ "-DCTEST_USE_LAUNCHERS:BOOL=${CTEST_USE_LAUNCHERS}"
+ "-D${PROJECT_NAME}_ENABLE_ALL_OPTIONAL_PACKAGES:BOOL=ON"
+"-D${PROJECT_NAME}_WARNINGS_AS_ERRORS_FLAGS:STRING=${${PROJECT_NAME}_WARNINGS_AS_ERRORS_FLAGS}"
+ "-D${PROJECT_NAME}_ALLOW_NO_PACKAGES:BOOL=ON"
+ "-D${PROJECT_NAME}_DISABLE_ENABLED_FORWARD_DEP_PACKAGES=${${PROJECT_NAME}_DISABLE_ENABLED_FORWARD_DEP_PACKAGES}"
+ )
+ IF (NOT CTEST_GENERATE_DEPS_XML_OUTPUT_FILE)
+ LIST(APPEND CONFIGURE_OPTIONS
+ "-D${PROJECT_NAME}_DEPS_XML_OUTPUT_FILE:FILEPATH=")
+ ENDIF()
+ IF (NOT "${${PROJECT_NAME}_ENABLE_SECONDARY_TESTED_CODE}" STREQUAL "")
+ LIST(APPEND CONFIGURE_OPTIONS
+ "-D${PROJECT_NAME}_ENABLE_SECONDARY_TESTED_CODE:BOOL=${${PROJECT_NAME}_ENABLE_SECONDARY_TESTED_CODE}")
+ ENDIF()
+ IF (NOT MPI_EXEC_MAX_NUMPROCS STREQUAL 0)
+ LIST(APPEND CONFIGURE_OPTIONS
+ "-DMPI_EXEC_MAX_NUMPROCS:STRING=${MPI_EXEC_MAX_NUMPROCS}")
+ ENDIF()
+ IF (CTEST_DO_COVERAGE_TESTING)
+ LIST(APPEND CONFIGURE_OPTIONS
+ "-D${PROJECT_NAME}_ENABLE_COVERAGE_TESTING:BOOL=ON")
+ ENDIF()
+ IF (${PROJECT_NAME}_EXTRAREPOS_FILE STREQUAL "NONE")
+ SET(EXTRAREOS_FILE_PASSED "")
+ ELSE()
+ SET(EXTRAREOS_FILE_PASSED "${${PROJECT_NAME}_EXTRAREPOS_FILE}")
+ ENDIF()
+ LIST(APPEND CONFIGURE_OPTIONS
+ "-D${PROJECT_NAME}_EXTRAREPOS_FILE:STRING=${EXTRAREOS_FILE_PASSED}")
+ LIST(APPEND CONFIGURE_OPTIONS # See TRIBITS_SETUP_PACKAGES
+ "-D${PROJECT_NAME}_IGNORE_MISSING_EXTRA_REPOSITORIES:BOOL=ON")
+ LIST(APPEND CONFIGURE_OPTIONS
+ "-D${PROJECT_NAME}_ENABLE_KNOWN_EXTERNAL_REPOS_TYPE:STRING=${${PROJECT_NAME}_ENABLE_KNOWN_EXTERNAL_REPOS_TYPE}")
+ENDMACRO()
+
+
+MACRO(TRIBITS_FWD_CMAKE_CONFIG_ARGS_1)
+ SET(CONFIGURE_OPTIONS ${CONFIGURE_OPTIONS}
+ ${EXTRA_SYSTEM_CONFIGURE_OPTIONS} ${EXTRA_CONFIGURE_OPTIONS})
+ENDMACRO()
+
+
+# Remove the all of the LastTestsFailed*.log files so we can determine if any
+# tests have failed.
+MACRO(TRIBITS_REMOVE_LAST_TEST_FAILED_LOG_FILE)
+ # Remove the LastTestsFailed log so we can detect if there are any
+ # failed tests.
+ SET(TEST_TMP_DIR "${CTEST_BINARY_DIRECTORY}/Testing/Temporary")
+ SET(LAST_TESTS_FILED_LOG_FILE_GLOB "${TEST_TMP_DIR}/LastTestsFailed*.log")
+ FILE(GLOB logfiles "${LAST_TESTS_FILED_LOG_FILE_GLOB}")
+ FOREACH(logfile ${logfiles})
+ FILE(REMOVE "${logfile}")
+ ENDFOREACH()
+ENDMACRO()
+
+
+# Sets the var FAILED_TEST_LOG_FILE if the file is found
+MACRO(TRIBITS_FIND_LAST_TEST_FAILED_LOG_FILE)
+ FILE(GLOB FAILED_TEST_LOG_FILE "${LAST_TESTS_FILED_LOG_FILE_GLOB}")
+ENDMACRO()
+
+
+# Get names of failed packages from failed tests
+FUNCTION(TRIBITS_GET_FAILED_PACKAGES_FROM_FAILED_TESTS
+ LAST_TESTS_FAILED_FILE FAILED_PACKAGES_OUT
+ )
+ EXECUTE_PROCESS(
+ COMMAND ${PYTHON_EXECUTABLE}
+ "${${PROJECT_NAME}_TRIBITS_DIR}/ci_support/get-tribits-packages-from-last-tests-failed.py"
+ "--deps-xml-file=${CTEST_BINARY_DIRECTORY}/${${PROJECT_NAME}_PACKAGE_DEPS_XML_FILE_NAME}"
+ "--last-tests-failed-file=${LAST_TESTS_FAILED_FILE}"
+ OUTPUT_VARIABLE FAILED_PACKAGES
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+ )
+ SET(${FAILED_PACKAGES_OUT} "${FAILED_PACKAGES}" PARENT_SCOPE)
+ENDFUNCTION()
+
+
+#
+# Drive the configure, build, test, and submit package-by-package
+#
+# Sets ${PROJECT_NAME}_FAILED_PACKAGES as an indication if there are any
+# failures.
+#
+
+MACRO(TRIBITS_CTEST_PACKAGE_BY_PACKAGE)
+
+ MESSAGE(
+ "\n***"
+ "\n*** Loop through ${PROJECT_NAME} packages to configure, build, and test ..."
+ "\n***")
+
+ SET(${PROJECT_NAME}_LAST_CONFIGURED_PACKAGE)
+ SET(${PROJECT_NAME}_FAILED_LIB_BUILD_PACKAGES)
+ SET(PACKAGE_IDX 0)
+
+ FOREACH(TRIBITS_PACKAGE ${${PROJECT_NAME}_PACKAGES_TO_DIRECTLY_TEST})
+
+ MESSAGE("")
+ MESSAGE("${PACKAGE_IDX}) Processing current package ${TRIBITS_PACKAGE}:"
+ " libs='${${PROJECT_NAME}_ENABLE_${TRIBITS_PACKAGE}}',"
+ " tests='${${TRIBITS_PACKAGE}_ENABLE_TESTS}'")
+ MESSAGE("")
+
+ SET_PROPERTY(GLOBAL PROPERTY SubProject ${TRIBITS_PACKAGE})
+ SET_PROPERTY(GLOBAL PROPERTY Label ${TRIBITS_PACKAGE})
+
+ #
+ # A) Configure the package and its dependent packages
+ #
+
+ MESSAGE("Configuring TRIBITS_PACKAGE='${TRIBITS_PACKAGE}'")
+
+ # Create CONFIGURE_OPTIONS for this TRIBITS_PACKAGE
+ TRIBITS_FWD_CMAKE_CONFIG_ARGS_0()
+ LIST(APPEND CONFIGURE_OPTIONS
+ "-D${PROJECT_NAME}_ENABLE_TESTS:BOOL=${${TRIBITS_PACKAGE}_ENABLE_TESTS}")
+ IF (DEFINED ${PROJECT_NAME}_LAST_CONFIGURED_PACKAGE)
+ LIST(APPEND CONFIGURE_OPTIONS
+ "-D${PROJECT_NAME}_ENABLE_${${PROJECT_NAME}_LAST_CONFIGURED_PACKAGE}:BOOL=")
+ SET(${PROJECT_NAME}_LAST_CONFIGURED_PACKAGE)
+ ENDIF()
+ FOREACH(FAILED_PACKAGE ${${PROJECT_NAME}_FAILED_LIB_BUILD_PACKAGES})
+ LIST(APPEND CONFIGURE_OPTIONS
+ "-D${PROJECT_NAME}_ENABLE_${FAILED_PACKAGE}:BOOL=OFF")
+ ENDFOREACH()
+ TRIBITS_FWD_CMAKE_CONFIG_ARGS_1()
+ LIST(APPEND CONFIGURE_OPTIONS # Package enable must be at the very end to override other stuff!
+ "-D${PROJECT_NAME}_ENABLE_${TRIBITS_PACKAGE}:BOOL=ON" )
+ MESSAGE("\nCONFIGURE_OPTIONS = '${CONFIGURE_OPTIONS}'")
+
+ # Remember this package so we can set its enable to "" next time
+ SET(${PROJECT_NAME}_LAST_CONFIGURED_PACKAGE "${TRIBITS_PACKAGE}")
+
+ #
+ # B) Configure the package and its dependent packages
+ #
+
+ IF (NOT CTEST_DEPENDENCY_HANDLING_UNIT_TESTING)
+
+ CTEST_CONFIGURE(
+ BUILD "${CTEST_BINARY_DIRECTORY}"
+ OPTIONS "${CONFIGURE_OPTIONS}" # New option!
+ RETURN_VALUE CONFIGURE_RETURN_VAL
+ )
+
+ MESSAGE("Generating the file '${CMAKE_CACHE_CLEAN_FILE}' ...")
+ TRIBITS_STRIP_COMMENTS_FROM_CMAKE_CACHE_FILE(
+ "${CTEST_BINARY_DIRECTORY}/CMakeCache.txt"
+ "${CMAKE_CACHE_CLEAN_FILE}"
+ )
+
+ # If the configure failed, add the package to the list
+ # of failed packages
+ IF (NOT "${CONFIGURE_RETURN_VAL}" EQUAL "0")
+ MESSAGE("${TRIBITS_PACKAGE} FAILED to configure")
+ LIST(APPEND ${PROJECT_NAME}_FAILED_LIB_BUILD_PACKAGES ${TRIBITS_PACKAGE})
+ LIST(APPEND ${PROJECT_NAME}_FAILED_PACKAGES ${TRIBITS_PACKAGE})
+ ELSE()
+ MESSAGE("${TRIBITS_PACKAGE}: Configure passed!")
+ # load target properties and test keywords
+ CTEST_READ_CUSTOM_FILES(BUILD "${CTEST_BINARY_DIRECTORY}")
+ # Overridde from this file!
+ INCLUDE("${TRIBITS_PROJECT_ROOT}/CTestConfig.cmake")
+ ENDIF()
+
+ IF (EXISTS ${CMAKE_CACHE_CLEAN_FILE})
+ SET(CTEST_NOTES_FILES "${CTEST_NOTES_FILES_WO_CACHE};${CMAKE_CACHE_CLEAN_FILE}")
+ ELSE()
+ SET(CTEST_NOTES_FILES "${CTEST_NOTES_FILES_WO_CACHE}")
+ ENDIF()
+
+ SET(REPO_VERSION_FILE "${CTEST_BINARY_DIRECTORY}/${PROJECT_NAME}RepoVersion.txt")
+ IF (EXISTS "${REPO_VERSION_FILE}")
+ SET(CTEST_NOTES_FILES "${REPO_VERSION_FILE};${CTEST_NOTES_FILES}")
+ ENDIF()
+
+ PRINT_VAR(CTEST_NOTES_FILES)
+
+ # Submit configure results and the notes to the dashboard
+ IF (CTEST_DO_SUBMIT)
+ MESSAGE("\nSubmitting configure and notes ...")
+ TRIBITS_CTEST_SUBMIT( PARTS configure notes )
+ ENDIF()
+
+ ENDIF()
+
+ #
+ # C) If configure passed then try the build. Otherwise, move on to
+ # to the next package.
+ #
+
+ IF ("${CONFIGURE_RETURN_VAL}" EQUAL "0" AND
+ NOT CTEST_DEPENDENCY_HANDLING_UNIT_TESTING AND
+ NOT CTEST_CONFIGURATION_UNIT_TESTING
+ )
+
+ # Start by trying to build just the libraries for the current package
+
+ SET( CTEST_BUILD_TARGET ${TRIBITS_PACKAGE}_libs )
+ MESSAGE("\nBuilding target: '${CTEST_BUILD_TARGET}' ...\n")
+ CTEST_BUILD(
+ BUILD "${CTEST_BINARY_DIRECTORY}"
+ RETURN_VALUE BUILD_LIBS_RETURN_VAL
+ NUMBER_ERRORS BUILD_LIBS_NUM_ERRORS
+ APPEND
+ )
+ MESSAGE("Build return: RETURN_VALUE=${BUILD_LIBS_RETURN_VAL},"
+ " NUMBER_ERRORS=${BUILD_LIBS_NUM_ERRORS}")
+
+ # Determine if the build failed or not.
+
+ SET(BUILD_LIBS_SUCCESS FALSE)
+ IF ("${BUILD_LIBS_NUM_ERRORS}" EQUAL "0")
+ MESSAGE("${TRIBITS_PACKAGE}: Libs build passed!")
+ SET(BUILD_LIBS_SUCCESS TRUE)
+ ENDIF()
+ # Above: Since make -i is used BUILD_LIBS_RETURN_VAL might be 0, but
+ # if there are errors the build should fail, so both
+ # BUILD_LIBS_RETURN_VAL and BUILD_LIBS_NUM_ERRORS should be 0 for a
+ # good build and for the all target to be built.
+
+ # Submit the library build results to the dashboard
+
+ IF (CTEST_DO_SUBMIT)
+ TRIBITS_CTEST_SUBMIT( PARTS build )
+ ENDIF()
+
+ # If the build of the libraries passed, then go on the build
+ # the tests/examples and run them.
+
+ IF (BUILD_LIBS_SUCCESS)
+
+ SET(BUILD_OR_TEST_FAILED FALSE)
+
+ # Build the ALL target, but append the results to the last build.xml
+ SET(CTEST_BUILD_TARGET)
+ MESSAGE("\nBuild ALL target for '${TRIBITS_PACKAGE}' ...\n")
+ CTEST_BUILD(
+ BUILD "${CTEST_BINARY_DIRECTORY}"
+ RETURN_VALUE BUILD_ALL_RETURN_VAL
+ NUMBER_ERRORS BUILD_ALL_NUM_ERRORS
+ APPEND
+ )
+ MESSAGE("Build all: BUILD_ALL_NUM_ERRORS='${BUILD_ALL_NUM_ERRORS}',"
+ "BUILD_ALL_RETURN_VAL='${BUILD_ALL_RETURN_VAL}'" )
+
+ IF (NOT "${BUILD_ALL_NUM_ERRORS}" EQUAL "0")
+ MESSAGE("${TRIBITS_PACKAGE}: All build FAILED!")
+ SET(BUILD_OR_TEST_FAILED TRUE)
+ ELSE()
+ MESSAGE("${TRIBITS_PACKAGE}: All build passed!")
+ ENDIF()
+
+ # Submit the build for all target
+ IF (CTEST_DO_SUBMIT)
+ TRIBITS_CTEST_SUBMIT( PARTS build )
+ ENDIF()
+
+ IF (CTEST_DO_TEST)
+
+ TRIBITS_REMOVE_LAST_TEST_FAILED_LOG_FILE()
+ # Run the tests that match the ${TRIBITS_PACKAGE} name
+ MESSAGE("\nRunning test for package '${TRIBITS_PACKAGE}'"
+ " (parallel level ${CTEST_PARALLEL_LEVEL}) ...\n")
+ CTEST_TEST(
+ BUILD "${CTEST_BINARY_DIRECTORY}"
+ PARALLEL_LEVEL "${CTEST_PARALLEL_LEVEL}"
+ INCLUDE_LABEL "^${TRIBITS_PACKAGE}$"
+ #NUMBER_FAILED TEST_NUM_FAILED
+ )
+ # See if a 'LastTestsFailed*.log' file exists to determine if there
+ # are failed tests
+ TRIBITS_FIND_LAST_TEST_FAILED_LOG_FILE()
+ IF (FAILED_TEST_LOG_FILE)
+ MESSAGE("${TRIBITS_PACKAGE}: File '${FAILED_TEST_LOG_FILE}'"
+ " exists so there were failed tests!")
+ SET(BUILD_OR_TEST_FAILED TRUE)
+ ENDIF()
+ # 2009/12/05: ToDo: We need to add an argument to CTEST_TEST(...)
+ # called something like 'NUMBER_FAILED numFailedTests' to allow us
+ # to detect when the tests have filed.
+ #IF (TEST_NUM_FAILED GREATER 0)
+ # SET(BUILD_OR_TEST_FAILED TRUE)
+ #ENDIF()
+ IF (CTEST_DO_SUBMIT)
+ TRIBITS_CTEST_SUBMIT( PARTS Test )
+ ENDIF()
+ ENDIF()
+
+ IF (CTEST_DO_COVERAGE_TESTING)
+ MESSAGE("\nRunning coverage for package '${TRIBITS_PACKAGE}' ...\n")
+ CTEST_COVERAGE(
+ BUILD "${CTEST_BINARY_DIRECTORY}"
+ LABELS ${TRIBITS_PACKAGE} ${TRIBITS_PACKAGE}Libs ${TRIBITS_PACKAGE}Exes
+ )
+ IF (CTEST_DO_SUBMIT)
+ TRIBITS_CTEST_SUBMIT( PARTS Coverage )
+ ENDIF()
+ ENDIF()
+
+ IF (CTEST_DO_MEMORY_TESTING)
+ MESSAGE("\nRunning memory testing for package '${TRIBITS_PACKAGE}' ...\n")
+ PRINT_VAR(CTEST_MEMORYCHECK_COMMAND)
+ PRINT_VAR(CTEST_MEMORYCHECK_COMMAND_OPTIONS)
+ PRINT_VAR(CTEST_MEMORYCHECK_SUPPRESSIONS_FILE)
+ CTEST_MEMCHECK(
+ BUILD "${CTEST_BINARY_DIRECTORY}"
+ PARALLEL_LEVEL "${CTEST_PARALLEL_LEVEL}"
+ INCLUDE_LABEL "^${TRIBITS_PACKAGE}$")
+ IF (CTEST_DO_SUBMIT)
+ TRIBITS_CTEST_SUBMIT( PARTS MemCheck )
+ ENDIF()
+ ENDIF()
+
+ IF (BUILD_OR_TEST_FAILED)
+ LIST(APPEND ${PROJECT_NAME}_FAILED_PACKAGES ${TRIBITS_PACKAGE})
+ ENDIF()
+
+ ELSE()
+
+ MESSAGE("FAILED library build for package '${TRIBITS_PACKAGE}'")
+ LIST(APPEND ${PROJECT_NAME}_FAILED_LIB_BUILD_PACKAGES ${TRIBITS_PACKAGE})
+ LIST(APPEND ${PROJECT_NAME}_FAILED_PACKAGES ${TRIBITS_PACKAGE})
+
+ ENDIF()
+
+ ENDIF()
+
+ IF (CTEST_DO_SUBMIT)
+ MESSAGE("\nSubmit the update file that will trigger the notification email ...\n")
+ TRIBITS_CTEST_SUBMIT( PARTS update )
+ ENDIF()
+
+ MATH(EXPR PACKAGE_IDX "${PACKAGE_IDX}+1")
+
+ ENDFOREACH(TRIBITS_PACKAGE)
+
+ IF(${PROJECT_NAME}_FAILED_LIB_BUILD_PACKAGES)
+ MESSAGE(
+ "\nFinal set packages that failed to configure or have the libraries build:"
+ " '${${PROJECT_NAME}_FAILED_LIB_BUILD_PACKAGES}'")
+ ENDIF()
+
+ MESSAGE("\nDone with the incremental building and testing of ${PROJECT_NAME} packages!\n")
+
+ENDMACRO()
+
+
+#
+# Drive the configure, build, test, and submit all at once for all of the
+# enabled packages.
+#
+# Sets ${PROJECT_NAME}_FAILED_PACKAGES as an indication if there are any
+# failures.
+#
+
+MACRO(TRIBITS_CTEST_ALL_AT_ONCE)
+
+ MESSAGE(
+ "\n***"
+ "\n*** Configure, build, test and submit results all-at-once for all enabled packages ..."
+ "\n***")
+
+ #
+ # A) Define mapping from labels to subprojects and gather configure arguments
+ #
+
+ TRIBITS_CTEST_DRIVER_SET_LABELS_TO_SUBPROJECTS_MAPPING()
+ PRINT_VAR(CTEST_LABELS_FOR_SUBPROJECTS)
+
+ MESSAGE("")
+ MESSAGE("Configuring ...")
+ MESSAGE("")
+
+ # Create CONFIGURE_OPTIONS
+ TRIBITS_FWD_CMAKE_CONFIG_ARGS_0()
+ IF (${PROJECT_NAME}_CTEST_USE_NEW_AAO_FEATURES)
+ LIST(APPEND CONFIGURE_OPTIONS
+ "-D${PROJECT_NAME}_CTEST_USE_NEW_AAO_FEATURES:BOOL=TRUE" )
+ ENDIF()
+ IF (${PROJECT_NAME}_ENABLE_ALL_PACKAGES)
+ LIST(APPEND CONFIGURE_OPTIONS
+ "-D${PROJECT_NAME}_ENABLE_ALL_PACKAGES=ON"
+ )
+ ELSE()
+ FOREACH(TRIBITS_PACKAGE ${${PROJECT_NAME}_PACKAGES_TO_DIRECTLY_TEST})
+ LIST(APPEND CONFIGURE_OPTIONS
+ "-D${PROJECT_NAME}_ENABLE_${TRIBITS_PACKAGE}=ON"
+ )
+ ENDFOREACH()
+ ENDIF()
+ LIST(APPEND CONFIGURE_OPTIONS
+ "-D${PROJECT_NAME}_ENABLE_TESTS:BOOL=ON")
+ TRIBITS_FWD_CMAKE_CONFIG_ARGS_1()
+ MESSAGE("\nCONFIGURE_OPTIONS = '${CONFIGURE_OPTIONS}'")
+
+ #
+ # B) Configure the package and its dependent packages
+ #
+
+ IF (CTEST_DEPENDENCY_HANDLING_UNIT_TESTING)
+
+ MESSAGE("Skipping actual ctest_configure() because"
+ " CTEST_DEPENDENCY_HANDLING_UNIT_TESTING='${CTEST_DEPENDENCY_HANDLING_UNIT_TESTING}'!"
+ )
+ SET(AAO_CONFIGURE_PASSED TRUE)
+
+ ELSE()
+
+ CTEST_CONFIGURE(
+ BUILD "${CTEST_BINARY_DIRECTORY}"
+ OPTIONS "${CONFIGURE_OPTIONS}" # New option!
+ RETURN_VALUE CONFIGURE_RETURN_VAL
+ )
+
+ MESSAGE("Generating the file '${CMAKE_CACHE_CLEAN_FILE}' ...")
+ TRIBITS_STRIP_COMMENTS_FROM_CMAKE_CACHE_FILE(
+ "${CTEST_BINARY_DIRECTORY}/CMakeCache.txt"
+ "${CMAKE_CACHE_CLEAN_FILE}"
+ )
+
+ IF (NOT "${CONFIGURE_RETURN_VAL}" EQUAL "0")
+ MESSAGE("Configure FAILED!")
+ SET(AAO_CONFIGURE_PASSED FALSE)
+ ELSE()
+ MESSAGE("Configure PASSED!")
+ SET(AAO_CONFIGURE_PASSED TRUE)
+ # Load target properties and test keywords
+ CTEST_READ_CUSTOM_FILES(BUILD "${CTEST_BINARY_DIRECTORY}")
+ # Overridde from this file!
+ INCLUDE("${TRIBITS_PROJECT_ROOT}/CTestConfig.cmake")
+ ENDIF()
+
+ SET(CTEST_NOTES_FILES "${CTEST_NOTES_FILES_WO_CACHE}")
+
+ IF (EXISTS ${CMAKE_CACHE_CLEAN_FILE})
+ LIST(APPEND CTEST_NOTES_FILES "${CMAKE_CACHE_CLEAN_FILE}")
+ ENDIF()
+
+ SET(REPO_VERSION_FILE "${CTEST_BINARY_DIRECTORY}/${PROJECT_NAME}RepoVersion.txt")
+ IF (EXISTS "${REPO_VERSION_FILE}")
+ LIST(APPEND CTEST_NOTES_FILES "${REPO_VERSION_FILE}")
+ ENDIF()
+
+ PRINT_VAR(CTEST_NOTES_FILES)
+
+ # Submit configure results and the notes to the dashboard
+ IF (CTEST_DO_SUBMIT)
+ MESSAGE("\nSubmitting configure and notes ...")
+ TRIBITS_CTEST_SUBMIT( PARTS configure notes )
+ ENDIF()
+
+ ENDIF()
+
+ #
+ # C) Do the build
+ #
+
+ IF (CTEST_DEPENDENCY_HANDLING_UNIT_TESTING AND AAO_CONFIGURE_PASSED)
+
+ MESSAGE("Skipping build because"
+ " CTEST_DEPENDENCY_HANDLING_UNIT_TESTING='${CTEST_DEPENDENCY_HANDLING_UNIT_TESTING}'!"
+ )
+
+ ELSEIF (AAO_CONFIGURE_PASSED)
+
+ MESSAGE("")
+ MESSAGE("Building all targets ...")
+ MESSAGE("")
+
+ CTEST_BUILD(
+ BUILD "${CTEST_BINARY_DIRECTORY}"
+ RETURN_VALUE BUILD_ALL_RETURN_VAL
+ NUMBER_ERRORS BUILD_ALL_NUM_ERRORS
+ )
+ MESSAGE("Build output: BUILD_ALL_NUM_ERRORS='${BUILD_ALL_NUM_ERRORS}',"
+ "BUILD_ALL_RETURN_VAL='${BUILD_ALL_RETURN_VAL}'" )
+
+ IF (NOT "${BUILD_ALL_NUM_ERRORS}" EQUAL "0")
+ MESSAGE("Build FAILED!")
+ ELSE()
+ MESSAGE("Build PASSED!")
+ ENDIF()
+
+ # Submit the build for all target
+ IF (CTEST_DO_SUBMIT)
+ TRIBITS_CTEST_SUBMIT( PARTS build )
+ ENDIF()
+
+ ELSE()
+
+ MESSAGE("")
+ MESSAGE("Skipping build because configure failed!")
+ MESSAGE("")
+
+ ENDIF()
+
+ #
+ # D) Run tests
+ #
+
+ IF (NOT CTEST_DO_TEST)
+
+ MESSAGE("")
+ MESSAGE("Skipping tests because CTEST_DO_TEST='${CTEST_DO_TEST}'!")
+ MESSAGE("")
+
+ ELSEIF (NOT AAO_CONFIGURE_PASSED)
+
+ MESSAGE("")
+ MESSAGE("Skipping tests because configure failed!")
+ MESSAGE("")
+
+ ELSEIF (CTEST_DEPENDENCY_HANDLING_UNIT_TESTING AND AAO_CONFIGURE_PASSED)
+
+ MESSAGE("Skipping testing because"
+ " CTEST_DEPENDENCY_HANDLING_UNIT_TESTING='${CTEST_DEPENDENCY_HANDLING_UNIT_TESTING}'!"
+ )
+
+ ELSE()
+
+ # NOTE: We always run the tests if the configure passed no matter if there
+ # are build failures because the only way that we can detect what packages
+ # have build failures is to see what packages have test failures.
+
+ TRIBITS_REMOVE_LAST_TEST_FAILED_LOG_FILE()
+
+ # Run the tests
+ MESSAGE("")
+ MESSAGE("\nRunning tests (parallel level ${CTEST_PARALLEL_LEVEL}) ...\n")
+ MESSAGE("")
+
+ CTEST_TEST(
+ BUILD "${CTEST_BINARY_DIRECTORY}"
+ PARALLEL_LEVEL "${CTEST_PARALLEL_LEVEL}"
+ )
+
+ # See if a 'LastTestsFailed*.log' file exists to determine if there are
+ # failed tests.
+ TRIBITS_FIND_LAST_TEST_FAILED_LOG_FILE()
+ IF (FAILED_TEST_LOG_FILE)
+ MESSAGE("File '${FAILED_TEST_LOG_FILE}' exists so there were non-passing tests!")
+ SET(BUILD_OR_TEST_FAILED TRUE)
+ ELSE()
+ MESSAGE("File '${FAILED_TEST_LOG_FILE}' does NOT exist so all tests passed!")
+ ENDIF()
+
+ IF (CTEST_DO_SUBMIT)
+ TRIBITS_CTEST_SUBMIT( PARTS Test )
+ ENDIF()
+
+ ENDIF()
+
+ #
+ # E) Gather coverage results
+ #
+
+ IF (NOT CTEST_DO_COVERAGE_TESTING)
+
+ MESSAGE("")
+ MESSAGE("Skipping converage tests because CTEST_DO_COVERAGE_TESTING='${CTEST_DO_COVERAGE_TESTING}'!")
+ MESSAGE("")
+
+ ELSEIF (NOT AAO_CONFIGURE_PASSED)
+
+ MESSAGE("")
+ MESSAGE("Skipping coverage tests because configure failed!")
+ MESSAGE("")
+
+ ELSEIF (CTEST_DEPENDENCY_HANDLING_UNIT_TESTING AND AAO_CONFIGURE_PASSED)
+
+ MESSAGE("Skipping coverage testing because"
+ " CTEST_DEPENDENCY_HANDLING_UNIT_TESTING='${CTEST_DEPENDENCY_HANDLING_UNIT_TESTING}'!"
+ )
+
+ ELSE()
+
+ # NOTE: We always gather the coverage results if the configure passed
+ # independent if there was any build or test failures. The coverage stats
+ # may not be very valid if there are build or test failures but there is
+ # no harm and showing the coverage based on tests that actually run (even
+ # if they fail).
+
+ MESSAGE("\nGathering coverage results ...\n")
+ CTEST_COVERAGE(
+ BUILD "${CTEST_BINARY_DIRECTORY}"
+ )
+ IF (CTEST_DO_SUBMIT)
+ TRIBITS_CTEST_SUBMIT( PARTS Coverage )
+ ENDIF()
+
+ ENDIF()
+
+ #
+ # F) Do memory testing
+ #
+
+ IF (NOT CTEST_DO_MEMORY_TESTING)
+
+ MESSAGE("")
+ MESSAGE("Skipping memory testing because CTEST_DO_MEMORY_TESTING='${CTEST_DO_MEMORY_TESTING}'!")
+ MESSAGE("")
+
+ ELSEIF (NOT AAO_CONFIGURE_PASSED)
+
+ MESSAGE("")
+ MESSAGE("Skipping memory tests because configure failed!")
+ MESSAGE("")
+
+ ELSEIF (CTEST_DEPENDENCY_HANDLING_UNIT_TESTING AND AAO_CONFIGURE_PASSED)
+
+ MESSAGE("Skipping memory testing because"
+ " CTEST_DEPENDENCY_HANDLING_UNIT_TESTING='${CTEST_DEPENDENCY_HANDLING_UNIT_TESTING}'!"
+ )
+
+ ELSE()
+
+ # NOTE: We always gather the memory results if the configure passed
+ # independent if there was any build or test failures. The memory stats
+ # may not be very valid if there are build or test failures but there is
+ # no harm and showing the memory based on tests that actually run (even
+ # if they fail).
+
+ MESSAGE("\nRunning memory tests ...\n")
+ PRINT_VAR(CTEST_MEMORYCHECK_COMMAND)
+ PRINT_VAR(CTEST_MEMORYCHECK_COMMAND_OPTIONS)
+ PRINT_VAR(CTEST_MEMORYCHECK_SUPPRESSIONS_FILE)
+ CTEST_MEMCHECK(
+ BUILD "${CTEST_BINARY_DIRECTORY}"
+ )
+ IF (CTEST_DO_SUBMIT)
+ TRIBITS_CTEST_SUBMIT( PARTS MemCheck )
+ ENDIF()
+
+ ENDIF()
+
+ #
+ # G) Determine final pass/fail by gathering list of failing packages
+ #
+
+ IF (NOT AAO_CONFIGURE_PASSED)
+ IF (${PROJECT_NAME}_ENABLE_ALL_PACKAGES)
+ # Special value "ALL_PACAKGES" so that it will trigger enabling all
+ # packages on the next CI iteration!
+ SET(${PROJECT_NAME}_FAILED_PACKAGES ALL_PACKAGES)
+ ELSE()
+ # Specific packages were selected to be tested so fail all of them!
+ SET(${PROJECT_NAME}_FAILED_PACKAGES ${${PROJECT_NAME}_PACKAGES_TO_DIRECTLY_TEST})
+ ENDIF()
+ ELSEIF (FAILED_TEST_LOG_FILE)
+ TRIBITS_GET_FAILED_PACKAGES_FROM_FAILED_TESTS("${FAILED_TEST_LOG_FILE}"
+ ${PROJECT_NAME}_FAILED_PACKAGES )
+ ELSE()
+ # If no tests failed, then there are no failed packages!
+ SET(${PROJECT_NAME}_FAILED_PACKAGES)
+ ENDIF()
+ # ToDo: Optionally determine pass/fail based
+
+ MESSAGE("\nDone with the all-at-once configure, build, test, ans submit of ${PROJECT_NAME} packages!\n")
+
+ENDMACRO()
diff --git a/tribits/dashboard_driver/TribitsDriverSupport.cmake b/tribits/dashboard_driver/TribitsDriverSupport.cmake
index 883750d31..a0b225898 100644
--- a/tribits/dashboard_driver/TribitsDriverSupport.cmake
+++ b/tribits/dashboard_driver/TribitsDriverSupport.cmake
@@ -38,7 +38,7 @@
# @HEADER
INCLUDE(GetCurrentListDir)
-INCLUDE(ParseVariableArguments)
+INCLUDE(CMakeParseArguments)
INCLUDE(SetDefaultAndFromEnv)
# Set if the inner CMake installs are performed or not
@@ -145,17 +145,15 @@ function(TRIBITS_DRIVER_ADD_DASHBOARD testname scriptname)
MESSAGE("TRIBITS_DRIVER_ADD_DASHBOARD: '${testname}' '${scriptname}' [${ARGN}]")
- # Uncomment this line to see output of below PARSE_ARGUMENTS:
- #
- #set(PARSE_ARGUMENTS_DUMP_OUTPUT_ENABLED TRUE)
-
- PARSE_ARGUMENTS(
+ CMAKE_PARSE_ARGUMENTS(
# prefix
PARSE
- # args
- "CTEST_INSTALLER_TYPE;ENVIRONMENT;TIMEOUT_MINUTES;DEPENDS;REQUIRED_FILES"
# options
"RUN_SERIAL"
+ # one_value_keywords
+ ""
+ # multi_value_keywords
+ "CTEST_INSTALLER_TYPE;ENVIRONMENT;TIMEOUT_MINUTES;DEPENDS;REQUIRED_FILES"
# the stuff to parse:
${ARGN}
)
diff --git a/tribits/doc/build_ref/TribitsBuildReferenceBody.rst b/tribits/doc/build_ref/TribitsBuildReferenceBody.rst
index e033beb41..fc66e5423 100644
--- a/tribits/doc/build_ref/TribitsBuildReferenceBody.rst
+++ b/tribits/doc/build_ref/TribitsBuildReferenceBody.rst
@@ -6,6 +6,7 @@
.. _TRIBITS_TPL_FIND_INCLUDE_DIRS_AND_LIBRARIES(): https://tribits.org/doc/TribitsDevelopersGuide.html#tribits-tpl-find-include-dirs-and-libraries
+.. _TRIBITS_CTEST_DRIVER(): https://tribits.org/doc/TribitsDevelopersGuide.html#tribits-ctest-driver
Getting set up to use CMake
@@ -29,21 +30,25 @@ recommended) from:
Installing CMake from source [developers and experienced users]
---------------------------------------------------------------
-If you have access to the git repositories, then install CMake with::
+If you have access to the git repositories (which which includes a
+snapshot of TriBITS), then install CMake with::
- $ $TRIBITS_BASE_DIR/python/install-cmake.py \
+ $ cd /
+ $ export TRIBITS_BASE_DIR=/cmake/tribits
+ $ $TRIBITS_BASE_DIR/devtools_install/install-cmake.py \
--install-dir= \
--do-all
This will result in cmake and related CMake tools being installed in
-/bin.
+``/bin/`` (see the instructions printed at the end on how to
+update your ``PATH`` env var).
-Getting help for installing CMake with this script::
+To get help for installing CMake with this script use::
- $ $TRIBITS_BASE_DIR/python/install-cmake.py --help
+ $ $TRIBITS_BASE_DIR/devtools_install/install-cmake.py --help
NOTE: you will want to read the help message about how to use sudo to
-install in a privileged location (like the default /usr/local/bin).
+install in a privileged location (like the default ``/usr/local/bin``).
Getting CMake Help
@@ -133,7 +138,7 @@ a) Create a 'do-configure' script such as [Recommended]::
NOTE: If one has already configured once and one needs to configure from
scratch (needs to wipe clean defaults for cache variables, updates
compilers, other types of changes) then one will want to delete the local
- CASL and other CMake-generated files before configuring again (see
+ CMakeCache.txt and other CMake-generated files before configuring again (see
`Reconfiguring completely from scratch`_).
.. __CONFIGURE_OPTIONS_FILE:
@@ -150,41 +155,74 @@ b) Create a CMake file fragment and point to it [Recommended].
$EXTRA_ARGS \
${SOURCE_BASE}
- where MyConfigureOptions.cmake might look like::
+ where MyConfigureOptions.cmake (in the current working directory) might look
+ like::
- SET(CMAKE_BUILD_TYPE DEBUG CACHE STRING "")
- SET(_ENABLE_CHECKED_STL ON CACHE BOOL "")
- SET(BUILD_SHARED_LIBS ON CACHE BOOL "")
+ SET(CMAKE_BUILD_TYPE DEBUG CACHE STRING "Set in MyConfigureOptions.cmake")
+ SET(_ENABLE_CHECKED_STL ON CACHE BOOL "Set in MyConfigureOptions.cmake")
+ SET(BUILD_SHARED_LIBS ON CACHE BOOL "Set in MyConfigureOptions.cmake")
...
Using a configuration fragment file allows for better reuse of configure
options across different configure scripts and better version control of
- configure options. Also, when this file changes, CMake will automatically
+ configure options. Using the comment "Set in MyConfigureOptions.cmake"
+ makes it easy see where that variable got set when looking an the
+ CMakeCache.txt file. Also, when this file changes, CMake will automatically
trigger a reconfgure during a make (because it knows about the file and will
check its time stamp).
- NOTE: You can actually pass in a list of configuration fragment files
- which will be read in the order they are given.
-
- NOTE: You can use the ``FORCE`` option in the ``SET()`` shown above and that
- will override any value of the options that might already be set. However,
- that will not allow the user to override the options on the CMake
- comamndline using ``-D=`` so it is generally desired to use
+ One can use the ``FORCE`` option in the ``SET()`` shown above and that will
+ override any value of the options that might already be set. However, that
+ will not allow the user to override the options on the CMake comamndline
+ using ``-D=`` so it is generally **not** desired to use
``FORCE``.
-c) Using ccmake to configure
+ One can actually pass in a list of configuration fragment files separated by
+ ''","'' which will be read in the order they are given::
- ::
+ -D _CONFIGURE_OPTIONS_FILE=,,...
+
+ One can read in configure option files under the project source directory by
+ using the type ``STRING`` such as with::
+
+ -D _CONFIGURE_OPTIONS_FILE:STRING=cmake/MpiConfig1.cmake
+
+ In this case, the relative paths will be with respect to the project base
+ source directory, not the current working directroy. (By specifying the
+ type ``STRING``, one turns off CMake interpretation as a ``FILEPATH``.
+ Otherwise, the type ``FILEPATH`` causes CMake to always interpret relative
+ paths with respect to the current working directory and set the absolute
+ path).
+
+ Note that a CMake options file can also be read in with::
- $ ccmake $SOURCE_BASE
+ cmake -C MyConfigureOptions.cmake [other options] ${SOURCE_BASE}
-d) Using the QT CMake configuration GUI:
+ However, the advantages of using ``_CONFIGURE_OPTIONS_FILE`` are:
+
+ 1) One can use ``-D_CONFIGURE_OPTIONS_FILE:STRING=`` to
+ use a relative path w.r.t. to the source tree to make it easier to point to
+ options files in the project source. Using ``cmake -C`` would require
+ having to give the absolute path or a longer relative path from the build
+ directory back to the source directory.
+
+ 2) ``_CONFIGURE_OPTIONS_FILE`` accepts a list of files where
+ ``cmake -C`` only accepts a single file. That saves from having to create
+ another dummy ``*.cmake`` file that just includes the others.
+
+ 3) One can create and use parameterized ``*.cmake`` files that can be used
+ with multiple TriBITS projects. For example, one can have set statements
+ like ``SET(${PROJECT_NAME}_ENABLE_Fortran OFF ...)`` since ``PROJECT_NAME``
+ is known before the file is included. One can't do that with ``cmake -C``
+ and instead would have to the full variables names.
+
+c) Using the QT CMake configuration GUI:
On systems where the QT CMake GUI is installed (e.g. Windows) the CMake GUI
- can be a nice way to configure if you are a user. To make your
- configuration easily repeatable, you might want to create a fragment file
- and just load it by setting `_CONFIGURE_OPTIONS_FILE`_ (see above)
- in the GUI.
+ can be a nice way to configure (or just explore options) if you
+ are a user. To make your configuration easily repeatable, you might want to
+ create a fragment file and just load it by setting
+ `_CONFIGURE_OPTIONS_FILE`_ (see above) in the GUI.
Selecting the list of packages to enable
----------------------------------------
@@ -232,16 +270,39 @@ for ``_SE_PACKAGES`` using, for example::
Print package dependencies
++++++++++++++++++++++++++
-The set of package dependencies in a project will be printed in the ``cmake``
-STDOUT by setting::
+The set of package dependencies can be printed in the ``cmake`` STDOUT by
+setting the configure option::
-D _DUMP_PACKAGE_DEPENDENCIES=ON
-This will print the basic backward dependencies for each SE package. To also
-see the direct forward dependencies for each SE package, also include::
+This will print the basic forward/upstream dependencies for each SE package.
+To find this output, look for the line::
+
+ Printing package dependencies ...
+
+and the dependencies are listed below this for each SE package in the form::
+
+ -- _LIB_REQUIRED_DEP_TPLS: ...
+ -- _LIB_OPTIONAL_DEP_TPLS: ...
+ -- _LIB_REQUIRED_DEP_PACKAGES: <[PKG1> ...
+ -- _LIB_OPTIONAL_DEP_PACKAGES: ...
+ --