diff options
author | Rafael Ăvila de EspĂndola <rafael@espindo.la> | 2018-07-25 09:40:54 -0700 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2018-07-25 19:40:54 +0300 |
commit | c7360dd426f06c67c9ceca85c0e36e02ae61c18b (patch) | |
tree | 856cf53bb348c77d834f92dffe7214b1ecd28ac1 /run_unittests.py | |
parent | 10a1a39961613a2a77604ef287df42efd441574c (diff) | |
download | meson-c7360dd426f06c67c9ceca85c0e36e02ae61c18b.zip meson-c7360dd426f06c67c9ceca85c0e36e02ae61c18b.tar.gz meson-c7360dd426f06c67c9ceca85c0e36e02ae61c18b.tar.bz2 |
Make the rpath order deterministic. (#3932)
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-x | run_unittests.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/run_unittests.py b/run_unittests.py index 912c843..1e5ce99 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -3600,6 +3600,25 @@ endian = 'little' return raise RuntimeError('Could not find the build rule') + def test_deterministic_rpath_order(self): + ''' + Test that the rpaths are always listed in a deterministic order. + ''' + if is_cygwin(): + 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.assertRegex(line, rpathre) + return + raise RuntimeError('Could not find the rpath') + @skipIfNoPkgconfig def test_usage_external_library(self): ''' |