| 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 if target_os not in (Config.OS_ANDROID, Config.OS_LINUX, Config.OS_WINDOWS): | 66 if target_os not in (Config.OS_ANDROID, Config.OS_LINUX, Config.OS_WINDOWS): |
| 67 return test_list | 67 return test_list |
| 68 | 68 |
| 69 # Tests run by default ------------------------------------------------------- | 69 # Tests run by default ------------------------------------------------------- |
| 70 | 70 |
| 71 # C++ unit tests: | 71 # C++ unit tests: |
| 72 if ShouldRunTest(Config.TEST_TYPE_DEFAULT, Config.TEST_TYPE_UNIT): | 72 if ShouldRunTest(Config.TEST_TYPE_DEFAULT, Config.TEST_TYPE_UNIT): |
| 73 unit_test_command = [os.path.join("mojo", "tools", "test_runner.py")] | 73 unit_test_command = [os.path.join("mojo", "tools", "test_runner.py")] |
| 74 if target_os == Config.OS_ANDROID: | 74 if target_os == Config.OS_ANDROID: |
| 75 unit_test_command.append("--android") | 75 unit_test_command.append("--android") |
| 76 unittests_file = "android_unittests" | |
| 77 else: | |
| 78 unittests_file = "unittests" | |
| 79 unit_test_command.extend( | 76 unit_test_command.extend( |
| 80 [os.path.join("mojo", "tools", "data", unittests_file), build_dir, | 77 [os.path.join("mojo", "tools", "data", "unittests"), build_dir, |
| 81 "mojob_test_successes"]) | 78 "mojob_test_successes"]) |
| 82 AddXvfbEntry("Unit tests", unit_test_command) | 79 AddXvfbEntry("Unit tests", unit_test_command) |
| 83 | 80 |
| 84 # C++ app tests: | 81 # C++ app tests: |
| 85 if target_os != Config.OS_ANDROID and ShouldRunTest(Config.TEST_TYPE_DEFAULT, | 82 if target_os != Config.OS_ANDROID and ShouldRunTest(Config.TEST_TYPE_DEFAULT, |
| 86 "app"): | 83 "app"): |
| 87 AddXvfbEntry("App tests", | 84 AddXvfbEntry("App tests", |
| 88 [os.path.join("mojo", "tools", "apptest_runner.py"), | 85 [os.path.join("mojo", "tools", "apptest_runner.py"), |
| 89 os.path.join("mojo", "tools", "data", "apptests"), | 86 os.path.join("mojo", "tools", "data", "apptests"), |
| 90 build_dir]) | 87 build_dir]) |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 config = Config(**json.load(args.config_file)) | 163 config = Config(**json.load(args.config_file)) |
| 167 test_list = GetTestList(config) | 164 test_list = GetTestList(config) |
| 168 json.dump(test_list, args.test_list_file, indent=2) | 165 json.dump(test_list, args.test_list_file, indent=2) |
| 169 args.test_list_file.write("\n") | 166 args.test_list_file.write("\n") |
| 170 | 167 |
| 171 return 0 | 168 return 0 |
| 172 | 169 |
| 173 | 170 |
| 174 if __name__ == "__main__": | 171 if __name__ == "__main__": |
| 175 sys.exit(main()) | 172 sys.exit(main()) |
| OLD | NEW |