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

Fix test dependencies for subpackages and subpackage tests/examples enables (#63, #268, #299, #510) #512

Merged

Conversation

bartlettroscoe
Copy link
Member

@bartlettroscoe bartlettroscoe commented Aug 11, 2022

Addresses specifically the defect in #510 which resulted from work done as part of #63 and #299. This also mostly addresses the scope of #268.

Once this is updated to Trilinos, it will fix trilinos/Trilinos#10842.

See the specific git commit log messages for more detail.

rabartlett1972
rabartlett1972 previously approved these changes Aug 11, 2022
Copy link
Collaborator

@rabartlett1972 rabartlett1972 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am going to allow this to merge without a review because this is desperately needed to fix trilinos/Trilinos#10842 which will allow a bunch of PRs to pass Trilinos PR testing and be merged.

…riBITSPub#511)

I noticed that some important TriBITS logic that was not documented in the
build reference guide.  I noticed this while working on TriBITSPub#510 and TriBITSPub#511 (but,
again, this is just documenting existing behavior).
…TriBITSPub#200)

This eliminates a lot of dupication, reduces the number of lines of code, and
removes a bunch of clutter from the functions tribits_add_test_directories()
and tribits_add_example_directories().  Win, win, win.

I noticed this while working on TriBITSPub#510.
…riBITSPub#510)

These configurations fail to build without the fixes that come in the next
commit (see TriBITSPub#510).  Also, this pins down that you should only enable tests for
subpackages that need tested based on explicit and forward enables (see TriBITSPub#268).

I also added some configure checks for how I want the output to look mostly as
part of TriBITSPub#268.
…nabless (TriBITSPub#63, TriBITSPub#268, TriBITSPub#299, TriBITSPub#510)

This fixes a defect added as part of transitioning to modern CMake targets
(TriBITSPub#63, TriBITSPub#299).

As part of this, it also changes the behavior of TriBITS to only enable
tests/examples for subpackages that are enabled on the forward sweep and not
those that are enabled as part of sweeping backward to enabled upstream
dependencies needed by enabled packages (see TriBITSPub#268).  This is the correct thing
to do and will also result in fewer tests being being built and run as part of
testing downstream packages using:

  -D<Project>_ENABLE_<Pkg>=ON
  -D<Project>_ENABLE_ALL_FORWARD_DEP_PACKAGES=ON
  -D<Project>_ENABLE_TESTS=ON

These changes causes failing tests in the previous commit to pass.

I also updated some documentation and removed some commented-out debugging
code.
Copy link
Collaborator

@rabartlett1972 rabartlett1972 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving after the last commit to fix the tests.

@bartlettroscoe
Copy link
Member Author

Hello @KyleFromKitware, can you please do a post-merge review of this PR? Thanks!

Copy link
Collaborator

@KyleFromKitware KyleFromKitware left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM +1

if (${PARENT_PACKAGE_NAME}_ENABLE_TESTS)
if ("${${fullSpkgName}_ENABLE_TESTS}" STREQUAL "")
message("-- " "Setting"
" ${fullSpkgName}_ENABLE_TESTS=${${PARENT_PACKAGE_NAME}_ENABLE_TESTS}"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure how picky you are about whitespace, but you've got some stray tabs here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initial tabs are a no-no. Not sure how that got inserted (my emacs editor should be setup to indent with spaces only). I will diffidently fix that.

Thanks!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is addressed in new PR #515. I found a bunch of other places where tabs somehow got inserted. I wish there was a simple linter that could catch this. (Actually, to look for initial tabs in *.cmake files, then that is easy. I can do that with a simple bash scripts.)

bartlettroscoe added a commit to bartlettroscoe/TriBITS that referenced this pull request Aug 13, 2022
Somehow tabs got inserted instead of spaces when indenting in these files.

I replaces tabs with 8 spaces and things seem to look about correct.
bartlettroscoe added a commit to bartlettroscoe/TriBITS that referenced this pull request Aug 13, 2022
Somehow tabs got inserted instead of spaces when indenting in these files.

I replaces tabs with 8 spaces and things seem to look about correct.
bartlettroscoe added a commit that referenced this pull request Aug 13, 2022
@bartlettroscoe bartlettroscoe changed the title Fix test dependencies for subpackages and subpackage tests/examples enabless (#63, #268, #299, #510) Fix test dependencies for subpackages and subpackage tests/examples enables (#63, #268, #299, #510) Aug 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
3 participants