OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/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 import os.path | 6 import os.path |
7 import re | 7 import re |
8 import shutil | 8 import shutil |
9 import sys | 9 import sys |
10 import tempfile | 10 import tempfile |
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 if disable_sandbox: | 298 if disable_sandbox: |
299 cmd.append('--no-sandbox') | 299 cmd.append('--no-sandbox') |
300 else: | 300 else: |
301 cmd.append('--register-pepper-plugins=%s;application/x-nacl' | 301 cmd.append('--register-pepper-plugins=%s;application/x-nacl' |
302 % self.options.ppapi_plugin) | 302 % self.options.ppapi_plugin) |
303 cmd.append('--no-sandbox') | 303 cmd.append('--no-sandbox') |
304 if self.options.browser_extensions: | 304 if self.options.browser_extensions: |
305 cmd.append('--load-extension=%s' % | 305 cmd.append('--load-extension=%s' % |
306 ','.join(self.options.browser_extensions)) | 306 ','.join(self.options.browser_extensions)) |
307 cmd.append('--enable-experimental-extension-apis') | 307 cmd.append('--enable-experimental-extension-apis') |
| 308 if self.options.enable_crash_reporter: |
| 309 cmd.append('--enable-crash-reporter-for-testing') |
308 if self.options.tool == 'memcheck': | 310 if self.options.tool == 'memcheck': |
309 cmd = ['src/third_party/valgrind/memcheck.sh', | 311 cmd = ['src/third_party/valgrind/memcheck.sh', |
310 '-v', | 312 '-v', |
311 '--xml=yes', | 313 '--xml=yes', |
312 '--leak-check=no', | 314 '--leak-check=no', |
313 '--gen-suppressions=all', | 315 '--gen-suppressions=all', |
314 '--num-callers=30', | 316 '--num-callers=30', |
315 '--trace-children=yes', | 317 '--trace-children=yes', |
316 '--nacl-file=%s' % (self.options.files[0],), | 318 '--nacl-file=%s' % (self.options.files[0],), |
317 '--suppressions=' + | 319 '--suppressions=' + |
318 '../tools/valgrind/memcheck/suppressions.txt', | 320 '../tools/valgrind/memcheck/suppressions.txt', |
319 '--xml-file=%s/xml.%%p' % (self.tool_log_dir,), | 321 '--xml-file=%s/xml.%%p' % (self.tool_log_dir,), |
320 '--log-file=%s/log.%%p' % (self.tool_log_dir,)] + cmd | 322 '--log-file=%s/log.%%p' % (self.tool_log_dir,)] + cmd |
321 elif self.options.tool == 'tsan': | 323 elif self.options.tool == 'tsan': |
322 cmd = ['src/third_party/valgrind/tsan.sh', | 324 cmd = ['src/third_party/valgrind/tsan.sh', |
323 '-v', | 325 '-v', |
324 '--num-callers=30', | 326 '--num-callers=30', |
325 '--trace-children=yes', | 327 '--trace-children=yes', |
326 '--nacl-file=%s' % (self.options.files[0],), | 328 '--nacl-file=%s' % (self.options.files[0],), |
327 '--ignore=../tools/valgrind/tsan/ignores.txt', | 329 '--ignore=../tools/valgrind/tsan/ignores.txt', |
328 '--suppressions=../tools/valgrind/tsan/suppressions.txt', | 330 '--suppressions=../tools/valgrind/tsan/suppressions.txt', |
329 '--log-file=%s/log.%%p' % (self.tool_log_dir,)] + cmd | 331 '--log-file=%s/log.%%p' % (self.tool_log_dir,)] + cmd |
330 elif self.options.tool != None: | 332 elif self.options.tool != None: |
331 raise LaunchFailure('Invalid tool name "%s"' % (self.options.tool,)) | 333 raise LaunchFailure('Invalid tool name "%s"' % (self.options.tool,)) |
332 cmd.extend(self.options.browser_flags) | 334 cmd.extend(self.options.browser_flags) |
333 cmd.append(url) | 335 cmd.append(url) |
334 return cmd | 336 return cmd |
OLD | NEW |