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

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

Issue 878933003: Move the apptest runner and parts of mopy to the public SDK. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 10 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/check_mojom_golden_files.py ('k') | mojo/tools/mojo_demo.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)."""
11 11
12 12
13 import argparse 13 import argparse
14 import json 14 import json
15 import os 15 import os
16 import sys 16 import sys
17 17
18 import add_sdk_tools_to_path
18 from mopy.config import Config 19 from mopy.config import Config
19 from mopy.paths import Paths 20 from mopy.paths import Paths
20 21
21 22
22 def GetTestList(config): 23 def GetTestList(config):
23 """Gets the list of tests to run for the given config. The test list (which is 24 """Gets the list of tests to run for the given config. The test list (which is
24 returned) is just a list of dictionaries, each dictionary having two required 25 returned) is just a list of dictionaries, each dictionary having two required
25 fields: 26 fields:
26 { 27 {
27 "name": "Short name", 28 "name": "Short name",
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 unit_test_command.append("--android") 80 unit_test_command.append("--android")
80 unit_test_command.extend( 81 unit_test_command.extend(
81 [os.path.join("mojo", "tools", "data", "unittests"), build_dir, 82 [os.path.join("mojo", "tools", "data", "unittests"), build_dir,
82 "mojob_test_successes"]) 83 "mojob_test_successes"])
83 AddXvfbEntry("Unit tests", unit_test_command) 84 AddXvfbEntry("Unit tests", unit_test_command)
84 85
85 # C++ app tests: 86 # C++ app tests:
86 if target_os != Config.OS_ANDROID and ShouldRunTest(Config.TEST_TYPE_DEFAULT, 87 if target_os != Config.OS_ANDROID and ShouldRunTest(Config.TEST_TYPE_DEFAULT,
87 "app"): 88 "app"):
88 AddXvfbEntry("App tests", 89 AddXvfbEntry("App tests",
89 [os.path.join("mojo", "tools", "apptest_runner.py"), 90 [os.path.join("mojo", "public", "tools", "apptest_runner.py"),
90 os.path.join("mojo", "tools", "data", "apptests"), 91 os.path.join("mojo", "tools", "data", "apptests"),
91 build_dir]) 92 build_dir])
92 93
93 # Python unit tests: 94 # Python unit tests:
94 if ShouldRunTest(Config.TEST_TYPE_DEFAULT, Config.TEST_TYPE_UNIT, "python"): 95 if ShouldRunTest(Config.TEST_TYPE_DEFAULT, Config.TEST_TYPE_UNIT, "python"):
95 AddEntry("Python unit tests", 96 AddEntry("Python unit tests",
96 ["python", os.path.join("mojo", "tools", 97 ["python", os.path.join("mojo", "tools",
97 "run_mojo_python_tests.py")]) 98 "run_mojo_python_tests.py")])
98 99
99 # Python bindings tests (Linux-only): 100 # Python bindings tests (Linux-only):
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 config = Config(**json.load(args.config_file)) 204 config = Config(**json.load(args.config_file))
204 test_list = GetTestList(config) 205 test_list = GetTestList(config)
205 json.dump(test_list, args.test_list_file, indent=2) 206 json.dump(test_list, args.test_list_file, indent=2)
206 args.test_list_file.write("\n") 207 args.test_list_file.write("\n")
207 208
208 return 0 209 return 0
209 210
210 211
211 if __name__ == "__main__": 212 if __name__ == "__main__":
212 sys.exit(main()) 213 sys.exit(main())
OLDNEW
« no previous file with comments | « mojo/tools/check_mojom_golden_files.py ('k') | mojo/tools/mojo_demo.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698