From 35510d754843752c4bd4da3a4dffdfd54a0ff389 Mon Sep 17 00:00:00 2001 From: "Roscoe A. Bartlett" Date: Sat, 25 May 2019 13:09:39 -0600 Subject: [PATCH] Add test case and fix handling of global file triggering enable of all packages I noticed a defect in the code manifisted in the Trilinos post-push CI build where if a global file was changed giving the special package called "ALL_PACKAGES", it was not being enabled. This defect must have snuck in when I added support for the all-at-once appraoch and I did not have an automated test for this use case. Now there are strong automated tests for this use case for if ST or only PT packages are enabled. It seems to be doing the right thing. Build/Test Cases Summary Enabled Packages: Enabled all Packages 0) MPI_DEBUG => passed: passed=360,notpassed=0 (1.38 min) 1) SERIAL_RELEASE => passed: passed=360,notpassed=0 (1.45 min) --- .../MockCTestDriver/CMakeLists.txt | 52 +++++++++++++++++++ .../MockCTestDriver/modifiedFiles.Global.txt | 1 + .../TribitsCTestDriverCoreHelpers.cmake | 2 + 3 files changed, 55 insertions(+) create mode 100644 test/ctest_driver/MockCTestDriver/modifiedFiles.Global.txt diff --git a/test/ctest_driver/MockCTestDriver/CMakeLists.txt b/test/ctest_driver/MockCTestDriver/CMakeLists.txt index d85553604..fbf77d77d 100644 --- a/test/ctest_driver/MockCTestDriver/CMakeLists.txt +++ b/test/ctest_driver/MockCTestDriver/CMakeLists.txt @@ -969,6 +969,58 @@ IF (PYTHON_EXECUTABLE) ) + CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE( + CI_EnableOnlyModified_GlobalModified_PT_AAO + COPY_FILES + ${CMAKE_CURRENT_SOURCE_DIR}/modifiedFiles.Global.txt modifiedFiles.txt + ${CMAKE_CURRENT_SOURCE_DIR}/modifiedFiles.empty.txt modifiedFiles.preCopyrightTrilinos.txt + ${CMAKE_CURRENT_SOURCE_DIR}/modifiedFiles.empty.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! + Trilinos_CTEST_DO_ALL_AT_ONCE=ON + PASS_REGULAR_EXPRESSION_ALL + "CTEST_UPDATE.+ returned '0'" + "MODIFIED_PACKAGES_LIST='ALL_PACKAGES'" + "FAILING_PACKAGES_LIST=''" + "Directly modified or failing non-disabled packages that need to be tested: ALL_PACKAGES" + "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 [(]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 non-enabled packages: Stokhos Sacado Belos Phalanx Panzer Teko Stalix 7" + "MODIFIED_PACKAGES_LIST='ALL_PACKAGES': Found modified packages, processing enabled packages!" + "CONFIGURE_OPTIONS = '.+[;]-DTrilinos_ENABLE_ALL_PACKAGES=ON[;].+'" + ) + + + CREATE_CTEST_DEPENDENCY_HANDLING_TEST_CASE( + CI_EnableOnlyModified_GlobalModified_ST_AAO + COPY_FILES + ${CMAKE_CURRENT_SOURCE_DIR}/modifiedFiles.Global.txt modifiedFiles.txt + ${CMAKE_CURRENT_SOURCE_DIR}/modifiedFiles.empty.txt modifiedFiles.preCopyrightTrilinos.txt + ${CMAKE_CURRENT_SOURCE_DIR}/modifiedFiles.empty.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! + Trilinos_CTEST_DO_ALL_AT_ONCE=ON + PASS_REGULAR_EXPRESSION_ALL + "CTEST_UPDATE.+ returned '0'" + "MODIFIED_PACKAGES_LIST='ALL_PACKAGES'" + "FAILING_PACKAGES_LIST=''" + "Directly modified or failing non-disabled packages that need to be tested: ALL_PACKAGES" + "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 [(]Trilinos_ENABLE_SECONDARY_TESTED_CODE=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 non-enabled packages: Stokhos Stalix 2" + "MODIFIED_PACKAGES_LIST='ALL_PACKAGES': Found modified packages, processing enabled packages!" + "CONFIGURE_OPTIONS = '.+[;]-DTrilinos_ENABLE_ALL_PACKAGES=ON[;].+'" + ) + + # ToDo: Test modified package not to be implicitly enabled to not be enabled! ENDIF(PYTHON_EXECUTABLE) diff --git a/test/ctest_driver/MockCTestDriver/modifiedFiles.Global.txt b/test/ctest_driver/MockCTestDriver/modifiedFiles.Global.txt new file mode 100644 index 000000000..a0f00082c --- /dev/null +++ b/test/ctest_driver/MockCTestDriver/modifiedFiles.Global.txt @@ -0,0 +1 @@ +CMakeLists.txt diff --git a/tribits/ctest_driver/TribitsCTestDriverCoreHelpers.cmake b/tribits/ctest_driver/TribitsCTestDriverCoreHelpers.cmake index 2f3c3466d..3e2ff7ef9 100644 --- a/tribits/ctest_driver/TribitsCTestDriverCoreHelpers.cmake +++ b/tribits/ctest_driver/TribitsCTestDriverCoreHelpers.cmake @@ -453,6 +453,8 @@ MACRO(ENABLE_ONLY_MODIFIED_PACKAGES) ASSERT_DEFINED(${PROJECT_NAME}_ENABLE_${TRIBITS_PACKAGE}) IF ("${${PROJECT_NAME}_ENABLE_${TRIBITS_PACKAGE}}" STREQUAL "") IF ( + ${TRIBITS_PACKAGE} STREQUAL "ALL_PACKAGES" + OR ${TRIBITS_PACKAGE}_TESTGROUP STREQUAL "PT" OR (