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

Unified Diff: tools/drmemory/scripts/pdfium_tests.py

Issue 1478453002: Update pdfium_tests.py to run pdfium tests with Dr. Memory on buildbots (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/drmemory/scripts/pdfium_tests.py
diff --git a/tools/drmemory/scripts/pdfium_tests.py b/tools/drmemory/scripts/pdfium_tests.py
index c1733f55926e7688637f3ac63aa6ff03b45c2b80..e9ccbe2d9476be5945a5e9f85e29d83f668c7ab2 100644
--- a/tools/drmemory/scripts/pdfium_tests.py
+++ b/tools/drmemory/scripts/pdfium_tests.py
@@ -55,10 +55,19 @@ class ChromeTests:
# tools/drmemory/scripts relative to the top of the tree.
script_dir = os.path.dirname(path_utils.ScriptDir())
self._source_dir = os.path.dirname(os.path.dirname(script_dir))
+ # Setup Dr. Memory if not yet
+ drmem_cmd = os.getenv("DRMEMORY_COMMAND")
+ if not drmem_cmd:
+ drmem_sfx = os.path.join(script_dir, "drmemory-windows-sfx.exe")
+ if not os.path.isfile(drmem_sfx):
+ raise RuntimeError, "Cannot find drmemory-windows-sfx.exe"
+ drmem_dir = os.path.join(script_dir, "unpacked")
+ subprocess.call([drmem_sfx, "-o"+drmem_dir, "-y"], 0)
Lei Zhang 2015/11/24 19:36:56 Just to double check, this is suppose to run: drme
Lei Zhang 2015/11/24 19:36:56 I believe python style prefers foo + bar over foo+
zhaoqin 2015/11/24 19:47:24 strange enough, there is no space after -o. Usage
zhaoqin 2015/11/24 19:47:24 Done.
+ drmem_cmd = os.path.join(drmem_dir, "bin", "drmemory.exe")
+ os.environ["DRMEMORY_COMMAND"] = drmem_cmd
# since this path is used for string matching, make sure it's always
# an absolute Unix-style path
self._source_dir = os.path.abspath(self._source_dir).replace('\\', '/')
- valgrind_test_script = os.path.join(script_dir, "valgrind_test.py")
self._command_preamble = ["--source-dir=%s" % (self._source_dir)]
if not self._options.build_dir:
« 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