Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLOSED: Improve TrilinosInstallTests to make more clear (#10896) #10911

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 24 additions & 3 deletions packages/TrilinosInstallTests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,18 @@ tribits_add_advanced_test(doInstall
-P "${CMAKE_CURRENT_SOURCE_DIR}/remove_dir_if_exists.cmake"

TEST_1
MESSAGE "Install whatever Trilinos packages have been enabled"
MESSAGE "Install enabled and built Trilinos packages (NOTE: This test will fail if the project has **any** build errors!)"
CMND "${CMAKE_COMMAND}"
ARGS --install ${PROJECT_BINARY_DIR}
--prefix ${PROJECT_BINARY_DIR}/install
OUTPUT_FILE doInstall.out
NO_ECHO_OUTPUT

TEST_2
MESSAGE "Grep doInstall.out file produced above to see any errors"
CMND grep ARGS -A 50 "CMake Error" doInstall.out
PASS_ANY

ADDED_TEST_NAME_OUT doInstall_name
)
# NOTE: Above works even if Trilinos was configured without setting
Expand All @@ -81,6 +86,11 @@ tribits_add_advanced_test(doInstall
# the source dir and the build dir will still be sticking around in the
# below example build.

if (doInstall_name)
set_tests_properties(${doInstall_name}
PROPERTIES FIXTURES_SETUP doInstall_passed)
endif()


tribits_add_advanced_test(find_package_Trilinos
OVERALL_NUM_MPI_PROCS 1
Expand All @@ -104,8 +114,10 @@ tribits_add_advanced_test(find_package_Trilinos

if (find_package_Trilinos_name)
set_tests_properties(${find_package_Trilinos_name}
PROPERTIES DEPENDS ${doInstall_name} )
PROPERTIES FIXTURES_REQUIRED doInstall_passed)
endif()
# NOTE: Above, only attempt to run the find_package() test if the install
# command passed or it is guaranteed to fail.


tribits_add_advanced_test(simpleBuildAgainstTrilinos
Expand Down Expand Up @@ -144,8 +156,17 @@ tribits_add_advanced_test(simpleBuildAgainstTrilinos

if (simpleBuildAgainstTrilinos_name)
set_tests_properties(${simpleBuildAgainstTrilinos_name}
PROPERTIES DEPENDS ${doInstall_name} )
PROPERTIES FIXTURES_REQUIRED doInstall_passed)
endif()
# NOTE: Above, only attempt to build and test the simpleBuildAgainstTrilinos
# project if the install command passed or it is guaranteed to fail. Also
# note that we could have blocked this based on the find_package() test but
# that runs find_package(Trilinos) for all of Trilinos while the
# simpleBuildAgainstTrilinos/CMakeLists.txt file only calls
# find_package(Trilinos COMPONENTS Tpetra) so it could pass when the full
# find_package(Trilinos) call fails. Therefore, it makes sense to run the
# this test for simpleBuildAgainstTrilinos even if the test for the full
# find_package(Trilinos) command fails.


tribits_package_postprocess()
Expand Down