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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 return test_list | 79 return test_list |
80 | 80 |
81 # Tests run by default ------------------------------------------------------- | 81 # Tests run by default ------------------------------------------------------- |
82 | 82 |
83 # C++ unit tests: | 83 # C++ unit tests: |
84 if ShouldRunTest(Config.TEST_TYPE_DEFAULT, Config.TEST_TYPE_UNIT): | 84 if ShouldRunTest(Config.TEST_TYPE_DEFAULT, Config.TEST_TYPE_UNIT): |
85 AddXvfbEntry("Unit tests", | 85 AddXvfbEntry("Unit tests", |
86 [os.path.join("mojo", "tools", "test_runner.py"), | 86 [os.path.join("mojo", "tools", "test_runner.py"), |
87 os.path.join("mojo", "tools", "data", "unittests"), | 87 os.path.join("mojo", "tools", "data", "unittests"), |
88 build_dir] + verbose_flags) | 88 build_dir] + verbose_flags) |
89 # NaCl tests (Linux only): | |
90 if (target_os == Config.OS_LINUX and | |
91 config.sanitizer != Config.SANITIZER_ASAN): | |
92 AddEntry("SFI NaCl tests", | |
93 [os.path.join(build_dir, "monacl_shell_sfi"), | |
94 os.path.join(build_dir, "irt_" + config.target_cpu, | |
95 "irt_mojo.nexe"), | |
96 os.path.join(build_dir, "clang_newlib_" + config.target_cpu, | |
97 "monacl_test.nexe")]) | |
98 | 89 |
99 # C++ app tests: | 90 # C++ app tests: |
100 if ShouldRunTest(Config.TEST_TYPE_DEFAULT, "app"): | 91 if ShouldRunTest(Config.TEST_TYPE_DEFAULT, "app"): |
101 AddXvfbEntry("App tests", | 92 AddXvfbEntry("App tests", |
102 [os.path.join("mojo", "tools", "apptest_runner.py"), | 93 [os.path.join("mojo", "tools", "apptest_runner.py"), |
103 os.path.join("mojo", "tools", "data", "apptests"), | 94 os.path.join("mojo", "tools", "data", "apptests"), |
104 build_dir] + verbose_flags) | 95 build_dir] + verbose_flags) |
105 # Fusl app tests (Linux excluding Android): | 96 # Fusl app tests (Linux excluding Android): |
106 if (target_os == Config.OS_LINUX): | 97 if (target_os == Config.OS_LINUX): |
107 AddXvfbEntry("Fusl app tests", | 98 AddXvfbEntry("Fusl app tests", |
108 [os.path.join("mojo", "tools", "apptest_runner.py"), | 99 [os.path.join("mojo", "tools", "apptest_runner.py"), |
109 os.path.join("mojo", "tools", "data", "fusl_apptests"), | 100 os.path.join("mojo", "tools", "data", "fusl_apptests"), |
110 build_dir] + verbose_flags) | 101 build_dir] + verbose_flags) |
111 # Non-SFI NaCl app tests (Linux including Android, no asan): | 102 # Non-SFI NaCl app tests (Linux including Android, no asan): |
112 if config.sanitizer != Config.SANITIZER_ASAN: | 103 if config.sanitizer != Config.SANITIZER_ASAN: |
113 AddXvfbEntry("Non-SFI NaCl App tests", | 104 AddXvfbEntry("Non-SFI NaCl App tests", |
114 [os.path.join("mojo", "tools", "apptest_runner.py"), | 105 [os.path.join("mojo", "tools", "apptest_runner.py"), |
115 os.path.join("mojo", "tools", "data", | 106 os.path.join("mojo", "tools", "data", |
116 "nacl_nonsfi_apptests"), | 107 "nacl_nonsfi_apptests"), |
117 build_dir] + verbose_flags) | 108 build_dir] + verbose_flags) |
118 # NaCl app tests (Linux excluding Android): | |
119 if (target_os == Config.OS_LINUX and | |
120 config.sanitizer != Config.SANITIZER_ASAN): | |
121 # TODO(smklein): Add for Android once tests are pexes. | |
122 AddXvfbEntry("NaCl app tests", | |
123 [os.path.join("mojo", "tools", "apptest_runner.py"), | |
124 os.path.join("mojo", "tools", "data", "nacl_apptests"), | |
125 build_dir] + verbose_flags) | |
126 | 109 |
127 # Go unit tests (Linux-only): | 110 # Go unit tests (Linux-only): |
128 if (target_os == Config.OS_LINUX and | 111 if (target_os == Config.OS_LINUX and |
129 config.sanitizer != Config.SANITIZER_ASAN and | 112 config.sanitizer != Config.SANITIZER_ASAN and |
130 ShouldRunTest(Config.TEST_TYPE_DEFAULT, Config.TEST_TYPE_UNIT, "go")): | 113 ShouldRunTest(Config.TEST_TYPE_DEFAULT, Config.TEST_TYPE_UNIT, "go")): |
131 # Go system tests: | 114 # Go system tests: |
132 AddEntry("Go system tests", | 115 AddEntry("Go system tests", |
133 [os.path.join(build_dir, "obj", "mojo", "go", "system_test")], | 116 [os.path.join(build_dir, "obj", "mojo", "go", "system_test")], |
134 env={'GODEBUG' : 'cgocheck=2'}) | 117 env={'GODEBUG' : 'cgocheck=2'}) |
135 | 118 |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 config = Config(**json.load(args.config_file)) | 293 config = Config(**json.load(args.config_file)) |
311 test_list = GetTestList(config) | 294 test_list = GetTestList(config) |
312 json.dump(test_list, args.test_list_file, indent=2) | 295 json.dump(test_list, args.test_list_file, indent=2) |
313 args.test_list_file.write("\n") | 296 args.test_list_file.write("\n") |
314 | 297 |
315 return 0 | 298 return 0 |
316 | 299 |
317 | 300 |
318 if __name__ == "__main__": | 301 if __name__ == "__main__": |
319 sys.exit(main()) | 302 sys.exit(main()) |
OLD | NEW |