Skip to content

Add more unit tests to "spack.relocate"#15654

Merged
alalazo merged 5 commits intospack:developfrom
alalazo:maintainers/improve_relocate_coverage
Apr 27, 2020
Merged

Add more unit tests to "spack.relocate"#15654
alalazo merged 5 commits intospack:developfrom
alalazo:maintainers/improve_relocate_coverage

Conversation

@alalazo
Copy link
Copy Markdown
Member

@alalazo alalazo commented Mar 24, 2020

This PR introduces trivial refactoring in:

  • get_existing_elf_rpaths
  • get_relative_elf_rpaths
  • get_normalized_elf_rpaths
  • set_placeholder

mainly to be more consistent with practices used in other parts of the code and to simplify functions locally. It also adds or reworks unit tests for these functions and extends their docstrings.

@alalazo alalazo added tests General test capability(ies) maintainers labels Mar 24, 2020
@alalazo alalazo force-pushed the maintainers/improve_relocate_coverage branch from 860c9af to 6b22e22 Compare March 27, 2020 08:57
@alalazo alalazo marked this pull request as ready for review March 27, 2020 13:29
@alalazo alalazo requested review from gartung and scheibelp March 27, 2020 13:29
@alalazo
Copy link
Copy Markdown
Member Author

alalazo commented Mar 27, 2020

@gartung I'm curious of what you think of small PRs like this one as an additional way to work on improving coverage of relocate.py. Please let me know if you disagree with anything (renaming, simplifications in the code etc.) that is done here.

@scheibelp Do you know if there's the possibility, when we'll eventually merge this PR, to give the authorship to Patrick? I don't mind being a co-author but I'd like that people looking at this part of the code sees him as the author (since I'm just doing trivial cleaning and unit testing of functions).

Copy link
Copy Markdown
Member

@gartung gartung left a comment

Choose a reason for hiding this comment

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

Looks fine to me.

@scheibelp scheibelp self-assigned this Mar 31, 2020
Copy link
Copy Markdown
Member

@scheibelp scheibelp left a comment

Choose a reason for hiding this comment

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

This looks great but I have a few requests relating to docstrings. Let me know if you agree or if the requests don't make sense (I had to think about this awhile to come up with suggestions that seemed good, so I wouldn't be surprised if I made it more confusing).

alalazo added 5 commits April 23, 2020 11:24
Also added parametrized unit tests for that function
Added parametrized unit tests for that function
The function doesn't set anything, but constructs
and returns a placeholder of the correct length
@alalazo alalazo force-pushed the maintainers/improve_relocate_coverage branch from f600b70 to d86cee6 Compare April 23, 2020 12:52
@alalazo
Copy link
Copy Markdown
Member Author

alalazo commented Apr 23, 2020

Thanks for the review @scheibelp Let me know if anything else is needed here.

@alalazo alalazo merged commit 6b648c6 into spack:develop Apr 27, 2020
@alalazo alalazo deleted the maintainers/improve_relocate_coverage branch April 27, 2020 10:17
@alalazo
Copy link
Copy Markdown
Member Author

alalazo commented Apr 27, 2020

Thanks for the review @scheibelp !

alalazo added a commit to alalazo/spack that referenced this pull request Apr 28, 2020
This was an oversight in spack#15654 since `os.path.isfile`
checks that the something is a file in the current
filesystem.
alalazo added a commit that referenced this pull request Apr 28, 2020
This was an oversight in #15654 since `os.path.isfile`
checks that the something is a file in the current
filesystem.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainers tests General test capability(ies)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants