| 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 |
| 121 # Go system tests: |
| 122 AddEntry("Go system tests", |
| 123 [os.path.join(build_dir, "obj", "mojo", "go", "system_test")]) |
| 124 |
| 125 # Pure Go unit tests: |
| 126 if 'go_build_tool' in config.values: |
| 127 go_tool = config.values['go_build_tool'] |
| 128 else: |
| 129 go_tool = os.path.join(Paths().src_root, 'third_party', 'go', 'tool', |
| 130 'linux_amd64', 'bin', 'go') |
| 120 AddEntry("Go unit tests", | 131 AddEntry("Go unit tests", |
| 121 [os.path.join(build_dir, "obj", "mojo", "go", "system_test")]) | 132 ["python", os.path.join("mojo", "tools", "run_pure_go_tests.py"), |
| 133 "--go_tool=" + go_tool]) |
| 122 | 134 |
| 123 # Python unit tests: | 135 # Python unit tests: |
| 124 if ShouldRunTest(Config.TEST_TYPE_DEFAULT, Config.TEST_TYPE_UNIT, "python"): | 136 if ShouldRunTest(Config.TEST_TYPE_DEFAULT, Config.TEST_TYPE_UNIT, "python"): |
| 125 AddEntry("Python unit tests", | 137 AddEntry("Python unit tests", |
| 126 ["python", os.path.join("mojo", "tools", | 138 ["python", os.path.join("mojo", "tools", |
| 127 "run_mojo_python_tests.py")]) | 139 "run_mojo_python_tests.py")]) |
| 128 | 140 |
| 129 # Python bindings tests (Linux-only): | 141 # Python bindings tests (Linux-only): |
| 130 # See http://crbug.com/438781 for details on asan exclusion. | 142 # See http://crbug.com/438781 for details on asan exclusion. |
| 131 if (target_os == Config.OS_LINUX and | 143 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)) | 253 config = Config(**json.load(args.config_file)) |
| 242 test_list = GetTestList(config) | 254 test_list = GetTestList(config) |
| 243 json.dump(test_list, args.test_list_file, indent=2) | 255 json.dump(test_list, args.test_list_file, indent=2) |
| 244 args.test_list_file.write("\n") | 256 args.test_list_file.write("\n") |
| 245 | 257 |
| 246 return 0 | 258 return 0 |
| 247 | 259 |
| 248 | 260 |
| 249 if __name__ == "__main__": | 261 if __name__ == "__main__": |
| 250 sys.exit(main()) | 262 sys.exit(main()) |
| OLD | NEW |