aboutsummaryrefslogtreecommitdiff
path: root/run_unittests.py
diff options
context:
space:
mode:
authorDaniel Schulte <trilader@schroedingers-bit.net>2018-04-11 23:14:32 +0200
committerNirbheek Chauhan <nirbheek.chauhan@gmail.com>2018-04-13 01:05:25 +0000
commit57654bf36784c771fb16d90fd39ed58849d19564 (patch)
tree2169f46dd3e138789f55e32dc708c1ff72555e70 /run_unittests.py
parent7806175c218d079bd2b608f96a902c6fcd17334d (diff)
downloadmeson-57654bf36784c771fb16d90fd39ed58849d19564.zip
meson-57654bf36784c771fb16d90fd39ed58849d19564.tar.gz
meson-57654bf36784c771fb16d90fd39ed58849d19564.tar.bz2
Deduplicate dependencies resolved to absolute paths
If paths are absolute the order of search directories is not relevant as the path is already resolved.
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-xrun_unittests.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/run_unittests.py b/run_unittests.py
index 4f688cd..a65f15d 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -198,6 +198,12 @@ class InternalTests(unittest.TestCase):
# Direct-adding the same library again still adds it
l.append_direct('-lbar')
self.assertEqual(l, ['-Lfoodir', '-lfoo', '-Lbardir', '-lbar', '-lbar'])
+ # Direct-adding with absolute path deduplicates
+ l.append_direct('/libbaz.a')
+ self.assertEqual(l, ['-Lfoodir', '-lfoo', '-Lbardir', '-lbar', '-lbar', '/libbaz.a'])
+ # Adding libbaz again does nothing
+ l.append_direct('/libbaz.a')
+ self.assertEqual(l, ['-Lfoodir', '-lfoo', '-Lbardir', '-lbar', '-lbar', '/libbaz.a'])
def test_string_templates_substitution(self):
dictfunc = mesonbuild.mesonlib.get_filenames_templates_dict