-
Notifications
You must be signed in to change notification settings - Fork 218
add support for enhancing existing sanity check #3288
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
73f7993 to
f8844f7
Compare
…er tests by doing proper cleanup w.r.t. included toy easyblock
365b675 to
184791d
Compare
lexming
left a comment
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 works very well. I tested the enhance_sanity_check option with a stripped down version of LAMMPS-3Mar2020-intel-2019b-Python-3.7.4-kokkos.eb from PR easybuilders/easybuild-easyconfigs#10418 and it worked as intended in the following cases
enhance_sanity_check = False: sanity checks included the files from the easyblock and the command from the EC (ignoring commands from easyblock)enhance_sanity_check = True: sanity checks included the files from the easyblock and the commands from both the EC and the easyblockenhance_sanity_check = Trueand removing the sanity check command from the EC: sanity checks included the files from the easyblock and it did perform the commands from the easyblockenhance_sanity_check = True, addsanity_check_filesto EC and remove all sanity check command from the EC: sanity checks added the files from the EC to those set by the easyblock and it did perform the commands set in the easyblock
The unit test test.framework.toy_build also went fine and it successfully finished.
I only have one remark, I think that it is counter-intuitive having to forcefully add and empty dirs to sanity_check_files when we only want to add files to the sanity check with enhance_sanity_check = True. Adding an empty dirs does not break the sanity checks, it just gets added to the list of paths, but I would make it mandatory only if enhance_sanity_check = False.
…n enhance_sanity_check_paths is enabled + bug fix under dry run for tuple entries in sanity_check_paths
@lexming That restriction is actually lifted implicitly when I've covered that in the test added in 4ee9d25, and also fixed two minor bugs I ran into because of adding that test in 23167d5... |
|
@boegel this is not the case on my side. For instance, if I add to LAMMPS-3Mar2020-intel-2019b-Python-3.7.4-kokkos.eb the following I get the following error
edit: I forgot to mention that I tested it with the last commits from this PR |
…FormatZeroOne._reformat_line
lexming
left a comment
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.
LGTM
sanity_check_paths = {'files': ['foo.bar']}in test ECenhance_sanity_check = FalseFAIL (as intended). Sanity checks only include paths from EC and these do not fulfil the required keys insanity_check_paths. Adding{'dirs': ''}tosanity_check_pathsmakes the checks to pass.enhance_sanity_check = TruePASS. Sanity checks include paths set by easyblock/default and the single file added from EC
sanity_check_commands = ["touch foo.bar"]in test ECenhance_sanity_check = FalsePASS. Sanity checks only include the touch command from ECenhance_sanity_check = TruePASS. Sanity checks include commands set by easyblock/default and taht from EC
Any combination of the above sanity_check_paths and sanity_check_commands works in the same manner, as expected.
-
I also tested PyGTK-2.24.0-foss-2018b-Python-2.7.15.eb, which has
sanity_check_commandswith multiple tuple elements. It works as expected in both cases ofenhance_sanity_checkenhance_sanity_check = FalsePASS.
== sanity checking...
file 'lib/pkgconfig/pygtk-2.0.pc' found: OK
(non-empty) directory 'lib/pygtk' found: OK
running command 'python -c 'import gtk'': OK
running command 'python -c 'import gtk.glade'': OKenhance_sanity_check = TruePASS.
== sanity checking...
file 'lib/pkgconfig/pygtk-2.0.pc' found: OK
(non-empty) directory 'bin' found: OK
(non-empty) directory 'lib' or 'lib64' found: OK
(non-empty) directory 'lib/pygtk' found: OK
running command 'python -c 'import gtk'': OK
running command 'python -c 'import gtk.glade'': OK -
Unit tests
- test.framework.toy_build: PASS
- test.framework.easyblock: PASS
lexming
left a comment
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.
LGTM
|
Going in, thanks @boegel ! |
Following the issue that was raised by @ocaisa in easybuilders/easybuild-easyconfigs#10418, where defining
sanity_check_commandsin a LAMMPS easyconfig causes other checks that are run by the easyblock to be skipped, I think it's time to add support for specifying that thesanity_check_commandsandsanity_check_pathsspecified in the easyconfig file should be run in addition to what the easyblock already checks, rather than overriding them.This PR adds support for doing so, via: