diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2017-11-26 19:07:31 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2017-11-26 19:07:31 +0200 |
commit | fdca526c2342a17716f030dc2ff02b38c19ab5cd (patch) | |
tree | 0f09bde56885451d66271e6293cc650d3d36364e | |
parent | 3cb7205e46de034457b020ab7347eb955f66fe59 (diff) | |
download | meson-fdca526c2342a17716f030dc2ff02b38c19ab5cd.tar.gz |
Fix rpath tests on Linux.
-rwxr-xr-x | run_unittests.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/run_unittests.py b/run_unittests.py index fe7507470..52cd419a2 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -1,4 +1,3 @@ - #!/usr/bin/env python3 # Copyright 2016-2017 The Meson development team @@ -57,7 +56,7 @@ def get_dynamic_section_entry(fname, entry): m = pattern.search(line) if m is not None: return m.group(1) - raise RuntimeError('Could not determine {}:\n\n'.format(entry) + raw_out) + return None # The file did not contain the specified entry. def get_soname(fname): return get_dynamic_section_entry(fname, 'soname') @@ -1359,12 +1358,15 @@ int main(int argc, char **argv) { testdir = os.path.join(self.common_test_dir, '46 library chain') self.init(testdir) self.build() - for each in ('prog', 'subdir/liblib1.so', 'subdir/subdir2/liblib2.so', - 'subdir/subdir3/liblib3.so'): + for each in ('prog', 'subdir/liblib1.so', ): rpath = get_rpath(os.path.join(self.builddir, each)) self.assertTrue(rpath) for path in rpath.split(':'): self.assertTrue(path.startswith('$ORIGIN'), msg=(each, path)) + # These two don't link to anything else, so they do not need an rpath entry. + for each in ('subdir/subdir2/liblib2.so', 'subdir/subdir3/liblib3.so'): + rpath = get_rpath(os.path.join(self.builddir, each)) + self.assertTrue(rpath is None) def test_dash_d_dedup(self): testdir = os.path.join(self.unit_test_dir, '10 d dedup') |