diff options
author | Rafael Ăvila de EspĂndola <rafael@espindo.la> | 2018-07-22 22:24:42 -0700 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek.chauhan@gmail.com> | 2018-07-22 22:24:42 -0700 |
commit | 1a27714f97b8f6d716e376e9fcf8e9f79f029c86 (patch) | |
tree | 72e8d1e702d6086a68e6011b460043f5a937c9cb /run_unittests.py | |
parent | 6fafbad6d5ba591075a72e4726af647cece7020d (diff) | |
download | meson-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-x | run_unittests.py | 13 |
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): ''' |