From 1a27714f97b8f6d716e376e9fcf8e9f79f029c86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20=C3=81vila=20de=20Esp=C3=ADndola?= Date: Sun, 22 Jul 2018 22:24:42 -0700 Subject: Make the dependency order deterministic. (#3927) We were using sets to store the dependencies. Just switch to OrderedSet. Fixes #3922. --- run_unittests.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'run_unittests.py') 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): ''' -- cgit v1.1