| 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 # TODO(smklein): Add for Android once tests are pexes. | 110 # TODO(smklein): Add for Android once tests are pexes. |
| 111 AddXvfbEntry("NaCl app tests", | 111 AddXvfbEntry("NaCl app tests", |
| 112 [os.path.join("mojo", "tools", "apptest_runner.py"), | 112 [os.path.join("mojo", "tools", "apptest_runner.py"), |
| 113 os.path.join("mojo", "tools", "data", "nacl_apptests"), | 113 os.path.join("mojo", "tools", "data", "nacl_apptests"), |
| 114 build_dir] + verbose_flags) | 114 build_dir] + verbose_flags) |
| 115 | 115 |
| 116 # Go unit tests (Linux-only): | 116 # Go unit tests (Linux-only): |
| 117 if (target_os == Config.OS_LINUX and | 117 if (target_os == Config.OS_LINUX and |
| 118 config.sanitizer != Config.SANITIZER_ASAN and | 118 config.sanitizer != Config.SANITIZER_ASAN and |
| 119 ShouldRunTest(Config.TEST_TYPE_DEFAULT, Config.TEST_TYPE_UNIT, "go")): | 119 ShouldRunTest(Config.TEST_TYPE_DEFAULT, Config.TEST_TYPE_UNIT, "go")): |
| 120 # Go system tests: |
| 121 AddEntry("Go system tests", |
| 122 [os.path.join(build_dir, "obj", "mojo", "go", "system_test")]) |
| 123 |
| 124 # Pure Go unit tests: |
| 125 assert paths.go_tool_path is not None |
| 126 go_tool = paths.go_tool_path |
| 120 AddEntry("Go unit tests", | 127 AddEntry("Go unit tests", |
| 121 [os.path.join(build_dir, "obj", "mojo", "go", "system_test")]) | 128 ["python", os.path.join("mojo", "tools", "run_pure_go_tests.py"), |
| 129 go_tool, os.path.join("mojo", "tools", "data", "gotests")]) |
| 122 | 130 |
| 123 # Python unit tests: | 131 # Python unit tests: |
| 124 if ShouldRunTest(Config.TEST_TYPE_DEFAULT, Config.TEST_TYPE_UNIT, "python"): | 132 if ShouldRunTest(Config.TEST_TYPE_DEFAULT, Config.TEST_TYPE_UNIT, "python"): |
| 125 AddEntry("Python unit tests", | 133 AddEntry("Python unit tests", |
| 126 ["python", os.path.join("mojo", "tools", | 134 ["python", os.path.join("mojo", "tools", |
| 127 "run_mojo_python_tests.py")]) | 135 "run_mojo_python_tests.py")]) |
| 128 | 136 |
| 129 # Python bindings tests (Linux-only): | 137 # Python bindings tests (Linux-only): |
| 130 # See http://crbug.com/438781 for details on asan exclusion. | 138 # See http://crbug.com/438781 for details on asan exclusion. |
| 131 if (target_os == Config.OS_LINUX and | 139 if (target_os == Config.OS_LINUX and |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 config = Config(**json.load(args.config_file)) | 249 config = Config(**json.load(args.config_file)) |
| 242 test_list = GetTestList(config) | 250 test_list = GetTestList(config) |
| 243 json.dump(test_list, args.test_list_file, indent=2) | 251 json.dump(test_list, args.test_list_file, indent=2) |
| 244 args.test_list_file.write("\n") | 252 args.test_list_file.write("\n") |
| 245 | 253 |
| 246 return 0 | 254 return 0 |
| 247 | 255 |
| 248 | 256 |
| 249 if __name__ == "__main__": | 257 if __name__ == "__main__": |
| 250 sys.exit(main()) | 258 sys.exit(main()) |
| OLD | NEW |