Skip to content

Commit

Permalink
Add test for ShyLU_NodeHTS and list all packages for CDash (#6697, #7229
Browse files Browse the repository at this point in the history
)

I added an explict test for the subpackage ShyLU_NodeHTS to make sure it will
get tested if there are any changes (see #7229).

I also changed the list of toplevel packages as CDash subproject to list all
of the PR packages.  This is because you can't just list the changed SE
packages, you have to list all of the top-level packages that have any enabled
subpackages downstream.  That type of logic will require doing a full TriBITS
dependency analysis in CMake code calling the macro
TRIBITS_ADJUST_AND_PRINT_PACKAGE_DEPENDENCIES().  That will require some
refactoring that I don't have the time to do now.

But note that at least the list of toplevel packages will always be correct as
there are changes to the Trilinos/PackagesList.cmake file.  That is better
than using a static list that never gets updated.
  • Loading branch information
bartlettroscoe committed May 24, 2020
1 parent 81dbf7c commit 3e9a1ac
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 10 deletions.
30 changes: 26 additions & 4 deletions commonTools/framework/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,16 @@ MOCK_PROGRAM_OUTPUT: ${FILES_CHANGED}
ENDFUNCTION()


set(ALL_TOPLEVEL_PACKAGES_REGEX
"TrilinosFrameworkTests TrilinosATDMConfigTests .*Kokkos Teuchos KokkosKernels .*EpetraExt Tpetra .*Domi Thyra .*SEACAS .*Teko Intrepid .*MueLu .*ShyLU_DD ShyLU .*Tempus Stokhos ROL Piro Panzer Adelus TrilinosCouplings Pike")


create_get_changed_trilinos_packages_test(ProjectsList_TeuchosCore
"ProjectsList.cmake\npackages/teuchos/core/CMakeLists.txt"
"ALL_PACKAGES,TeuchosCore"
"ALL_PACKAGES,TeuchosCore"
"Setting Trilinos_ENABLE_ALL_PACKAGES = ON;Setting Trilinos_ENABLE_TeuchosCore = ON"
"TrilinosFrameworkTests TrilinosATDMConfigTests .*Kokkos Teuchos KokkosKernels .*EpetraExt Tpetra .*Domi Thyra .*SEACAS .*Teko Intrepid .*MueLu .*ShyLU_DD ShyLU .*Tempus Stokhos ROL Piro Panzer Adelus TrilinosCouplings Pike"
"${ALL_TOPLEVEL_PACKAGES_REGEX}"
)
# The above test ensures that it can detect global build files as well as
# package files. Above, we check several of the parent packages in Trilinos
Expand All @@ -153,7 +157,7 @@ create_get_changed_trilinos_packages_test(cmake_std_atdm_TeuchosCore_PyTrilinos_
"TrilinosATDMConfigTests,TeuchosCore,PyTrilinos,Pliris"
"TrilinosATDMConfigTests,TeuchosCore,Pliris"
"Setting Trilinos_ENABLE_TrilinosATDMConfigTests = ON;Setting Trilinos_ENABLE_TeuchosCore = ON;Setting Trilinos_ENABLE_Pliris = ON"
"TrilinosATDMConfigTests TeuchosCore Pliris"
"${ALL_TOPLEVEL_PACKAGES_REGEX}"
)
# The above test ensures that cmake/std/atdm/ changes don't trigger global
# builds and it makes sure that PT (TeuchosCore) and ST packages (Pliris) do
Expand All @@ -165,7 +169,7 @@ create_get_changed_trilinos_packages_test(TeuchosCore_TriKota_NewPackage_Pliris
"TeuchosCore,TriKota,NewPackage,Pliris"
"TeuchosCore,Pliris"
"Setting Trilinos_ENABLE_TeuchosCore = ON;Setting Trilinos_ENABLE_Pliris = ON"
"TeuchosCore Pliris"
"${ALL_TOPLEVEL_PACKAGES_REGEX}"
)
# The above test ensures PT (TeuchosCore) and ST packages (Piro) do get
# enabled but EX packages (NewPackage) don't.
Expand All @@ -176,11 +180,29 @@ create_get_changed_trilinos_packages_test(cmake_std_atdm
"TrilinosATDMConfigTests"
"TrilinosATDMConfigTests"
"Setting Trilinos_ENABLE_TrilinosATDMConfigTests = ON"
"TrilinosATDMConfigTests"
"${ALL_TOPLEVEL_PACKAGES_REGEX}"
)
# The above test ensures changes to just cmake/std/atdm/ triggers the enable
# of only the TrilinosATDMConfigTests package and does not trigger the
# enable of every package.


create_get_changed_trilinos_packages_test(ShyLU_NodeHTS
"packages/shylu/shylu_node/hts/test/CMakeLists.txt"
"ShyLU_NodeHTS"
"ShyLU_NodeHTS"
"Setting Trilinos_ENABLE_ShyLU_NodeHTS = ON"
"${ALL_TOPLEVEL_PACKAGES_REGEX}"
)
# The above test ensures changes to packages/shylu/shylu_node/hts/ trigger
# testing of the ST ShyLU_NodeST subpackage. (This will cause PRs like
# #7229 to actually test code.)


# NOTE: Above, currently every top-level package is listed as a CDash
# subproject. Once we can implement TriBITS forward-package logic, then the
# above tests will be checking a subset of packages.



TRIBITS_PACKAGE_POSTPROCESS()
8 changes: 2 additions & 6 deletions commonTools/framework/get-changed-trilinos-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -211,12 +211,8 @@ printf "set(CTEST_LABELS_FOR_SUBPROJECTS" > $CTEST_LABELS_FOR_SUBPROJETS_OUT

if [[ "$CHANGED_PACKAGES_ST_LIST" != "" ]] ; then

if comma_list_contains_ele "ALL_PACKAGES" "$CHANGED_PACKAGES_ST_LIST"; then
ALL_PACKAGES=$(trilinos_get_all_toplevel_packages)
PR_PACKAGES=$(trilinos_filter_packages_to_test "${ALL_PACKAGES}")
else
PR_PACKAGES="$CHANGED_PACKAGES_ST_LIST"
fi
ALL_PACKAGES=$(trilinos_get_all_toplevel_packages)
PR_PACKAGES=$(trilinos_filter_packages_to_test "${ALL_PACKAGES}")

echo "$PR_PACKAGES" | sed -n 1'p' | tr ',' '\n' | while read PKG_NAME ; do
#echo $PKG_NAME
Expand Down

0 comments on commit 3e9a1ac

Please sign in to comment.