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

Second refactoring cleaning up to get ready for #63 #374

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
50e9245
Add documentation links for TRIBITS_WRITE_XML_DEPENDENCY_FILES[_IF_SU…
bartlettroscoe May 25, 2021
7dbdb37
Move printing of tenatively enabled TPLs and dump of deps up one leve…
bartlettroscoe May 25, 2021
8f95421
Move initial print functions into new file TribitsPrintDependencyInfo…
bartlettroscoe May 25, 2021
7c36257
Change name to TRIBITS_READ_DEPS_FILES_CREATE_DEPS_GRAPH() (#63)
bartlettroscoe May 25, 2021
c31371f
Split out code for TRIBITS_READ_DEPS_FILES_CREATE_DEPS_GRAPH() into n…
bartlettroscoe May 25, 2021
5241176
Change name to TRIBITS_READ_ALL_PACKAGE_DEPS_FILES_CREATE_DEPS_GRAPH(…
bartlettroscoe May 25, 2021
fab8973
Change name to TRIBITS_READ_TOPLEVEL_PACKAGE_DEPS_FILES_ADD_TO_GRAPH(…
bartlettroscoe May 25, 2021
688484d
Change name to TRIBITS_PARSE_SUBPACKAGES_APPEND_SE_PACKAGES_ADD_OPTIO…
bartlettroscoe May 25, 2021
47f401e
Change name to TRIBITS_READ_PACKAGE_SUBPACKAGE_DEPS_FILES_ADD_TO_GRAP…
bartlettroscoe May 25, 2021
eb374ef
Change name to TRIBITS_READ_SUBPACKAGE_DEPS_FILE_ADD_TO_GRAPH() (#63)
bartlettroscoe May 25, 2021
f86988c
Show repo and project deps files being read (#63)
bartlettroscoe May 25, 2021
bd0a82a
Change name to TRIBITS_PROCESS_ALL_REPOSITORY_DEPS_SETUP_FILES() (#63)
bartlettroscoe May 25, 2021
fba0a10
Change name to TRIBITS_PROCESS_PROJECT_DEPENDENCY_SETUP_FILE() (#63)
bartlettroscoe May 25, 2021
c0ea029
Changed name TRIBITS_READ_ALL_PROJECT_DEPS_FILES_CREATE_DEPS_GRAPH(),…
bartlettroscoe May 25, 2021
54af7b7
Some doc fixups (#63)
bartlettroscoe May 25, 2021
ea6ac1a
Turn on package configure timing for TriBITS project config driver (#63)
bartlettroscoe May 26, 2021
474a05e
Add helper functions for starting and stopping optional code timers (…
bartlettroscoe May 26, 2021
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
1 change: 1 addition & 0 deletions dev_testing/crf450/mpi-debug/do-configure
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ ${TRIBITS_BASE_DIR}/dev_testing/generic/do-configure-mpi-debug \
-DTriBITS_CTEST_DRIVER_COVERAGE_TESTS=TRUE \
-DTriBITS_CTEST_DRIVER_MEMORY_TESTS=TRUE \
-DTriBITS_ENABLE_CONFIGURE_TIMING=ON \
-DTriBITS_ENABLE_PACKAGE_CONFIGURE_TIMING=ON \
-DTribitsExProj_INSTALL_BASE_DIR=/tmp/tribits_install_tests \
-DTribitsExProj_INSTALL_OWNING_GROUP=wg-sems-users-son \
-DTriBITS_ENABLE_REAL_GIT_CLONE_TESTS=ON \
Expand Down
16 changes: 15 additions & 1 deletion test/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,20 @@ TRIBITS_ADD_ADVANCED_TEST( TribitsProcessExtraRepositoriesList_UnitTests
)


TRIBITS_ADD_ADVANCED_TEST( TribitsReadAllProjectDepsFilesCreateDepsGraph_UnitTests
OVERALL_WORKING_DIRECTORY TEST_NAME
TEST_0 CMND ${CMAKE_COMMAND}
ARGS
-DPROJECT_NAME=${PROJECT_NAME}
-D${PROJECT_NAME}_TRIBITS_DIR=${${PROJECT_NAME}_TRIBITS_DIR}
-DCMAKE_CURRENT_LIST_DIR=${CMAKE_CURRENT_SOURCE_DIR}
-P "${CMAKE_CURRENT_SOURCE_DIR}/TribitsReadAllProjectDepsFilesCreateDepsGraph_UnitTests.cmake"
PASS_REGULAR_EXPRESSION_ALL
"Final UnitTests Result: num_run = 127"
"Final UnitTests Result: PASSED"
)


TRIBITS_ADD_ADVANCED_TEST( TribitsAdjustPackageEnables_UnitTests
OVERALL_WORKING_DIRECTORY TEST_NAME
TEST_0 CMND ${CMAKE_COMMAND}
Expand All @@ -102,7 +116,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 = 224"
"Final UnitTests Result: num_run = 97"
"Final UnitTests Result: PASSED"
)

Expand Down
2 changes: 1 addition & 1 deletion test/core/DependencyUnitTests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1111,7 +1111,7 @@ 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[)]:"
"CMake Error at .*/TribitsReadDepsFilesCreateDepsGraph.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[.] This may also"
Expand Down
8 changes: 4 additions & 4 deletions test/core/ExamplesUnitTests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2394,7 +2394,7 @@ IF (NOT ${PROJECT_NAME}_HOSTTYPE STREQUAL "Windows")
-DTribitsExProj_ENABLE_CONFIGURE_TIMING=ON
${${PROJECT_NAME}_TRIBITS_DIR}/examples/TribitsExampleProject
PASS_REGULAR_EXPRESSION_ALL
"Total time to read in and process all package dependencies: "
"Total time to read in all dependencies files and build dependencies graph: "
"Total time to adjust package and TPL enables: "
"Total time to probe and setup the environment: "
"Total time to configure enabled TPLs: "
Expand All @@ -2410,7 +2410,7 @@ IF (NOT ${PROJECT_NAME}_HOSTTYPE STREQUAL "Windows")
-DTribitsExProj_ENABLE_PACKAGE_CONFIGURE_TIMING=ON
.
PASS_REGULAR_EXPRESSION_ALL
"Total time to read in and process all package dependencies: "
"Total time to read in all dependencies files and build dependencies graph: "
"Total time to adjust package and TPL enables: "
"Total time to probe and setup the environment: "
"Total time to configure enabled TPLs: "
Expand All @@ -2427,7 +2427,7 @@ IF (NOT ${PROJECT_NAME}_HOSTTYPE STREQUAL "Windows")
-DSimpleCxx_PACKAGE_CONFIGURE_TIMING=ON
.
PASS_REGULAR_EXPRESSION_ALL
"Total time to read in and process all package dependencies: "
"Total time to read in all dependencies files and build dependencies graph: "
"Total time to adjust package and TPL enables: "
"Total time to probe and setup the environment: "
"Total time to configure enabled TPLs: "
Expand Down Expand Up @@ -4974,7 +4974,7 @@ TRIBITS_ADD_ADVANCED_TEST( TribitsExampleProject_PkgWithUserErrors_UNPARSED_ARGS
"CMake Error at.*TribitsGeneralMacros.cmake:"
"Arguments are being passed in but not used. UNPARSED_ARGUMENTS ="
"nonsense_jdslkfhlskd"
"TRIBITS_READ_PACKAGE_DEPENDENCIES"
"TRIBITS_READ_TOPLEVEL_PACKAGE_DEPS_FILES_ADD_TO_GRAPH"
"-- Configuring incomplete, errors occurred!"
ALWAYS_FAIL_ON_ZERO_RETURN

Expand Down
81 changes: 2 additions & 79 deletions test/core/TribitsAdjustPackageEnablesHelpers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -37,77 +37,8 @@
# ************************************************************************
# @HEADER

MESSAGE("The outer project: PROJECT_NAME = ${PROJECT_NAME}")
MESSAGE("The outer project: ${PROJECT_NAME}_TRIBITS_DIR = ${${PROJECT_NAME}_TRIBITS_DIR}")

SET( CMAKE_MODULE_PATH
"${${PROJECT_NAME}_TRIBITS_DIR}/core/utils"
"${${PROJECT_NAME}_TRIBITS_DIR}/core/package_arch"
)


INCLUDE(PrintVar)


#####################################################################
#
# Set common/base options
#
#####################################################################

SET(PROJECT_SOURCE_DIR "${${PROJECT_NAME}_TRIBITS_DIR}/examples/MockTrilinos")
PRINT_VAR(PROJECT_SOURCE_DIR)
SET(REPOSITORY_DIR ".")
PRINT_VAR(REPOSITORY_DIR)

# Before we change the project name, we have to set the TRIBITS_DIR so that it
# will point in the right place. There is TriBITS code being called that must
# have this variable set!

SET(Trilinos_TRIBITS_DIR ${${PROJECT_NAME}_TRIBITS_DIR})

# Set the mock project name last to override the outer project
SET(PROJECT_NAME "Trilinos")
MESSAGE("The inner test project: PROJECT_NAME = ${PROJECT_NAME}")
MESSAGE("The inner tets project: ${PROJECT_NAME}_TRIBITS_DIR = ${${PROJECT_NAME}_TRIBITS_DIR}")

# Includes

INCLUDE(TribitsReadPackagesProcessDepenenciesWriteXml)
INCLUDE("${CMAKE_CURRENT_LIST_DIR}/TribitsReadAllProjectDepsFilesCreateDepsGraphHelpers.cmake")
INCLUDE(TribitsAdjustPackageEnables)
INCLUDE(TribitsProcessTplsLists)
INCLUDE(UnitTestHelpers)
INCLUDE(GlobalSet)

# For Running TRIBITS_READ_PACKAGES_PROCESS_DEPENDENCIES_WRITE_XML()

SET(${PROJECT_NAME}_NATIVE_REPOSITORIES .)

SET(${PROJECT_NAME}_PACKAGES_FILE_OVERRIDE
${CMAKE_CURRENT_LIST_DIR}/MiniMockTrilinosFiles/PackagesList.cmake)
SET(${PROJECT_NAME}_TPLS_FILE_OVERRIDE
${CMAKE_CURRENT_LIST_DIR}/MiniMockTrilinosFiles/TPLsList.cmake)

SET(${PROJECT_NAME}_EXTRA_REPOSITORIES extraRepoTwoPackages)

# For running other lower-level functions

SET(REPOSITORY_NAME "Trilinos")

INCLUDE(${CMAKE_CURRENT_LIST_DIR}/MiniMockTrilinosFiles/PackagesList.cmake)
INCLUDE(${CMAKE_CURRENT_LIST_DIR}/MiniMockTrilinosFiles/TPLsList.cmake)

SET(EXTRA_REPO_NAME extraRepoTwoPackages)
SET(EXTRA_REPO_DIR extraRepoTwoPackages)

SET(REPOSITORY_NAME ${EXTRA_REPO_NAME})
INCLUDE(${PROJECT_SOURCE_DIR}/${EXTRA_REPO_NAME}/PackagesList.cmake)

SET(${EXTRA_REPO_NAME}_TPLS_FINDMODS_CLASSIFICATIONS)

SET(${PROJECT_NAME}_ALL_REPOSITORIES "." "${EXTRA_REPO_NAME}")

SET( ${PROJECT_NAME}_ASSERT_MISSING_PACKAGES ON )


#####################################################################
Expand All @@ -117,14 +48,6 @@ SET( ${PROJECT_NAME}_ASSERT_MISSING_PACKAGES ON )
#####################################################################


MACRO(UNITTEST_HELPER_READ_PACKAGES_AND_DEPENDENCIES)

SET(${PROJECT_NAME}_ALL_REPOSITORIES)
TRIBITS_READ_PACKAGES_PROCESS_DEPENDENCIES_WRITE_XML()

ENDMACRO()


MACRO(UNITTEST_HELPER_READ_AND_PROCESS_PACKAGES)

TRIBITS_PROCESS_PACKAGES_AND_DIRS_LISTS(${PROJECT_NAME} ".")
Expand All @@ -133,7 +56,7 @@ MACRO(UNITTEST_HELPER_READ_AND_PROCESS_PACKAGES)
TRIBITS_PROCESS_PACKAGES_AND_DIRS_LISTS(${EXTRA_REPO_NAME} ${EXTRA_REPO_DIR})
SET(${EXTRA_REPO_NAME}_TPLS_FILE "dummy")
TRIBITS_PROCESS_TPLS_LISTS(${EXTRA_REPO_NAME} ${EXTRA_REPO_DIR})
TRIBITS_READ_PROJECT_AND_PACKAGE_DEPENDENCIES_CREATE_GRAPH_PRINT_DEPS()
TRIBITS_READ_DEPS_FILES_CREATE_DEPS_GRAPH()
SET_DEFAULT(${PROJECT_NAME}_ENABLE_ALL_PACKAGES OFF)
SET_DEFAULT(${PROJECT_NAME}_ENABLE_SECONDARY_TESTED_CODE OFF)
SET(DO_PROCESS_MPI_ENABLES ON) # Should not be needed but CMake is not working!
Expand Down
Loading