Commit 4ebfe464 authored by Edward Lemur's avatar Edward Lemur Committed by Commit Bot

depot_tools: Fix flaky gclient_test test.

Dependencies are processed in order, so they don't have to be sorted.
target_os for each dependency is a set [1], so it should be sorted to avoid flaky failures.

[1] https://cs.chromium.org/chromium/tools/depot_tools/gclient.py?l=368

Bug: 984182
Change-Id: I3e84f3cb85f9cb1920b7abf7a45766f3a518f4c1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1789278
Auto-Submit: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@google.com>
Reviewed-by: 's avatarAndrii Shyshkalov <tandrii@google.com>
parent 711dc5e1
......@@ -565,8 +565,8 @@ class GclientTest(trial_dir.TestCase):
obj = gclient.GClient.LoadCurrentConfig(options)
obj.RunOnDeps('None', [])
self.assertEqual(['unix'], sorted(obj.enforced_os))
self.assertEqual([('unix',), ('unix', 'baz')],
sorted(dep.target_os for dep in obj.dependencies))
self.assertEqual([['baz', 'unix'], ['unix']],
[sorted(dep.target_os) for dep in obj.dependencies])
self.assertEqual([('foo', 'svn://example.com/foo'),
('bar', 'svn://example.com/bar')],
self._get_processed())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment