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

Add an argument to exclude SIO files from some tests #387

Merged
merged 8 commits into from
Apr 21, 2023

Conversation

jmcarcell
Copy link
Member

@jmcarcell jmcarcell commented Mar 10, 2023

BEGINRELEASENOTES

  • Make sure that the dump model round trip tests work without ENABLE_SIO
  • Actually test the extension model dumping

ENDRELEASENOTES

This allows not to have to cleanup a few folders in test in case the SIO files are present, which would break the tests. Useful in case one is switching between SIO and non-SIO for example

@tmadlener
Copy link
Collaborator

Thanks for this. Since I always build everything nowadays, it seems I no longer realize the small issues in switching between with and without SIO. I would do this slightly differently from a conceptual point of view:

  • Make the COMP_BASE_FOLDER a required argument of the dumpModelRoundTrip.sh script, and adapt the CMakeLists.txt to pass in . for the datamodel case (or the full path)
  • Make the dumpModelRoundTrip.sh script simply take additional arguments, that we simply pass on directly to the diff commands (using shift and $@)
  • In CMakeLists.txt make a variable for which the value depends on ENABLE_SIO and simply pass that on to the script which should then do the right thing automatically

This approach would only have one if block instead of a few coupled ones, and it wouldn't need the boolean flag.

jmcarcell and others added 4 commits April 3, 2023 14:10
- Rework script and CMakeLists to pass in more information in
  environment
- Format CMakeLists for slightly better readability
@tmadlener
Copy link
Collaborator

tmadlener commented Apr 3, 2023

rebased this onto the latest master and reworked the overall logic slightly to remove a few of the if/else branches. I have tried toggling the ENABLE_SIO option locally and this worked. @jmcarcell could you still have a second look before we merge this (low priority).

@jmcarcell
Copy link
Member Author

I'll have a look at this; I found out that in the original version the extension test was not being run correctly (it was the same as the non-extension one) so I need to have a look in detail

@jmcarcell
Copy link
Member Author

jmcarcell commented Apr 20, 2023

I see now that you fixed that on your last commit. I started working but never pushed it...
I have made one extra change and that is checking for whether clang-format is being used right now or not. Currently the tests will fail if the cmake option is disabled so the last commit checks for that and the tests now pass with and without clang-format. I don't have any more comments about this; feel free to merge

@jmcarcell
Copy link
Member Author

Now it works for non SIO, SIO builds with and without clang-format and also going from non-SIO to SIO and viceversa

@tmadlener
Copy link
Collaborator

Thanks again for checking. Waiting for the CI before merging.

@tmadlener tmadlener merged commit ffc34c1 into AIDASoft:master Apr 21, 2023
tmadlener added a commit to tmadlener/podio that referenced this pull request May 4, 2023
* Actually check extension model dumping

* Rework script and CMakeLists to pass in more information in
  environment

* Also check when clang format is used
---------

Co-authored-by: jmcarcell <jmcarcell@users.noreply.github.com>
Co-authored-by: Thomas Madlener <thomas.madlener@desy.de>
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.

2 participants