diff options
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): ''' |