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

regex project file parameter #2945

Merged
merged 6 commits into from
Jun 2, 2020
Merged

regex project file parameter #2945

merged 6 commits into from
Jun 2, 2020

Conversation

bilke
Copy link
Member

@bilke bilke commented May 14, 2020

Adds a regex project file parameter to the vtkdiff-section.

The main idea is to put the test tolerances/criteria together with the project files. Currently it is possible by specifying individual files to be compared, which is a little lengthy. With globbing this shall become much easier.

TODO:

  • Handle parallel case (Other PR)
  • Migrate other benchmarks

  1. Feature description was added to the changelog
  2. Tests covering your feature were added?
  3. Any new feature or behavior change was documented?

// TODO: insert rank into regex for mpi case
DBUG("vtkdiff regex is '{}'.", *regex_string);
auto const regex = std::regex(*regex_string);
for (auto& p: fs::directory_iterator(fs::path(reference_path)))
Copy link
Member

Choose a reason for hiding this comment

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

Yes, that's good. The file names are taken from the reference directory.

@endJunction
Copy link
Member

I'll provide a script to convert AddTest to OgsTest for GLOBbed cases...

@endJunction
Copy link
Member

So long I'm busy with the converter maybe there are some comments about the extension. Would be nice!

@TomFischer
Copy link
Member

maybe there are some comments about the extension. Would be nice!

IMHO it is a useful extension. Will do a review when the status is changed from Draft to PR.

@endJunction
Copy link
Member

Replaced all "GLOB"bed RichardsMechanics tests with prj-file <test_definition> and cmake's OgsTest. If the reviewer agree on the changes, I'll finish the conversion for all processes.

Generation of the <test_definition> section is automatic with a script in the cmake file: see "[cmake] Parsing of GLOBbed vtkdiffs to xml." commit. The AddTest to OgsTest is manual because of additional conditions and comments.

@endJunction endJunction marked this pull request as ready for review May 27, 2020 13:25
Copy link
Member

@TomFischer TomFischer left a comment

Choose a reason for hiding this comment

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

Small questions only. Then ⏩

Copy link
Member Author

@bilke bilke left a comment

Choose a reason for hiding this comment

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

Go ahead with the remaining conversion!

bilke and others added 4 commits June 1, 2020 19:09
Can be used inside a project file similar to the glob expression
in AddTest() (CMake). If the regex-parameter is present, the `file`-
parameter is ignored and can be omitted.
Move test's definition into the project file.
Store commands to shell script to be executed once.
@endJunction
Copy link
Member

All GLOBbed ctests but LIE/cohezive zone converted. The particular test uses different name for the two fields, which is not yet supported by the <test_definition>s.

Copy link
Member Author

@bilke bilke left a comment

Choose a reason for hiding this comment

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

👍

@TomFischer TomFischer merged commit db00140 into ufz:master Jun 2, 2020
@bilke bilke deleted the test-regex branch June 2, 2020 12:48
@ogsbot
Copy link
Member

ogsbot commented Jun 19, 2020

OpenGeoSys development has been moved to GitLab.

See this pull request on GitLab.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants