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

Side by Side Diff: mojo/devtools/common/mojo_test

Issue 1253273003: Unify casing of function names in devtools. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Rebase. Created 5 years, 4 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/devtools/common/mojo_run ('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 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2015 The Chromium Authors. All rights reserved. 2 # Copyright 2015 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 """Test runner for Mojo application tests. 6 """Test runner for Mojo application tests.
7 7
8 The file describing the list of tests has to be a valid Python program that sets 8 The file describing the list of tests has to be a valid Python program that sets
9 a |tests| global variable, containing entries of the following form: 9 a |tests| global variable, containing entries of the following form:
10 10
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 46
47 _logger = logging.getLogger() 47 _logger = logging.getLogger()
48 48
49 49
50 def main(): 50 def main():
51 parser = argparse.ArgumentParser(description=_DESCRIPTION) 51 parser = argparse.ArgumentParser(description=_DESCRIPTION)
52 parser.add_argument("test_list_file", type=file, 52 parser.add_argument("test_list_file", type=file,
53 help="a file listing apptests to run") 53 help="a file listing apptests to run")
54 54
55 # Common shell configuration arguments. 55 # Common shell configuration arguments.
56 shell_arguments.AddShellArguments(parser) 56 shell_arguments.add_shell_arguments(parser)
57 script_args, common_shell_args = parser.parse_known_args() 57 script_args, common_shell_args = parser.parse_known_args()
58 58
59 try: 59 try:
60 shell, common_shell_args = shell_arguments.ConfigureShell(script_args, 60 shell, common_shell_args = shell_arguments.configure_shell(
61 common_shell_args) 61 script_args, common_shell_args)
62 except shell_arguments.ShellConfigurationException as e: 62 except shell_arguments.ShellConfigurationException as e:
63 print e 63 print e
64 return 1 64 return 1
65 65
66 target_os = "android" if script_args.android else "linux" 66 target_os = "android" if script_args.android else "linux"
67 test_list_globals = {"target_os": target_os} 67 test_list_globals = {"target_os": target_os}
68 exec script_args.test_list_file in test_list_globals 68 exec script_args.test_list_file in test_list_globals
69 test_list = test_list_globals["tests"] 69 test_list = test_list_globals["tests"]
70 70
71 succeeded = True 71 succeeded = True
(...skipping 22 matching lines...) Expand all
94 print "Unrecognized test type in %r" % test_dict 94 print "Unrecognized test type in %r" % test_dict
95 95
96 print "Succeeded" if apptest_result else "Failed" 96 print "Succeeded" if apptest_result else "Failed"
97 _logger.info("Completed: %s" % test_name) 97 _logger.info("Completed: %s" % test_name)
98 if not apptest_result: 98 if not apptest_result:
99 succeeded = False 99 succeeded = False
100 return 0 if succeeded else 1 100 return 0 if succeeded else 1
101 101
102 if __name__ == '__main__': 102 if __name__ == '__main__':
103 sys.exit(main()) 103 sys.exit(main())
OLDNEW
« no previous file with comments | « mojo/devtools/common/mojo_run ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698