-
-
Notifications
You must be signed in to change notification settings - Fork 291
Mask values in h5dump output files #5473
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding the capability to have multiple filters is a good idea. However masks should use the TEST_MASK argument.
The runTest.cmake file probably should pull the TEST_MASK_STORE and TEST_MASK_MOD options out of runTest.cmake to the calling tools and make it consistent.
TEST_MASK_ERROR is a different issue and probably should be dealt with in a different issue.
Right now, Masking should probably use a generic find/replace argument to runTest - there's no reason for runTest to care whether the specific operation is 'masking'. Regardless, changes to runTest seem out of scope for this. |
Agree the larger changes is a separate issue - the whether to use in the CMake add_test or incorporate in the runTests should be decided on how much it is to be used - if every test in the use case needs to do it - put it in the runTest - if only a special couple tests need to use the mask, put it in the add_test command. |
|
|
||
# Apply mask replacements to FILENAME and write the results to FILENAME_masked | ||
# Uses TEST_MASKS and TEST_MASKS_REPLACE from its execution environment | ||
macro(H5_MASK_FILE FILENAME) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This macro uses variables from its environment that aren't specified as arguments. This is not ideal, but trying to directly pass in the list of mask replace expressions as a parameter proved difficult due to 1. It collapsing from a list to a string, and 2. Loss of special character escaping in a way that created a string CMake can't directly evaluate at all, preventing a simple \ -> \\
replacement to re-escape it.
Some values in h5dump output are potentially inconsistent even between files created using the exact same set of instructions with the Native connector. Specifically, these values are the offset of objects within the file and the index assigned to anonymous datatypes by h5dump.
Replace the displayed values of these fields with 'XXX' in saved reference files
Update the CMake testing code to perform this masking on output files before comparing them to the saved reference files
This is done through the TEST_FILTER argument to runTest/grepTest. Because some tests already provide one filter to apply, adding the masking capability required changing runTest and grepTest to support applying multiple filters from a provided semicolon-separated list of filters.
This was used to convert existing test files, and will be useful if more test files are added, though it is not currently used during testing runs.