aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael Ávila de Espíndola <rafael@espindo.la>2018-07-24 20:52:07 -0700
committerNirbheek Chauhan <nirbheek@centricular.com>2018-08-24 03:11:32 +0530
commit2df8ddc8be43b70bc5f8acaa8207813ace755392 (patch)
treef2a1120c0f5181583aa53b12ce7b67e92cefd603
parent48ea894774baff0a4d2e13d931055ffad399b356 (diff)
downloadmeson-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-xrun_unittests.py6
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')