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

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

Issue 780563002: Update unit test file format. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Follow review Created 6 years 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/data/unittests ('k') | mojo/tools/test_runner.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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 if target_os not in (Config.OS_ANDROID, Config.OS_LINUX, Config.OS_WINDOWS): 66 if target_os not in (Config.OS_ANDROID, Config.OS_LINUX, Config.OS_WINDOWS):
67 return test_list 67 return test_list
68 68
69 # Tests run by default ------------------------------------------------------- 69 # Tests run by default -------------------------------------------------------
70 70
71 # C++ unit tests: 71 # C++ unit tests:
72 if ShouldRunTest(Config.TEST_TYPE_DEFAULT, Config.TEST_TYPE_UNIT): 72 if ShouldRunTest(Config.TEST_TYPE_DEFAULT, Config.TEST_TYPE_UNIT):
73 unit_test_command = [os.path.join("mojo", "tools", "test_runner.py")] 73 unit_test_command = [os.path.join("mojo", "tools", "test_runner.py")]
74 if target_os == Config.OS_ANDROID: 74 if target_os == Config.OS_ANDROID:
75 unit_test_command.append("--android") 75 unit_test_command.append("--android")
76 unittests_file = "android_unittests"
77 else:
78 unittests_file = "unittests"
79 unit_test_command.extend( 76 unit_test_command.extend(
80 [os.path.join("mojo", "tools", "data", unittests_file), build_dir, 77 [os.path.join("mojo", "tools", "data", "unittests"), build_dir,
81 "mojob_test_successes"]) 78 "mojob_test_successes"])
82 AddXvfbEntry("Unit tests", unit_test_command) 79 AddXvfbEntry("Unit tests", unit_test_command)
83 80
84 # C++ app tests: 81 # C++ app tests:
85 if target_os != Config.OS_ANDROID and ShouldRunTest(Config.TEST_TYPE_DEFAULT, 82 if target_os != Config.OS_ANDROID and ShouldRunTest(Config.TEST_TYPE_DEFAULT,
86 "app"): 83 "app"):
87 AddXvfbEntry("App tests", 84 AddXvfbEntry("App tests",
88 [os.path.join("mojo", "tools", "apptest_runner.py"), 85 [os.path.join("mojo", "tools", "apptest_runner.py"),
89 os.path.join("mojo", "tools", "data", "apptests"), 86 os.path.join("mojo", "tools", "data", "apptests"),
90 build_dir]) 87 build_dir])
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 config = Config(**json.load(args.config_file)) 163 config = Config(**json.load(args.config_file))
167 test_list = GetTestList(config) 164 test_list = GetTestList(config)
168 json.dump(test_list, args.test_list_file, indent=2) 165 json.dump(test_list, args.test_list_file, indent=2)
169 args.test_list_file.write("\n") 166 args.test_list_file.write("\n")
170 167
171 return 0 168 return 0
172 169
173 170
174 if __name__ == "__main__": 171 if __name__ == "__main__":
175 sys.exit(main()) 172 sys.exit(main())
OLDNEW
« no previous file with comments | « mojo/tools/data/unittests ('k') | mojo/tools/test_runner.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698