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

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

Issue 16087005: Valgrind: Do not use the sandbox for layout tests. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 logging.warning("WARNING: NOT USING SUPPRESSIONS!") 383 logging.warning("WARNING: NOT USING SUPPRESSIONS!")
384 384
385 logfilename = self.log_dir + ("/%s." % tool_name) + "%p" 385 logfilename = self.log_dir + ("/%s." % tool_name) + "%p"
386 if self.UseXML(): 386 if self.UseXML():
387 proc += ["--xml=yes", "--xml-file=" + logfilename] 387 proc += ["--xml=yes", "--xml-file=" + logfilename]
388 else: 388 else:
389 proc += ["--log-file=" + logfilename] 389 proc += ["--log-file=" + logfilename]
390 390
391 # The Valgrind command is constructed. 391 # The Valgrind command is constructed.
392 392
393 # Valgrind doesn't play nice with the Chrome sandbox. Empty this env var
394 # set by runtest.py to disable the sandbox.
395 if os.environ.get("CHROME_DEVEL_SANDBOX", None):
396 logging.info("Removing CHROME_DEVEL_SANDBOX fron environment")
397 os.environ["CHROME_DEVEL_SANDBOX"] = ''
398
393 # Handle --indirect_webkit_layout separately. 399 # Handle --indirect_webkit_layout separately.
394 if self._options.indirect_webkit_layout: 400 if self._options.indirect_webkit_layout:
395 # Need to create the wrapper before modifying |proc|. 401 # Need to create the wrapper before modifying |proc|.
396 wrapper = self.CreateBrowserWrapper(proc, webkit=True) 402 wrapper = self.CreateBrowserWrapper(proc, webkit=True)
397 proc = self._args 403 proc = self._args
398 proc.append("--wrapper") 404 proc.append("--wrapper")
399 proc.append(wrapper) 405 proc.append(wrapper)
400 return proc 406 return proc
401 407
402 # Valgrind doesn't play nice with the Chrome sandbox. Empty this env var
403 # set by runtest.py to disable the sandbox.
404 if os.environ.get("CHROME_DEVEL_SANDBOX", None):
405 logging.info("Removing CHROME_DEVEL_SANDBOX fron environment")
406 os.environ["CHROME_DEVEL_SANDBOX"] = ''
407
408 if self._options.indirect: 408 if self._options.indirect:
409 wrapper = self.CreateBrowserWrapper(proc) 409 wrapper = self.CreateBrowserWrapper(proc)
410 os.environ["BROWSER_WRAPPER"] = wrapper 410 os.environ["BROWSER_WRAPPER"] = wrapper
411 logging.info('export BROWSER_WRAPPER=' + wrapper) 411 logging.info('export BROWSER_WRAPPER=' + wrapper)
412 proc = [] 412 proc = []
413 proc += self._args 413 proc += self._args
414 return proc 414 return proc
415 415
416 def ToolSpecificFlags(self): 416 def ToolSpecificFlags(self):
417 raise NotImplementedError, "This method should be implemented " \ 417 raise NotImplementedError, "This method should be implemented " \
(...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after
1217 return Asan() 1217 return Asan()
1218 try: 1218 try:
1219 platform_name = common.PlatformNames()[0] 1219 platform_name = common.PlatformNames()[0]
1220 except common.NotImplementedError: 1220 except common.NotImplementedError:
1221 platform_name = sys.platform + "(Unknown)" 1221 platform_name = sys.platform + "(Unknown)"
1222 raise RuntimeError, "Unknown tool (tool=%s, platform=%s)" % (tool_name, 1222 raise RuntimeError, "Unknown tool (tool=%s, platform=%s)" % (tool_name,
1223 platform_name) 1223 platform_name)
1224 1224
1225 def CreateTool(tool): 1225 def CreateTool(tool):
1226 return ToolFactory().Create(tool) 1226 return ToolFactory().Create(tool)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698