diff options
author | Rafael Ăvila de EspĂndola <rafael@espindo.la> | 2018-07-24 20:52:07 -0700 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2018-08-24 03:11:32 +0530 |
commit | 2df8ddc8be43b70bc5f8acaa8207813ace755392 (patch) | |
tree | f2a1120c0f5181583aa53b12ce7b67e92cefd603 | |
parent | 48ea894774baff0a4d2e13d931055ffad399b356 (diff) | |
download | meson-2df8ddc8be43b70bc5f8acaa8207813ace755392.zip meson-2df8ddc8be43b70bc5f8acaa8207813ace755392.tar.gz meson-2df8ddc8be43b70bc5f8acaa8207813ace755392.tar.bz2 |
Try to fix the test on OS X.
On OS X the paths are absolute and there is one -rpath option per
subproject.
Unfortunately we cannot just look for
-rpath,.*/subprojects/sub1.*/subprojects/sub2
as on linux the -rpath option is followed by -rpath-link and the test
would pass even without the patch.
-rwxr-xr-x | run_unittests.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/run_unittests.py b/run_unittests.py index 90ac418..806390c 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -3584,10 +3584,14 @@ endian = 'little' raise unittest.SkipTest('rpath are not used on Cygwin') testdir = os.path.join(self.unit_test_dir, '35 rpath order') self.init(testdir) + if is_osx(): + rpathre = re.compile('-rpath,.*/subprojects/sub1.*-rpath,.*/subprojects/sub2') + else: + rpathre = re.compile('-rpath,\$\$ORIGIN/subprojects/sub1:\$\$ORIGIN/subprojects/sub2') with open(os.path.join(self.builddir, 'build.ninja')) as bfile: for line in bfile: if '-rpath' in line: - self.assertIn('-rpath,$$ORIGIN/subprojects/sub1:$$ORIGIN/subprojects/sub2', line) + self.assertRegex(line, rpathre) return raise RuntimeError('Could not find the rpath') |