Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(464)

Side by Side Diff: tools/valgrind/valgrind_test.py

Issue 895853003: Update from https://crrev.com/314320 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tools/valgrind/memcheck_analyze.py ('k') | ui/gl/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Runs an exe through Valgrind and puts the intermediate files in a 5 """Runs an exe through Valgrind and puts the intermediate files in a
6 directory. 6 directory.
7 """ 7 """
8 8
9 import datetime 9 import datetime
10 import glob 10 import glob
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 logging.warning("WARNING: NOT USING SUPPRESSIONS!") 373 logging.warning("WARNING: NOT USING SUPPRESSIONS!")
374 374
375 logfilename = self.log_dir + ("/%s." % tool_name) + "%p" 375 logfilename = self.log_dir + ("/%s." % tool_name) + "%p"
376 if self.UseXML(): 376 if self.UseXML():
377 proc += ["--xml=yes", "--xml-file=" + logfilename] 377 proc += ["--xml=yes", "--xml-file=" + logfilename]
378 else: 378 else:
379 proc += ["--log-file=" + logfilename] 379 proc += ["--log-file=" + logfilename]
380 380
381 # The Valgrind command is constructed. 381 # The Valgrind command is constructed.
382 382
383 # Valgrind doesn't play nice with the Chrome sandbox. Empty this env var
384 # set by runtest.py to disable the sandbox.
385 if os.environ.get("CHROME_DEVEL_SANDBOX", None):
386 logging.info("Removing CHROME_DEVEL_SANDBOX from environment")
387 os.environ["CHROME_DEVEL_SANDBOX"] = ''
388
389 # Handle --indirect_webkit_layout separately. 383 # Handle --indirect_webkit_layout separately.
390 if self._options.indirect_webkit_layout: 384 if self._options.indirect_webkit_layout:
391 # Need to create the wrapper before modifying |proc|. 385 # Need to create the wrapper before modifying |proc|.
392 wrapper = self.CreateBrowserWrapper(proc, webkit=True) 386 wrapper = self.CreateBrowserWrapper(proc, webkit=True)
393 proc = self._args 387 proc = self._args
394 proc.append("--wrapper") 388 proc.append("--wrapper")
395 proc.append(wrapper) 389 proc.append(wrapper)
396 return proc 390 return proc
397 391
398 if self._options.indirect: 392 if self._options.indirect:
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
711 705
712 # Un-comment to disable interleaved output. Will also suppress error 706 # Un-comment to disable interleaved output. Will also suppress error
713 # messages normally printed to stderr. 707 # messages normally printed to stderr.
714 #proc += ["-quiet", "-no_results_to_stderr"] 708 #proc += ["-quiet", "-no_results_to_stderr"]
715 709
716 proc += ["-callstack_max_frames", "40"] 710 proc += ["-callstack_max_frames", "40"]
717 711
718 # disable leak scan for now 712 # disable leak scan for now
719 proc += ["-no_count_leaks", "-no_leak_scan"] 713 proc += ["-no_count_leaks", "-no_leak_scan"]
720 714
715 # disable warnings about unaddressable prefetches
716 proc += ["-no_check_prefetch"]
717
721 # crbug.com/413215, no heap mismatch check for Windows release build binary 718 # crbug.com/413215, no heap mismatch check for Windows release build binary
722 if common.IsWindows() and "Release" in self._options.build_dir: 719 if common.IsWindows() and "Release" in self._options.build_dir:
723 proc += ["-no_check_delete_mismatch"] 720 proc += ["-no_check_delete_mismatch"]
724 721
725 # make callstacks easier to read 722 # make callstacks easier to read
726 proc += ["-callstack_srcfile_prefix", 723 proc += ["-callstack_srcfile_prefix",
727 "build\\src,chromium\\src,crt_build\\self_x86"] 724 "build\\src,chromium\\src,crt_build\\self_x86"]
728 proc += ["-callstack_modname_hide", 725 proc += ["-callstack_modname_hide",
729 "*drmemory*,chrome.dll"] 726 "*drmemory*,chrome.dll"]
730 727
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
828 return DrMemory(False, True) 825 return DrMemory(False, True)
829 try: 826 try:
830 platform_name = common.PlatformNames()[0] 827 platform_name = common.PlatformNames()[0]
831 except common.NotImplementedError: 828 except common.NotImplementedError:
832 platform_name = sys.platform + "(Unknown)" 829 platform_name = sys.platform + "(Unknown)"
833 raise RuntimeError, "Unknown tool (tool=%s, platform=%s)" % (tool_name, 830 raise RuntimeError, "Unknown tool (tool=%s, platform=%s)" % (tool_name,
834 platform_name) 831 platform_name)
835 832
836 def CreateTool(tool): 833 def CreateTool(tool):
837 return ToolFactory().Create(tool) 834 return ToolFactory().Create(tool)
OLDNEW
« no previous file with comments | « tools/valgrind/memcheck_analyze.py ('k') | ui/gl/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698