| 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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 | 156 |
| 157 # NaCl tests: |
| 158 if ShouldRunTest("nacl"): |
| 159 AddEntry("NaCl tests", |
| 160 [os.path.join(build_dir, "monacl_shell"), |
| 161 os.path.join(build_dir, "irt_" + config.target_arch, |
| 162 "irt_core.nexe"), |
| 163 os.path.join(build_dir, "clang_newlib_" + config.target_arch, |
| 164 "monacl_test.nexe")]) |
| 165 |
| 157 # ---------------------------------------------------------------------------- | 166 # ---------------------------------------------------------------------------- |
| 158 | 167 |
| 159 return test_list | 168 return test_list |
| 160 | 169 |
| 161 | 170 |
| 162 def main(): | 171 def main(): |
| 163 parser = argparse.ArgumentParser(description="Gets tests to execute.") | 172 parser = argparse.ArgumentParser(description="Gets tests to execute.") |
| 164 parser.add_argument("config_file", metavar="config.json", | 173 parser.add_argument("config_file", metavar="config.json", |
| 165 type=argparse.FileType("rb"), | 174 type=argparse.FileType("rb"), |
| 166 help="Input JSON file with test configuration.") | 175 help="Input JSON file with test configuration.") |
| 167 parser.add_argument("test_list_file", metavar="test_list.json", nargs="?", | 176 parser.add_argument("test_list_file", metavar="test_list.json", nargs="?", |
| 168 type=argparse.FileType("wb"), default=sys.stdout, | 177 type=argparse.FileType("wb"), default=sys.stdout, |
| 169 help="Output JSON file with test list.") | 178 help="Output JSON file with test list.") |
| 170 args = parser.parse_args() | 179 args = parser.parse_args() |
| 171 | 180 |
| 172 config = Config(**json.load(args.config_file)) | 181 config = Config(**json.load(args.config_file)) |
| 173 test_list = GetTestList(config) | 182 test_list = GetTestList(config) |
| 174 json.dump(test_list, args.test_list_file, indent=2) | 183 json.dump(test_list, args.test_list_file, indent=2) |
| 175 args.test_list_file.write("\n") | 184 args.test_list_file.write("\n") |
| 176 | 185 |
| 177 return 0 | 186 return 0 |
| 178 | 187 |
| 179 | 188 |
| 180 if __name__ == "__main__": | 189 if __name__ == "__main__": |
| 181 sys.exit(main()) | 190 sys.exit(main()) |
| OLD | NEW |