| 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 return test_list | 73 return test_list |
| 74 | 74 |
| 75 # Tests run by default ------------------------------------------------------- | 75 # Tests run by default ------------------------------------------------------- |
| 76 | 76 |
| 77 # C++ unit tests: | 77 # C++ unit tests: |
| 78 if ShouldRunTest(Config.TEST_TYPE_DEFAULT, Config.TEST_TYPE_UNIT): | 78 if ShouldRunTest(Config.TEST_TYPE_DEFAULT, Config.TEST_TYPE_UNIT): |
| 79 AddXvfbEntry("Unit tests", | 79 AddXvfbEntry("Unit tests", |
| 80 [os.path.join("mojo", "tools", "test_runner.py"), | 80 [os.path.join("mojo", "tools", "test_runner.py"), |
| 81 os.path.join("mojo", "tools", "data", "unittests"), | 81 os.path.join("mojo", "tools", "data", "unittests"), |
| 82 build_dir] + verbose_flags) | 82 build_dir] + verbose_flags) |
| 83 # NaCl tests (Linux only): |
| 84 if (target_os == Config.OS_LINUX and |
| 85 config.sanitizer != Config.SANITIZER_ASAN): |
| 86 AddEntry("NaCl tests", |
| 87 [os.path.join(build_dir, "monacl_shell"), |
| 88 os.path.join(build_dir, "irt_" + config.target_cpu, |
| 89 "irt_mojo.nexe"), |
| 90 os.path.join(build_dir, "clang_newlib_" + config.target_cpu, |
| 91 "monacl_test.nexe")]) |
| 83 | 92 |
| 84 # C++ app tests: | 93 # C++ app tests: |
| 85 if ShouldRunTest(Config.TEST_TYPE_DEFAULT, "app"): | 94 if ShouldRunTest(Config.TEST_TYPE_DEFAULT, "app"): |
| 86 AddXvfbEntry("App tests", | 95 AddXvfbEntry("App tests", |
| 87 [os.path.join("mojo", "tools", "apptest_runner.py"), | 96 [os.path.join("mojo", "tools", "apptest_runner.py"), |
| 88 os.path.join("mojo", "tools", "data", "apptests"), | 97 os.path.join("mojo", "tools", "data", "apptests"), |
| 89 build_dir] + verbose_flags) | 98 build_dir] + verbose_flags) |
| 99 # NaCl app tests (Linux only): |
| 100 if (target_os == Config.OS_LINUX and |
| 101 config.sanitizer != Config.SANITIZER_ASAN): |
| 102 AddXvfbEntry("NaCl app tests", |
| 103 [os.path.join("mojo", "tools", "apptest_runner.py"), |
| 104 os.path.join("mojo", "tools", "data", "nacl_apptests"), |
| 105 build_dir] + verbose_flags) |
| 90 | 106 |
| 91 # Go unit tests (Linux-only): | 107 # Go unit tests (Linux-only): |
| 92 if (target_os == Config.OS_LINUX and | 108 if (target_os == Config.OS_LINUX and |
| 93 config.sanitizer != Config.SANITIZER_ASAN and | 109 config.sanitizer != Config.SANITIZER_ASAN and |
| 94 ShouldRunTest(Config.TEST_TYPE_DEFAULT, Config.TEST_TYPE_UNIT, "go")): | 110 ShouldRunTest(Config.TEST_TYPE_DEFAULT, Config.TEST_TYPE_UNIT, "go")): |
| 95 AddEntry("Go unit tests", | 111 AddEntry("Go unit tests", |
| 96 [os.path.join(build_dir, "obj", "mojo", "go", "system_test")]) | 112 [os.path.join(build_dir, "obj", "mojo", "go", "system_test")]) |
| 97 | 113 |
| 98 # Python unit tests: | 114 # Python unit tests: |
| 99 if ShouldRunTest(Config.TEST_TYPE_DEFAULT, Config.TEST_TYPE_UNIT, "python"): | 115 if ShouldRunTest(Config.TEST_TYPE_DEFAULT, Config.TEST_TYPE_UNIT, "python"): |
| 100 AddEntry("Python unit tests", | 116 AddEntry("Python unit tests", |
| 101 ["python", os.path.join("mojo", "tools", | 117 ["python", os.path.join("mojo", "tools", |
| 102 "run_mojo_python_tests.py")]) | 118 "run_mojo_python_tests.py")]) |
| 103 | 119 |
| 104 # Python bindings tests (Linux-only): | 120 # Python bindings tests (Linux-only): |
| 105 # See http://crbug.com/438781 for details on asan exclusion. | 121 # See http://crbug.com/438781 for details on asan exclusion. |
| 106 if (target_os == Config.OS_LINUX and | 122 if (target_os == Config.OS_LINUX and |
| 107 ShouldRunTest(Config.TEST_TYPE_DEFAULT, Config.TEST_TYPE_UNIT, | 123 ShouldRunTest(Config.TEST_TYPE_DEFAULT, Config.TEST_TYPE_UNIT, |
| 108 "python") and | 124 "python") and |
| 109 config.sanitizer != Config.SANITIZER_ASAN): | 125 config.sanitizer != Config.SANITIZER_ASAN): |
| 110 AddEntry("Python bindings tests", | 126 AddEntry("Python bindings tests", |
| 111 ["python", | 127 ["python", |
| 112 os.path.join("mojo", "tools", | 128 os.path.join("mojo", "tools", |
| 113 "run_mojo_python_bindings_tests.py"), | 129 "run_mojo_python_bindings_tests.py"), |
| 114 "--build-dir=" + build_dir]) | 130 "--build-dir=" + build_dir]) |
| 115 | 131 |
| 116 # NaCl tests (Linux only): | |
| 117 if target_os == Config.OS_LINUX and config.sanitizer != Config.SANITIZER_ASAN: | |
| 118 AddEntry("NaCl tests", | |
| 119 [os.path.join(build_dir, "monacl_shell"), | |
| 120 os.path.join(build_dir, "irt_" + config.target_cpu, | |
| 121 "irt_mojo.nexe"), | |
| 122 os.path.join(build_dir, "clang_newlib_" + config.target_cpu, | |
| 123 "monacl_test.nexe")]) | |
| 124 | |
| 125 AddXvfbEntry("NaCl app tests", | |
| 126 [os.path.join("mojo", "tools", "apptest_runner.py"), | |
| 127 os.path.join("mojo", "tools", "data", "nacl_apptests"), | |
| 128 build_dir] + verbose_flags) | |
| 129 | |
| 130 # Sky tests (Linux-only): | 132 # Sky tests (Linux-only): |
| 131 # TODO(abarth): Re-enabled in ASAN once the DartVM works in ASAN. | 133 # TODO(abarth): Re-enabled in ASAN once the DartVM works in ASAN. |
| 132 # See https://code.google.com/p/dart/issues/detail?id=22122 | 134 # See https://code.google.com/p/dart/issues/detail?id=22122 |
| 133 if (target_os == Config.OS_LINUX and | 135 if (target_os == Config.OS_LINUX and |
| 134 ShouldRunTest(Config.TEST_TYPE_DEFAULT, "sky") and | 136 ShouldRunTest(Config.TEST_TYPE_DEFAULT, "sky") and |
| 135 config.sanitizer != Config.SANITIZER_ASAN): | 137 config.sanitizer != Config.SANITIZER_ASAN): |
| 136 sky_command = ["python", | 138 sky_command = ["python", |
| 137 "sky/tools/test_sky", | 139 "sky/tools/test_sky", |
| 138 "-t", os.path.basename(build_dir), | 140 "-t", os.path.basename(build_dir), |
| 139 "--no-new-test-results", "--no-show-results", "--verbose"] | 141 "--no-new-test-results", "--no-show-results", "--verbose"] |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 config = Config(**json.load(args.config_file)) | 209 config = Config(**json.load(args.config_file)) |
| 208 test_list = GetTestList(config) | 210 test_list = GetTestList(config) |
| 209 json.dump(test_list, args.test_list_file, indent=2) | 211 json.dump(test_list, args.test_list_file, indent=2) |
| 210 args.test_list_file.write("\n") | 212 args.test_list_file.write("\n") |
| 211 | 213 |
| 212 return 0 | 214 return 0 |
| 213 | 215 |
| 214 | 216 |
| 215 if __name__ == "__main__": | 217 if __name__ == "__main__": |
| 216 sys.exit(main()) | 218 sys.exit(main()) |
| OLD | NEW |