Skip to content

Commit

Permalink
Add test case and fix handling of global file triggering enable of al…
Browse files Browse the repository at this point in the history
…l 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)
  • Loading branch information
bartlettroscoe committed May 25, 2019
1 parent aaa1dd0 commit 35510d7
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 0 deletions.
52 changes: 52 additions & 0 deletions test/ctest_driver/MockCTestDriver/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions test/ctest_driver/MockCTestDriver/modifiedFiles.Global.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CMakeLists.txt
2 changes: 2 additions & 0 deletions tribits/ctest_driver/TribitsCTestDriverCoreHelpers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
(
Expand Down

0 comments on commit 35510d7

Please sign in to comment.