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

Support list for TAAT() PASS_REGULAR_EXPRESSION and FAIL_REGULAR_EXPRESSION (#464) #481

Merged
merged 1 commit into from
May 16, 2022

Conversation

bartlettroscoe
Copy link
Member

@bartlettroscoe bartlettroscoe commented May 16, 2022

See the commit log for commit fd681d2 for details.

I noticed this as part of working on testing PR #479 with Trilinos as part of #299. This should have been addressed as part of PR #464.

Review Checklist

  • Look over updated documentation in the files TribitsAddTest.cmake and TribitsAddAdvancedTest.cmake which is displayed for tribits_add_test() and tribits_add_advanced_test(). Look for typos, bad logic, etc.
  • Just scan the updated tests. Hopefully their purpose and what they are checking is clear. (If it is not, then we need to add comments to the test in the files.)

If you find any obvious problems (and I already see a couple of them), please create a PR against 'master' to fix them.

TIME LIMIT: According to code review best practices, given this PR has about 200 lines of code, this review should not take any longer than 30 minutes (at a review rate of 400 LOC per hour).

…ESSION (#464)

Turns out that the tribits_add_advanced_test() test-block arguments
PASS_REGULAR_EXPRESSION and FAIL_REGULAR_EXPRESSION did not support taking in
a list of regexes like the built-in CMake CTest properties of the same names.
This commit updates TAAT() to allow a list of arguments and they behave the
exact same way as the built-in properties (i.e. matching any).

I also updated the documentation to show how to pass in a list of regexes
correctly for PASS_REGULAR_EXPRESSION, FAIL_REGULAR_EXPRESSION,
FINAL_PASS_REGULAR_EXPRESSION and FINAL_FAIL_REGULAR_EXPRESSION.

I also fixed the documentation for tribits_add_test() as well for
PASS_REGULAR_EXPRESSION and FAIL_REGULAR_EXPRESSION.

Basically, a well constructed CMake function should almost never take in a
list of arguments expecting an explicit semi-colon.  This was part of the
learning in PR #464 with how to treat semi-colons in CMake.

This commit was driven by a usage of FAIL_REGULAR_EXPRESSION in Trilinos while
testing updated TriBITS as part of #299 when I realized the documentation was
wrong for how to deal with these lists of regexes.
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.

@KyleFromKitware, I am going to allow the merge and then a post-merge review can be done with the advantage of having the updated documentation deployed. Any issues can be addressed with a follow-up PR.

@bartlettroscoe bartlettroscoe merged commit 2f3633a into master May 16, 2022
@bartlettroscoe
Copy link
Member Author

@KyleFromKitware, if you have time, can you please do a post-merge review of this PR? See the "Review Checklist" above. This should not take more than 30 minutes.

@KyleFromKitware
Copy link
Collaborator

Looks good to me.

Copy link
Member Author

@bartlettroscoe bartlettroscoe left a comment

Choose a reason for hiding this comment

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

I found just a few issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants