Increase coverage of spack.relocate (#16475)

- add docstrings and make parameter names consistent in `relocate.py`
- Make `replace_prefix_*` and other functions private (as they are implementation details)
- remove unused function _replace_prefix_nullterm()

- Add unit tests for `relocate.py` functions
  - add patchelf to Travis and use it during tests
  - add hello_world fixture with a compiled binary, so we can test relocation
This commit is contained in:
Massimiliano Culpo
2020-05-09 19:41:50 +02:00
committed by GitHub
parent 8671ac6a1a
commit b06bc31029
3 changed files with 287 additions and 121 deletions

View File

@@ -32,6 +32,25 @@ jobs:
dist: trusty
os: linux
language: python
addons:
apt:
# Everything but patchelf, that is not available for trusty
packages:
- ccache
- cmake
- gfortran
- graphviz
- gnupg2
- kcov
- mercurial
- ninja-build
- perl
- perl-base
- realpath
- r-base
- r-base-core
- r-base-dev
- zsh
env: [ TEST_SUITE=unit, COVERAGE=true ]
- python: '2.7'
os: linux
@@ -84,6 +103,7 @@ addons:
- kcov
- mercurial
- ninja-build
- patchelf
- perl
- perl-base
- realpath