OLD | NEW |
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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 ) | 146 ) |
147 | 147 |
148 # Other (non-default) tests -------------------------------------------------- | 148 # Other (non-default) tests -------------------------------------------------- |
149 | 149 |
150 # Dart unit tests: | 150 # Dart unit tests: |
151 if ShouldRunTest("dart"): | 151 if ShouldRunTest("dart"): |
152 AddXvfbEntry("Dart unit tests", | 152 AddXvfbEntry("Dart unit tests", |
153 [os.path.join("mojo", "tools", "test_runner.py"), | 153 [os.path.join("mojo", "tools", "test_runner.py"), |
154 os.path.join("mojo", "tools", "data", "dart_unittests"), | 154 os.path.join("mojo", "tools", "data", "dart_unittests"), |
155 build_dir, "mojob_test_successes"]) | 155 build_dir, "mojob_test_successes"]) |
| 156 AddXvfbEntry("Dart App tests", |
| 157 [os.path.join("mojo", "tools", "apptest_runner.py"), |
| 158 os.path.join("mojo", "tools", "data", "dart_apptests"), |
| 159 build_dir]) |
156 | 160 |
157 # ---------------------------------------------------------------------------- | 161 # ---------------------------------------------------------------------------- |
158 | 162 |
159 return test_list | 163 return test_list |
160 | 164 |
161 | 165 |
162 def main(): | 166 def main(): |
163 parser = argparse.ArgumentParser(description="Gets tests to execute.") | 167 parser = argparse.ArgumentParser(description="Gets tests to execute.") |
164 parser.add_argument("config_file", metavar="config.json", | 168 parser.add_argument("config_file", metavar="config.json", |
165 type=argparse.FileType("rb"), | 169 type=argparse.FileType("rb"), |
166 help="Input JSON file with test configuration.") | 170 help="Input JSON file with test configuration.") |
167 parser.add_argument("test_list_file", metavar="test_list.json", nargs="?", | 171 parser.add_argument("test_list_file", metavar="test_list.json", nargs="?", |
168 type=argparse.FileType("wb"), default=sys.stdout, | 172 type=argparse.FileType("wb"), default=sys.stdout, |
169 help="Output JSON file with test list.") | 173 help="Output JSON file with test list.") |
170 args = parser.parse_args() | 174 args = parser.parse_args() |
171 | 175 |
172 config = Config(**json.load(args.config_file)) | 176 config = Config(**json.load(args.config_file)) |
173 test_list = GetTestList(config) | 177 test_list = GetTestList(config) |
174 json.dump(test_list, args.test_list_file, indent=2) | 178 json.dump(test_list, args.test_list_file, indent=2) |
175 args.test_list_file.write("\n") | 179 args.test_list_file.write("\n") |
176 | 180 |
177 return 0 | 181 return 0 |
178 | 182 |
179 | 183 |
180 if __name__ == "__main__": | 184 if __name__ == "__main__": |
181 sys.exit(main()) | 185 sys.exit(main()) |
OLD | NEW |