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

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

Issue 1924843002: Motown: Remove ffmpeg_branding arg to fix fnl build. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Remove bogus BUILDCONFIG.gn change. Created 4 years, 7 months 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
« no previous file with comments | « mojo/tools/mopy/gn.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 "target_os": [None, "android"], 47 "target_os": [None, "android"],
48 "target_cpu": ["x86", "x64", "arm", "arm64"], 48 "target_cpu": ["x86", "x64", "arm", "arm64"],
49 "is_debug": [False, True], 49 "is_debug": [False, True],
50 "is_official_build": [False, True], 50 "is_official_build": [False, True],
51 "is_clang": [False, True], 51 "is_clang": [False, True],
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 "ffmpeg_branding": ["ChromeOS"],
58 } 57 }
59 58
60 for args in _iterate_over_config(configs_to_test): 59 for args in _iterate_over_config(configs_to_test):
61 if args.get("target_os") == "android" and args["ffmpeg_branding"]:
62 continue
63 config = gn.ConfigForGNArgs(args) 60 config = gn.ConfigForGNArgs(args)
64 new_args = gn.GNArgsForConfig(config) 61 new_args = gn.GNArgsForConfig(config)
65 self.assertDictEqual(args, new_args) 62 self.assertDictEqual(args, new_args)
66 63
67 64
68 def _iterate_over_config(config): 65 def _iterate_over_config(config):
69 def product_to_dict(p): 66 def product_to_dict(p):
70 return dict(filter(lambda x: x[1] is not None, zip(config.keys(), p))) 67 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())) 68 return itertools.imap(product_to_dict, itertools.product(*config.values()))
72 69
73 70
74 if __name__ == "__main__": 71 if __name__ == "__main__":
75 unittest.main() 72 unittest.main()
OLDNEW
« no previous file with comments | « mojo/tools/mopy/gn.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698