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 multiprocessing | 10 import multiprocessing |
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
560 jobs = max(1, int(multiprocessing.cpu_count() * 0.3)) | 560 jobs = max(1, int(multiprocessing.cpu_count() * 0.3)) |
561 script_cmd = ["python", script, "-v", | 561 script_cmd = ["python", script, "-v", |
562 # run a separate DumpRenderTree for each test | 562 # run a separate DumpRenderTree for each test |
563 "--batch-size=1", | 563 "--batch-size=1", |
564 "--fully-parallel", | 564 "--fully-parallel", |
565 "--child-processes=%d" % jobs, | 565 "--child-processes=%d" % jobs, |
566 "--time-out-ms=800000", | 566 "--time-out-ms=800000", |
567 "--no-retry-failures", # retrying takes too much time | 567 "--no-retry-failures", # retrying takes too much time |
568 # http://crbug.com/176908: Don't launch a browser when done. | 568 # http://crbug.com/176908: Don't launch a browser when done. |
569 "--no-show-results", | 569 "--no-show-results", |
570 "--nocheck-sys-deps"] | 570 "--nocheck-sys-deps", |
| 571 "--additional-drt-flag=--no-sandbox"] |
571 # Pass build mode to run-webkit-tests. We aren't passed it directly, | 572 # Pass build mode to run-webkit-tests. We aren't passed it directly, |
572 # so parse it out of build_dir. run-webkit-tests can only handle | 573 # so parse it out of build_dir. run-webkit-tests can only handle |
573 # the two values "Release" and "Debug". | 574 # the two values "Release" and "Debug". |
574 # TODO(Hercules): unify how all our scripts pass around build mode | 575 # TODO(Hercules): unify how all our scripts pass around build mode |
575 # (--mode / --target / --build-dir / --debug) | 576 # (--mode / --target / --build-dir / --debug) |
576 if self._options.build_dir: | 577 if self._options.build_dir: |
577 build_root, mode = os.path.split(self._options.build_dir) | 578 build_root, mode = os.path.split(self._options.build_dir) |
578 script_cmd.extend(["--build-directory", build_root, "--target", mode]) | 579 script_cmd.extend(["--build-directory", build_root, "--target", mode]) |
579 if (chunk_size > 0): | 580 if (chunk_size > 0): |
580 script_cmd.append("--run-chunk=%d:%d" % (chunk_num, chunk_size)) | 581 script_cmd.append("--run-chunk=%d:%d" % (chunk_num, chunk_size)) |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
797 | 798 |
798 for t in options.test: | 799 for t in options.test: |
799 tests = ChromeTests(options, args, t) | 800 tests = ChromeTests(options, args, t) |
800 ret = tests.Run() | 801 ret = tests.Run() |
801 if ret: return ret | 802 if ret: return ret |
802 return 0 | 803 return 0 |
803 | 804 |
804 | 805 |
805 if __name__ == "__main__": | 806 if __name__ == "__main__": |
806 sys.exit(_main()) | 807 sys.exit(_main()) |
OLD | NEW |