-
Notifications
You must be signed in to change notification settings - Fork 45
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
Better identify and hanlde the TriBITS primary meta-project packges #9
Comments
…ITS #9) This defines new variables: ${REPOSITORY_NAME}_REPOSITORY_CONTAINS_NO_PRIMARY_META_PROJECT_PACKAGES ${REPOSITORY_NAME}_REPOSITORY_CONTAINS_NO_PRIMARY_META_PROJECT_PACKAGES_EXCEPT and removes the variables: ${REPOSITORY_NAME}_NO_IMPLICIT_PACKAGE_ENABLE ${REPOSITORY_NAME}_NO_IMPLICIT_PACKAGE_ENABLE_ENABLE (which were a hack). Also removed were the functions: TRIBITS_REPOSITORY_IMPLICIT_PACKAGE_ENABLE_IS_ALLOWED() TRIBITS_APPLY_REPOSITORY_NO_IMPLICIT_PACKAGE_ENABLE_DISABLE() The updated behavior is deined in TriBITS Github issue #9. This will also be fully documented in the TribitsDevelopersGuide.* document in the next commit. I added the macro SELECT_FINAL_SET_OF_PACKAGES_TO_PROCESS() that modifies the set of packages that are exlicitly processed in the loop. This makes for nicer output and easier debugging becuase you can see exactly the packages that will be directly processed before the loop starts and every iteration of the loop with process a pacakge and not just skip it. Some of the existing tests had to be modified because some strings are no longer printed. However, the tests should be just a strong because the look at the final list of packages that CTest/CDash will process. Build/Test Cases Summary Enabled Packages: TriBITS Enabled all Packages 0) MPI_DEBUG => passed: passed=641,notpassed=0 (36.70 min) 1) SERIAL_RELEASE => passed: passed=548,notpassed=0 (15.36 min) Other local commits for this build/test group: 5ac058d, cb72771
@lefebvre, you should consider adding:
to the file:
This will make SCALE_ENABLE_ALL_PACKAGES and SCALE_ENABLE_TESTS work better for SCALE developers. |
This sounds great. I'll look into it.
|
…ITS TriBITSPub#9) This defines new variables: ${REPOSITORY_NAME}_REPOSITORY_CONTAINS_NO_PRIMARY_META_PROJECT_PACKAGES ${REPOSITORY_NAME}_REPOSITORY_CONTAINS_NO_PRIMARY_META_PROJECT_PACKAGES_EXCEPT and removes the variables: ${REPOSITORY_NAME}_NO_IMPLICIT_PACKAGE_ENABLE ${REPOSITORY_NAME}_NO_IMPLICIT_PACKAGE_ENABLE_ENABLE (which were a hack). Also removed were the functions: TRIBITS_REPOSITORY_IMPLICIT_PACKAGE_ENABLE_IS_ALLOWED() TRIBITS_APPLY_REPOSITORY_NO_IMPLICIT_PACKAGE_ENABLE_DISABLE() The updated behavior is deined in TriBITS Github issue TriBITSPub#9. This will also be fully documented in the TribitsDevelopersGuide.* document in the next commit. I added the macro SELECT_FINAL_SET_OF_PACKAGES_TO_PROCESS() that modifies the set of packages that are exlicitly processed in the loop. This makes for nicer output and easier debugging becuase you can see exactly the packages that will be directly processed before the loop starts and every iteration of the loop with process a pacakge and not just skip it. Some of the existing tests had to be modified because some strings are no longer printed. However, the tests should be just a strong because the look at the final list of packages that CTest/CDash will process. Build/Test Cases Summary Enabled Packages: TriBITS Enabled all Packages 0) MPI_DEBUG => passed: passed=641,notpassed=0 (36.70 min) 1) SERIAL_RELEASE => passed: passed=548,notpassed=0 (15.36 min) Other local commits for this build/test group: 5ac058d, cb72771
…BITS TriBITSPub#9) This completes all of the work to define the new primary meta-project packages feature for TriBITS (Fixes TriBITSPub#9). Build/Test Cases Summary Enabled Packages: TriBITS Enabled all Packages 0) MPI_DEBUG => passed: passed=641,notpassed=0 (55.87 min) 1) SERIAL_RELEASE => passed: passed=548,notpassed=0 (8.22 min) Other local commits for this build/test group: 23a3243
The clone_extra_repos.py script imports the gitdist.py module to get some of its functionality. On windows this fails because gitdist.py was just a symlink to gitdist. So, to support Windows, I just made the real file gitdist.py and the symlink is now gitdist. This should not impact Linux usage at all. And if you copy/install gitdist into another location, it will follow the symlink and copy the file in its entirety. With this change, on Windows, if you want to use gitdist, you will need to use gitdist.py. Fixes #9
Currently, the way that I tried to allow a TrBITS meta-project to differentiate its primary meta-project packages from other upstream packages (just there to satisfy dependencies) was to it define the CMake variable
${REPOSITORY_NAME}_NO_IMPLICIT_PACKAGE_ENABLE
for each upstream repo to say that packages within the repo${REPOSITORY_NAME}
should only be enabled if they are explicitly enabled. I used this in CASL VERA for trying to exclude the testing of packages from the repos Trilinos, SCALE, etc.Enable logic based on just
${REPOSITORY_NAME}_NO_IMPLICIT_PACKAGE_ENABLE
is currently implemented in the help functionTRIBITS_REPOSITORY_IMPLICIT_PACKAGE_ENABLE_IS_ALLOWED()
and used in various places.However, the way I implemented this it only really worked correctly when setting
${PROJECT_NAME}_ENABLE_ALL_PACKAGES
when using the first iteration of the CI server usingTRIBITS_CTEST_DRIVER()
implemented inTribitsCTestDriverCore.cmake
which callsTRIBITS_APPLY_REPOSITORY_NO_IMPLICIT_PACKAGE_ENABLE_DISABLE()
. It also works for Nightly testing as well driven byTRIBITS_CTEST_DRIVER()
. However, this does not address the problem very well and does not have any impact on the usage of thecheckin-test.py
script when correctly turning on software to test when setting up an ACI sync server, for example.Also, an unfortunate consequence of the way I implemented this what that all implicit package enables for packages in one of these repos would be skipped due to the fact that the function
TRIBITS_IMPLICIT_PACKAGE_ENABLE_IS_ALLOWED()
also callsTRIBITS_REPOSITORY_IMPLICIT_PACKAGE_ENABLE_IS_ALLOWED()
. Now that I think about this, this was a stupid thing to do. It is also why I could not setTrilinos_NO_IMPLICIT_PACKAGE_ENABLE=ON
in the inner VERA CMake configuration process because it straight-up broke VERA.I think what is need to do is to change the name of
${REPOSITORY_NAME}_NO_IMPLICIT_PACKAGE_ENABLE
to${REPOSITORY_NAME}_NO_PRIMARY_META_PROJECT_PACKAGES
and change the name ofTRIBITS_REPOSITORY_IMPLICIT_PACKAGE_ENABLE_IS_ALLOWED()
toTRIBITS_IS_PRIMARY_META_PROJECT_PACKAGE()
.What we really want is a system for identifying and handling the primary meta-project packages that has the following properties:
When the meta-project is configured with
${PROJECT_NAME}_ENABLE_ALL_PACKAGES=ON
, only the SE packages${PACKAGE_NAME}
that return true fromTRIBITS_IS_PRIMARY_META_PROJECT_PACKAGE(${PACKAGE_NAME} ...)
will be enabled in the first sweep through all of the SE packages. The result of this first sweep will identify the primary meta-project packages. When verbose output is enabled, also print that a package is not being enabled base on this logic.Only SE packages
${PACKAGE_NAME}
that return true fromTRIBITS_IS_PRIMARY_META_PROJECT_PACKAGE(${PACKAGE_NAME} ...)
will be allowed to have their tests/examples implicitly enabled based on${PROJECT_NAME}_ENABLE_TESTS/EXAMPLES=ON
. When verbose output is enabled, also print that a package's tests/examples are being enabled base on this logic.Any packages that are explicitly enabled with
${PROJECT_NAME}_ENABLE_${PACKAGE_NAME}=ON
will be enabled irrespective of${REPOSITORY_NAME}_NO_PRIMARY_META_PROJECT_PACKAGES
.Any package tests/examples that are explicitly enabled with
${PACKAGE}_ENABLE_TEST/EXAMPLES=ON
will still be enabled.All other implicit package enables due to sweeping upstream and downstream are unaffected by
${REPOSITORY_NAME}_NO_PRIMARY_META_PROJECT_PACKAGES
logic. For example, sweeping downstream/forward to find packages that need to be tested based on a change needs to stay intact. Also, sweeping upstream/backward to enable optional packages needs to stay intact (that is not currently true with the current implementation).The way this would be used to define meta-projects is to set
${REPOSITORY_NAME}_NO_PRIMARY_META_PROJECT_PACKAGES=ON
for all upstream repos that are just contributing package libs, etc. However, some packages from a given repo can be consider primary meta-project packages by adding them to the list${REPOSITORY_NAME}_NO_PRIMARY_META_PROJECT_PACKAGES_EXCEPT=<pkg0>,<pkg1>,...
. Any upstream packages that the meta-project is sure that it never wants should be explicitly disabled inside of the meta-project's ProjectName.cmake file (e.g. with${PROJECT_NAME}_ENABLE_PACKAGES=<pkg0>,<pkg1>,...
).The above behavior would correctly implement the following use cases:
A) Enable all of the tests/examples for the primary meta-project packages to be built and installed complete with tests and examples => Configure with
${PROJECT_NAME}_ENABLE_ALL_PACKAGES=ON
and${PROJECT_NAME}_ENABLE_TESTS=ON
.B) Select all of the primary meta-project packages to be explicitly tested in
TRIBITS_CTEST_DRIVER()
implemented inTribitsCTestDriverCore.cmake
=> Set ${PROJECT_NAME}_ENABLE_ALL_PACKAGES=ON and ${PROJECT_NAME}_ENABLE_TESTS=ON and whatever packages end up with enabled tests get explicitly processed.C) Enable the tests and examples for all primary meta-project packages that need to be tested for changes in any upstream packages => Configure with the set of changed packages
${PROJECT_NAME}_ENABLE_${CHANGED_PACKAGE}=ON
,${PROJECT_NAME}_ENABLE_ALL_FORWARD_DEP_PACKAGES=ON
, and${PROJECT_NAME}_ENABLE_TESTS=ON
. None of the tests will be enabled for the changed packages if TRIBITS_IS_PRIMARY_META_PROJECT_PACKAGE() returns false. This will enable the tests and examples for all primary meta-project packages that are affected by any of the changed upstream packages. This will also perhaps enable some intermediate packages downstream from the changed packages but upstream from the primary meta-project packages but since there are no tests or examples enabled, only a build failure could mess up the testing. Also, such packages would not be explicitly processed inTRIBITS_CTEST_DRIVER()
. This would work for the checkin-test.py script since the tests and examples would only be enabled for primary meta-project packages.Tasks:
${REPOSITORY_NAME}_NO_PRIMARY_META_PROJECT_PACKAGES
and new functionTRIBITS_IS_PRIMARY_META_PROJECT_PACKAGE()
and update all of unit the tests that currently testTRIBITS_APPLY_REPOSITORY_NO_IMPLICIT_PACKAGE_ENABLE_DISABLE()
. Update these unit tests one at a time until they are all replaced where the logic is built into the basic enable/disable logic.TRIBITS_REPOSITORY_IMPLICIT_PACKAGE_ENABLE_IS_ALLOWED()
andTRIBITS_APPLY_REPOSITORY_NO_IMPLICIT_PACKAGE_ENABLE_DISABLE()
and the variables${REPOSITORY_NAME}_NO_IMPLICIT_PACKAGE_ENABLE
and${REPOSITORY_NAME}_NO_IMPLICIT_PACKAGE_ENABLE_EXCEPT
and any unit tests involvingTRIBITS_CTEST_DRIVER()
that depend on their behavior.${PROJECT_NAME}_ENABLE_ALL_PACKAGES=ON
and${PROJECT_NAME}_ENABLE_TESTS=ON
based on${REPOSITORY_NAME}_NO_PRIMARY_META_PROJECT_PACKAGES
and${REPOSITORY_NAME}_NO_PRIMARY_META_PROJECT_PACKAGES
.The text was updated successfully, but these errors were encountered: