aboutsummaryrefslogtreecommitdiffhomepage
path: root/infra/bots/recipe_modules/flavor/valgrind_flavor.py
diff options
context:
space:
mode:
authorGravatar Eric Boren <borenet@google.com>2017-02-02 09:02:37 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-02-02 14:31:45 +0000
commit7e97dc0aa1ff5b03593e689fe1cfdcc3550c169e (patch)
treef29cb093e1fdd069cfc119dfc5b1e24097401bfd /infra/bots/recipe_modules/flavor/valgrind_flavor.py
parent8233fc82b00763d37a7b0db7890b15c7d58939d4 (diff)
Copy modules back in from skia-recipes repo
BUG=skia:6070 Change-Id: I86b3f039c27bd8287516c1db8bd1cae62888171b Reviewed-on: https://skia-review.googlesource.com/7890 Reviewed-by: Ravi Mistry <rmistry@google.com> Commit-Queue: Eric Boren <borenet@google.com>
Diffstat (limited to 'infra/bots/recipe_modules/flavor/valgrind_flavor.py')
-rw-r--r--infra/bots/recipe_modules/flavor/valgrind_flavor.py27
1 files changed, 27 insertions, 0 deletions
diff --git a/infra/bots/recipe_modules/flavor/valgrind_flavor.py b/infra/bots/recipe_modules/flavor/valgrind_flavor.py
new file mode 100644
index 0000000000..0ebc161118
--- /dev/null
+++ b/infra/bots/recipe_modules/flavor/valgrind_flavor.py
@@ -0,0 +1,27 @@
+# Copyright 2014 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.
+
+
+import gn_flavor
+
+
+"""Utils for running under Valgrind."""
+
+
+class ValgrindFlavorUtils(gn_flavor.GNFlavorUtils):
+ def __init__(self, m):
+ super(ValgrindFlavorUtils, self).__init__(m)
+ self._suppressions_file = self.m.vars.skia_dir.join(
+ 'tools', 'valgrind.supp')
+
+ def step(self, name, cmd, **kwargs):
+ new_cmd = ['valgrind', '--gen-suppressions=all', '--leak-check=full',
+ '--track-origins=yes', '--error-exitcode=1', '--num-callers=40',
+ '--suppressions=%s' % self._suppressions_file]
+ path_to_app = self.out_dir.join(cmd[0])
+ new_cmd.append(path_to_app)
+ new_cmd.extend(cmd[1:])
+ return self.m.run(self.m.step, name, cmd=new_cmd,
+ **kwargs)
+