diff options
author | Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com> | 2020-05-20 09:11:26 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-20 18:11:26 +0200 |
commit | 92989fbbfdc68c25df64004c6b0802431cc4055d (patch) | |
tree | d0be3488b5444c1ad8d6c96d58817f849820282f | |
parent | cc08070da9e9ef41f6a6630a17d8b3c25f25cf0e (diff) | |
download | spack-92989fbbfdc68c25df64004c6b0802431cc4055d.tar.gz spack-92989fbbfdc68c25df64004c6b0802431cc4055d.tar.bz2 spack-92989fbbfdc68c25df64004c6b0802431cc4055d.tar.xz spack-92989fbbfdc68c25df64004c6b0802431cc4055d.zip |
tests: check presence not equality for rpath changes (#16637)
Fixes #16636
-rw-r--r-- | lib/spack/spack/test/relocate.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/spack/spack/test/relocate.py b/lib/spack/spack/test/relocate.py index a594f1a9ba..d9becebe7b 100644 --- a/lib/spack/spack/test/relocate.py +++ b/lib/spack/spack/test/relocate.py @@ -253,7 +253,9 @@ def test_replace_prefix_bin(hello_world): # Check that the RPATHs changed patchelf = spack.util.executable.which('patchelf') output = patchelf('--print-rpath', str(executable), output=str) - assert output.strip() == '/foo/lib:/foo/lib64' + + # Some compilers add rpaths so ensure changes included in final result + assert '/foo/lib:/foo/lib64' in output @pytest.mark.requires_executables('patchelf', 'strings', 'file', 'gcc') @@ -280,7 +282,9 @@ def test_relocate_elf_binaries_absolute_paths(hello_world, tmpdir): # Check that the RPATHs changed patchelf = spack.util.executable.which('patchelf') output = patchelf('--print-rpath', str(new_binary), output=str) - assert output.strip() == '/foo/lib:/usr/lib64' + + # Some compilers add rpaths so ensure changes included in final result + assert '/foo/lib:/usr/lib64' in output @pytest.mark.requires_executables('patchelf', 'strings', 'file', 'gcc') @@ -307,4 +311,6 @@ def test_relocate_elf_binaries_relative_paths(hello_world, tmpdir): # Check that the RPATHs changed patchelf = spack.util.executable.which('patchelf') output = patchelf('--print-rpath', str(new_binary), output=str) - assert output.strip() == '/foo/lib:/foo/lib64:/opt/local/lib' + + # Some compilers add rpaths so ensure changes included in final result + assert '/foo/lib:/foo/lib64:/opt/local/lib' in output |