add support for using 'sources' and 'git_config' for extensions in 'exts_list'#3294
Conversation
|
I've successfully tested this feature with one of our internal Git packages. In my EasyConfig file, I have an extensions block: When I run with the production but when I run with my personal checkout, it succeeds: Is there documentation for how to create a new unit test? I'd love to exercise this in some way as part of the pull request. |
|
@boegel Suggested that a unit test could be added to either the easyblock.py or toy_build.py tests. I think I can do this, but neither one appears to actually perform a download of sources. What I would want to test is a dictionary entry like and see that either the download actually occurs (ideal) or at least that the contents of 'git_config' is seen and is validated. |
|
I don't think I need to actually " see that ... the download actually occurs (ideal)." The filetools.py tests already include For this situation, I just need to test whether having a 'git_config' dictionary in Update. Well, that didn't go so well. The test failed (which I expected), but then spewed hundreds of lines of DEBUG output. I'm sure an explanation for the failure is in there somewhere... |
|
I just noticed that |
|
@akesandgren That's a good question! The allowed content of In the code of this PR, I didn't want to try to change how The EasyConfigs which make use of My write up of |
boegel
left a comment
There was a problem hiding this comment.
@kelseymh Great job on figuring this out, I'm sure that took a fair amount of effort...
An enhanced test for obtain_file to cover the use of git_config makes sense too, but that can also be tackled in a separate PR I think, up to you...
I agree with @akesandgren's remark w.r.t. git_config vs sources (only read his comment after I wrote up mine, so I'll leave it in place).
…, as well as for tarball itself. Suggested by @boegel.
|
@boegel wrote:
No need. I got most of the way through writing it, and discovered that |
… key in extensions step.
|
This isn't working. If I use a The command that tries to get executed is (this is from running test.framework.toy_build): where it's plugged in the name of the tarball itself as the thing to be compiled! |
…sion_sources. In toy_build.py, use 'ext_code' instead of 'ext_src' to avoid confusion with easyblock.py code.
|
Solved! Instead of the whole data-structure output from the new However, |
…ks done in fetch_source and fetch_sources.
…f extension name.
allow single-element list as 'sources' value in exts_list
|
Close & re-open to try and get Travis to wake up... You're running on fumes here Travis, seriously... |
Modify
fetch_extension_sources()so that when a source dictionary is included in anexts_listentry, it looks forgit_config, and passes the latter through toobtain_file(). This allows us to pull extensions from Git the same way we pull regular sources, including creating a local tar-ball on the fly.I plan to make this a "draft" (WIP) PR initially, because I haven't been able to explicitly test my code changes.edit (@boegel): fixes #3251