diff options
author | Qin Zhao <zhaoqin@google.com> | 2015-11-18 17:21:48 -0500 |
---|---|---|
committer | Qin Zhao <zhaoqin@google.com> | 2015-11-18 17:21:48 -0500 |
commit | 2ef59d1ec8dbb9d3d221309f04c71e2a562e771c (patch) | |
tree | 38e76ba27de262bf2292a311081903edf2c0890d /tools/drmemory/scripts/pdfium_tests.bat | |
parent | 3cca9c8f68e7a60a9e064bb2e036fdd51ae6eb55 (diff) | |
download | pdfium-2ef59d1ec8dbb9d3d221309f04c71e2a562e771c.tar.xz |
Merge to XFA: Add Dr. Memory tool
This CL adds DrMemory-Windows-sfx.exe into tools/drmemory.
It also adds a set of scripts from chromium/src/tools/valgrind for
running Dr. Memory. Now we can run pdfium tests with Dr. Memory:
$ .\tools\drmemory\scripts\pdfium_tests.bat -b out\Debug -t pdfium_unittests
More update on scripts is required, but this should be a good start.
Changes from chromium/src/tools/valgrind
- rename chrome_tests.py to pdfium_tests.py
- update pdfium_tests.bat
- remove chrome tests in pdfium_tests.py
- remove memcheck code in valgrind_test.py
R=thestig@chromium.org
BUG=pdfium:238
Review URL: https://codereview.chromium.org/1452293002 .
(cherry picked from commit 4dcf313c46c176e5afa1328f5f07fce4e614366d)
Review URL: https://codereview.chromium.org/1452373004 .
Diffstat (limited to 'tools/drmemory/scripts/pdfium_tests.bat')
-rw-r--r-- | tools/drmemory/scripts/pdfium_tests.bat | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tools/drmemory/scripts/pdfium_tests.bat b/tools/drmemory/scripts/pdfium_tests.bat new file mode 100644 index 0000000000..4618a0e945 --- /dev/null +++ b/tools/drmemory/scripts/pdfium_tests.bat @@ -0,0 +1,24 @@ +@echo off
+:: Copyright (c) 2011 The Chromium Authors. All rights reserved.
+:: Use of this source code is governed by a BSD-style license that can be
+:: found in the LICENSE file.
+
+set THISDIR=%~dp0
+set TOOL_NAME="drmemory_full"
+
+:: Set up DRMEMORY_COMMAND to invoke Dr. Memory {{{1
+set DRMEMORY_PATH=%THISDIR%..
+set DRMEMORY_SFX=%DRMEMORY_PATH%\drmemory-windows-sfx.exe
+if EXIST %DRMEMORY_SFX% GOTO DRMEMORY_BINARY_OK
+echo "Can't find Dr. Memory executables."
+echo "See http://www.chromium.org/developers/how-tos/using-valgrind/dr-memory"
+echo "for the instructions on how to get them."
+exit /B 1
+
+:DRMEMORY_BINARY_OK
+%DRMEMORY_SFX% -o%DRMEMORY_PATH%\unpacked -y
+set DRMEMORY_COMMAND=%DRMEMORY_PATH%\unpacked\bin\drmemory.exe
+:: }}}
+
+:RUN_TESTS
+python %THISDIR%/pdfium_tests.py %*
|