Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(98)

Side by Side Diff: mojo/tools/mopy/gn_unittest.py

Issue 1442523002: Get rid of the use_glib gn variable. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import itertools 5 import itertools
6 import sys 6 import sys
7 import unittest 7 import unittest
8 8
9 import mopy.gn as gn 9 import mopy.gn as gn
10 10
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 "is_asan": [False, True], 52 "is_asan": [False, True],
53 "use_goma": [False], 53 "use_goma": [False],
54 "mojo_use_nacl": [False, True], 54 "mojo_use_nacl": [False, True],
55 "mojo_use_go": [False], 55 "mojo_use_go": [False],
56 "dcheck_always_on": [False, True], 56 "dcheck_always_on": [False, True],
57 } 57 }
58 58
59 for args in _iterate_over_config(configs_to_test): 59 for args in _iterate_over_config(configs_to_test):
60 if args.get("target_os", None) is None and sys.platform[:5] == "linux": 60 if args.get("target_os", None) is None and sys.platform[:5] == "linux":
61 args["use_aura"] = False 61 args["use_aura"] = False
62 args["use_glib"] = False
63 config = gn.ConfigForGNArgs(args) 62 config = gn.ConfigForGNArgs(args)
64 new_args = gn.GNArgsForConfig(config) 63 new_args = gn.GNArgsForConfig(config)
65 self.assertDictEqual(args, new_args) 64 self.assertDictEqual(args, new_args)
66 65
67 66
68 def _iterate_over_config(config): 67 def _iterate_over_config(config):
69 def product_to_dict(p): 68 def product_to_dict(p):
70 return dict(filter(lambda x: x[1] is not None, zip(config.keys(), p))) 69 return dict(filter(lambda x: x[1] is not None, zip(config.keys(), p)))
71 return itertools.imap(product_to_dict, itertools.product(*config.values())) 70 return itertools.imap(product_to_dict, itertools.product(*config.values()))
72 71
73 72
74 if __name__ == "__main__": 73 if __name__ == "__main__":
75 unittest.main() 74 unittest.main()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698