summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorrnk@chromium.org <rnk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-18 19:50:50 +0000
committerrnk@chromium.org <rnk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-18 19:50:50 +0000
commitdd5fe1dc566f947dc8b8056bf5e8df804337b295 (patch)
treec6e4a5bd44e4e0f64101d86ccba0ea56f5f59cbd /tools
parentaa7a3d2d7eccfbfd13adba76fbe1075f75df55f8 (diff)
downloadchromium_src-dd5fe1dc566f947dc8b8056bf5e8df804337b295.zip
chromium_src-dd5fe1dc566f947dc8b8056bf5e8df804337b295.tar.gz
chromium_src-dd5fe1dc566f947dc8b8056bf5e8df804337b295.tar.bz2
Add support for running layout tests under Dr. Memory
Implemented by passing --wrapper to webkit's test runner instead setting an environment variable. R=bruening@google.com Review URL: https://codereview.chromium.org/11554029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173766 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools')
-rw-r--r--tools/valgrind/valgrind_test.py22
1 files changed, 17 insertions, 5 deletions
diff --git a/tools/valgrind/valgrind_test.py b/tools/valgrind/valgrind_test.py
index 20f6697..347bfee 100644
--- a/tools/valgrind/valgrind_test.py
+++ b/tools/valgrind/valgrind_test.py
@@ -266,7 +266,7 @@ class ValgrindTool(BaseTool):
"running valgrind directly")
parser.add_option("", "--indirect_webkit_layout", action="store_true",
default=False,
- help="set --wrapper rather than running valgrind "
+ help="set --wrapper rather than running Dr. Memory "
"directly.")
parser.add_option("", "--trace_children", action="store_true",
default=False,
@@ -804,6 +804,10 @@ class DrMemory(BaseTool):
default=False,
help="set BROWSER_WRAPPER rather than "
"running Dr. Memory directly on the harness")
+ parser.add_option("", "--indirect_webkit_layout", action="store_true",
+ default=False,
+ help="set --wrapper rather than running valgrind "
+ "directly.")
parser.add_option("", "--use_debug", action="store_true",
default=False, dest="use_debug",
help="Run Dr. Memory debug build")
@@ -939,13 +943,21 @@ class DrMemory(BaseTool):
# Dr.Memory requires -- to separate tool flags from the executable name.
proc += ["--"]
- if self._options.indirect:
+ if self._options.indirect or self._options.indirect_webkit_layout:
# TODO(timurrrr): reuse for TSan on Windows
wrapper_path = os.path.join(self._source_dir,
"tools", "valgrind", "browser_wrapper_win.py")
- self.CreateBrowserWrapper(" ".join(["python", wrapper_path] + proc))
+ wrapper = " ".join(["python", wrapper_path] + proc)
+ self.CreateBrowserWrapper(wrapper)
logging.info("browser wrapper = " + " ".join(proc))
- proc = []
+ if self._options.indirect_webkit_layout:
+ proc = self._args
+ # Layout tests want forward slashes.
+ wrapper = wrapper.replace('\\', '/')
+ proc += ["--wrapper", wrapper]
+ return proc
+ else:
+ proc = []
# Note that self._args begins with the name of the exe to be run.
self._args[0] = common.NormalizeWindowsPath(self._args[0])
@@ -963,7 +975,7 @@ class DrMemory(BaseTool):
analyzer = drmemory_analyze.DrMemoryAnalyzer()
ret = 0
- if not self._options.indirect:
+ if not self._options.indirect and not self._options.indirect_webkit_layout:
filenames = glob.glob(self.log_dir + "/*/results.txt")
ret = analyzer.Report(filenames, None, check_sanity)