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

Side by Side Diff: mojo/tools/get_test_list.py

Issue 952893003: Update from https://crrev.com/317530 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Fix gn for nacl Created 5 years, 9 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/android_mojo_shell.py ('k') | mojo/tools/mojob.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2014 The Chromium Authors. All rights reserved. 2 # Copyright 2014 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Central list of tests to run (as appropriate for a given config). Add tests 6 """Central list of tests to run (as appropriate for a given config). Add tests
7 to run by modifying this file. 7 to run by modifying this file.
8 8
9 Note that this file is both imported (by mojob.py) and run directly (via a 9 Note that this file is both imported (by mojob.py) and run directly (via a
10 recipe).""" 10 recipe)."""
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 build_dir, "mojob_test_successes"]) 173 build_dir, "mojob_test_successes"])
174 AddXvfbEntry("Dart App tests", 174 AddXvfbEntry("Dart App tests",
175 [os.path.join("mojo", "tools", "apptest_runner.py"), 175 [os.path.join("mojo", "tools", "apptest_runner.py"),
176 os.path.join("mojo", "tools", "data", "dart_apptests"), 176 os.path.join("mojo", "tools", "data", "dart_apptests"),
177 build_dir]) 177 build_dir])
178 178
179 # NaCl tests: 179 # NaCl tests:
180 if ShouldRunTest("nacl"): 180 if ShouldRunTest("nacl"):
181 AddEntry("NaCl tests", 181 AddEntry("NaCl tests",
182 [os.path.join(build_dir, "monacl_shell"), 182 [os.path.join(build_dir, "monacl_shell"),
183 os.path.join(build_dir, "irt_" + config.target_arch, 183 os.path.join(build_dir, "irt_" + config.target_cpu,
184 "irt_mojo.nexe"), 184 "irt_mojo.nexe"),
185 os.path.join(build_dir, "clang_newlib_" + config.target_arch, 185 os.path.join(build_dir, "clang_newlib_" + config.target_cpu,
186 "monacl_test.nexe")]) 186 "monacl_test.nexe")])
187 187
188 # ---------------------------------------------------------------------------- 188 # ----------------------------------------------------------------------------
189 189
190 return test_list 190 return test_list
191 191
192 192
193 def main(): 193 def main():
194 parser = argparse.ArgumentParser(description="Gets tests to execute.") 194 parser = argparse.ArgumentParser(description="Gets tests to execute.")
195 parser.add_argument("config_file", metavar="config.json", 195 parser.add_argument("config_file", metavar="config.json",
196 type=argparse.FileType("rb"), 196 type=argparse.FileType("rb"),
197 help="Input JSON file with test configuration.") 197 help="Input JSON file with test configuration.")
198 parser.add_argument("test_list_file", metavar="test_list.json", nargs="?", 198 parser.add_argument("test_list_file", metavar="test_list.json", nargs="?",
199 type=argparse.FileType("wb"), default=sys.stdout, 199 type=argparse.FileType("wb"), default=sys.stdout,
200 help="Output JSON file with test list.") 200 help="Output JSON file with test list.")
201 args = parser.parse_args() 201 args = parser.parse_args()
202 202
203 config = Config(**json.load(args.config_file)) 203 config = Config(**json.load(args.config_file))
204 test_list = GetTestList(config) 204 test_list = GetTestList(config)
205 json.dump(test_list, args.test_list_file, indent=2) 205 json.dump(test_list, args.test_list_file, indent=2)
206 args.test_list_file.write("\n") 206 args.test_list_file.write("\n")
207 207
208 return 0 208 return 0
209 209
210 210
211 if __name__ == "__main__": 211 if __name__ == "__main__":
212 sys.exit(main()) 212 sys.exit(main())
OLDNEW
« no previous file with comments | « mojo/tools/android_mojo_shell.py ('k') | mojo/tools/mojob.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698