summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/base/ssl_test_util.cc1
-rwxr-xr-xtools/valgrind/chrome_tests.py10
-rw-r--r--tools/valgrind/suppressions_mac.txt10
-rwxr-xr-xtools/valgrind/valgrind_test.py4
4 files changed, 23 insertions, 2 deletions
diff --git a/net/base/ssl_test_util.cc b/net/base/ssl_test_util.cc
index 04731b5e7..71edb6a 100644
--- a/net/base/ssl_test_util.cc
+++ b/net/base/ssl_test_util.cc
@@ -126,6 +126,7 @@ void AppendToPythonPath(FilePath dir) {
#elif defined(OS_POSIX)
const char kPythonPath[] = "PYTHONPATH";
const char* oldpath = getenv(kPythonPath);
+ // setenv() leaks memory intentionally on Mac
if (!oldpath) {
setenv(kPythonPath, dir.value().c_str(), 1);
} else if (!strstr(oldpath, dir.value().c_str())) {
diff --git a/tools/valgrind/chrome_tests.py b/tools/valgrind/chrome_tests.py
index 2c024c1..bc40a3d 100755
--- a/tools/valgrind/chrome_tests.py
+++ b/tools/valgrind/chrome_tests.py
@@ -122,6 +122,16 @@ class ChromeTests:
suppression_file = os.path.join(directory, "suppressions.txt")
if os.path.exists(suppression_file):
cmd.append("--suppressions=%s" % suppression_file)
+ # Platform specific suppression
+ suppression_platform = {
+ 'darwin': 'mac',
+ 'linux2': 'linux'
+ }[sys.platform]
+ suppression_file_platform = \
+ os.path.join(directory, 'suppressions_%s.txt' % suppression_platform)
+ if os.path.exists(suppression_file_platform):
+ cmd.append("--suppressions=%s" % suppression_file_platform)
+
if self._options.baseline:
cmd.append("--baseline")
if self._options.verbose:
diff --git a/tools/valgrind/suppressions_mac.txt b/tools/valgrind/suppressions_mac.txt
new file mode 100644
index 0000000..5e944a2
--- /dev/null
+++ b/tools/valgrind/suppressions_mac.txt
@@ -0,0 +1,10 @@
+{
+ # See http://code.google.com/p/chromium/issues/detail?id=9565
+ # This should have been handled by platform-specific suppression.
+ # Remove this when https://bugs.kde.org/show_bug.cgi?id=188572 is fixed
+ setenv() leaks on Mac intentionally.
+ Memcheck:Leak
+ ...
+ fun:__setenv
+ fun:setenv$UNIX2003
+}
diff --git a/tools/valgrind/valgrind_test.py b/tools/valgrind/valgrind_test.py
index 2a07755..04d6bc6 100755
--- a/tools/valgrind/valgrind_test.py
+++ b/tools/valgrind/valgrind_test.py
@@ -53,7 +53,7 @@ class Valgrind(object):
self._parser.add_option("", "--source_dir",
help="path to top of source tree for this build"
"(used to normalize source paths in baseline)")
- self._parser.add_option("", "--suppressions", default=["."],
+ self._parser.add_option("", "--suppressions", default=[],
action="append",
help="path to a valgrind suppression file")
self._parser.add_option("", "--gtest_filter", default="",
@@ -141,7 +141,7 @@ class Valgrind(object):
return True
def RunTestsAndAnalyze(self):
- self.PrepareForTest()
+#self.PrepareForTest()
self.Execute()
if self._generate_suppressions: