Increase coverage of spack.relocate#16475
Merged
tgamblin merged 12 commits intospack:developfrom May 9, 2020
Merged
Conversation
alalazo
commented
May 5, 2020
alalazo
commented
May 5, 2020
Comment on lines
+414
to
+416
| # TODO: revisit the use of --force-rpath as it might be conditional | ||
| # TODO: if we want to support setting RUNPATH from binary packages | ||
| patchelf_args = ['--force-rpath', '--set-rpath', rpaths_str, target] |
Member
Author
There was a problem hiding this comment.
@gartung If I understand the code correctly this function will always set RPATHs and never set RUNPATHs regardless of what is in config.yaml? Is it correct?
Member
There was a problem hiding this comment.
As far as I know patchelf only handles rpaths.
Member
Author
There was a problem hiding this comment.
I'll experiment with that. I think if we don't give the --force-rpath option then the relocation will be done on RUNPATH.
gartung
approved these changes
May 5, 2020
1997b78 to
38f4cb2
Compare
alalazo
commented
May 6, 2020
|
|
||
|
|
||
| @pytest.mark.requires_executables('patchelf', 'strings', 'file', 'gcc') | ||
| def test_relocate_elf_binaries_relative_paths(hello_world, tmpdir): |
Member
Author
There was a problem hiding this comment.
This test and the one above can probably be factored better (maybe in a later PR). As a side note I think the fixture hello_world might be useful to add further relocation tests.
gartung
approved these changes
May 6, 2020
The replace_prefix_* functions have been prefixed with an underscore to signal that they are an implementation detail of the module. Docstrings have been extended.
This is needed to trigger unit tests using it
The function is no longer used in the code base
…tency In particular use "orig" and "new" consistently as a prefix for vars
38f4cb2 to
fbcf9b6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR:
patchelfto Travis to trigger tests depending on itContinuation of #15610