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 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 tool = valgrind_test.CreateTool(self._options.valgrind_tool) | 289 tool = valgrind_test.CreateTool(self._options.valgrind_tool) |
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, | |
300 # need figure out why it does not work with test_one_file_parallel. | |
301 script_cmd.extend(["-j", "1"]) | |
302 # Now run script_cmd with the wrapper in cmd | 299 # Now run script_cmd with the wrapper in cmd |
303 cmd.append("--") | 300 cmd.append("--") |
304 cmd.extend(script_cmd) | 301 cmd.extend(script_cmd) |
305 | 302 |
306 ret = tool.Run(cmd, "layout", min_runtime_in_seconds=0) | 303 ret = tool.Run(cmd, "layout", min_runtime_in_seconds=0) |
307 return ret | 304 return ret |
308 | 305 |
309 def TestPDFiumJavascript(self): | 306 def TestPDFiumJavascript(self): |
310 return self.TestPDFiumTest("run_javascript_tests.py") | 307 return self.TestPDFiumTest("run_javascript_tests.py") |
311 | 308 |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
393 | 390 |
394 for t in options.test: | 391 for t in options.test: |
395 tests = ChromeTests(options, args, t) | 392 tests = ChromeTests(options, args, t) |
396 ret = tests.Run() | 393 ret = tests.Run() |
397 if ret: return ret | 394 if ret: return ret |
398 return 0 | 395 return 0 |
399 | 396 |
400 | 397 |
401 if __name__ == "__main__": | 398 if __name__ == "__main__": |
402 sys.exit(_main()) | 399 sys.exit(_main()) |
OLD | NEW |