OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 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 ''' Runs various chrome tests through valgrind_test.py.''' | 6 ''' Runs various chrome tests through valgrind_test.py.''' |
7 | 7 |
8 import glob | 8 import glob |
9 import logging | 9 import logging |
10 import optparse | 10 import optparse |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 cmd = self._DefaultCommand(tool) | 290 cmd = self._DefaultCommand(tool) |
291 cmd.append("--trace_children") | 291 cmd.append("--trace_children") |
292 cmd.append("--indirect_pdfium_test") | 292 cmd.append("--indirect_pdfium_test") |
293 cmd.append("--ignore_exit_code") | 293 cmd.append("--ignore_exit_code") |
294 # Now build script_cmd, the run_corpus_tests commandline. | 294 # Now build script_cmd, the run_corpus_tests commandline. |
295 script = os.path.join(self._source_dir, "testing", "tools", script_name) | 295 script = os.path.join(self._source_dir, "testing", "tools", script_name) |
296 script_cmd = ["python", script] | 296 script_cmd = ["python", script] |
297 if self._options.build_dir: | 297 if self._options.build_dir: |
298 script_cmd.extend(["--build-dir", self._options.build_dir]) | 298 script_cmd.extend(["--build-dir", self._options.build_dir]) |
299 # TODO(zhaoqin): it only runs in single process mode now, | 299 # TODO(zhaoqin): it only runs in single process mode now, |
300 # need figure out why it does not work with test_one_file_parallel | 300 # need figure out why it does not work with test_one_file_parallel. |
301 # in run_corpus_tests.py. | 301 script_cmd.extend(["-j", "1"]) |
302 if script_name == "run_corpus_tests.py": | |
303 script_cmd.extend(["-j", "1"]) | |
304 # Now run script_cmd with the wrapper in cmd | 302 # Now run script_cmd with the wrapper in cmd |
305 cmd.append("--") | 303 cmd.append("--") |
306 cmd.extend(script_cmd) | 304 cmd.extend(script_cmd) |
307 | 305 |
308 ret = tool.Run(cmd, "layout", min_runtime_in_seconds=0) | 306 ret = tool.Run(cmd, "layout", min_runtime_in_seconds=0) |
309 return ret | 307 return ret |
310 | 308 |
311 def TestPDFiumJavascript(self): | 309 def TestPDFiumJavascript(self): |
312 return self.TestPDFiumTest("run_javascript_tests.py") | 310 return self.TestPDFiumTest("run_javascript_tests.py") |
313 | 311 |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
395 | 393 |
396 for t in options.test: | 394 for t in options.test: |
397 tests = ChromeTests(options, args, t) | 395 tests = ChromeTests(options, args, t) |
398 ret = tests.Run() | 396 ret = tests.Run() |
399 if ret: return ret | 397 if ret: return ret |
400 return 0 | 398 return 0 |
401 | 399 |
402 | 400 |
403 if __name__ == "__main__": | 401 if __name__ == "__main__": |
404 sys.exit(_main()) | 402 sys.exit(_main()) |
OLD | NEW |