aboutsummaryrefslogtreecommitdiff
path: root/run_unittests.py
diff options
context:
space:
mode:
authorRafael Ávila de Espíndola <rafael@espindo.la>2018-07-22 22:24:42 -0700
committerNirbheek Chauhan <nirbheek.chauhan@gmail.com>2018-07-22 22:24:42 -0700
commit1a27714f97b8f6d716e376e9fcf8e9f79f029c86 (patch)
tree72e8d1e702d6086a68e6011b460043f5a937c9cb /run_unittests.py
parent6fafbad6d5ba591075a72e4726af647cece7020d (diff)
downloadmeson-1a27714f97b8f6d716e376e9fcf8e9f79f029c86.zip
meson-1a27714f97b8f6d716e376e9fcf8e9f79f029c86.tar.gz
meson-1a27714f97b8f6d716e376e9fcf8e9f79f029c86.tar.bz2
Make the dependency order deterministic. (#3927)
We were using sets to store the dependencies. Just switch to OrderedSet. Fixes #3922.
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-xrun_unittests.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/run_unittests.py b/run_unittests.py
index dd109aa..912c843 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -3587,6 +3587,19 @@ endian = 'little'
self.build()
self.run_tests()
+ def test_deterministic_dep_order(self):
+ '''
+ Test that the dependencies are always listed in a deterministic order.
+ '''
+ testdir = os.path.join(self.common_test_dir, '206 dep order')
+ self.init(testdir)
+ with open(os.path.join(self.builddir, 'build.ninja')) as bfile:
+ for line in bfile:
+ if 'build myexe:' in line or 'build myexe.exe:' in line:
+ self.assertIn('liblib1.a liblib2.a', line)
+ return
+ raise RuntimeError('Could not find the build rule')
+
@skipIfNoPkgconfig
def test_usage_external_library(self):
'''