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

Unified Diff: infra/bots/flavor/valgrind_flavor.py

Issue 1703663002: Port Skia recipe to normal Python scripts, move to Skia repo (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address comments Created 4 years, 10 months 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 | « infra/bots/flavor/ssh_flavor.py ('k') | infra/bots/flavor/xsan_flavor.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: infra/bots/flavor/valgrind_flavor.py
diff --git a/infra/bots/flavor/valgrind_flavor.py b/infra/bots/flavor/valgrind_flavor.py
new file mode 100644
index 0000000000000000000000000000000000000000..129a7c08ed8fd463de90e8f85533e7c0e326d6fb
--- /dev/null
+++ b/infra/bots/flavor/valgrind_flavor.py
@@ -0,0 +1,31 @@
+#!/usr/bin/env python
+#
+# Copyright 2016 Google Inc.
+#
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+
+import default_flavor
+import os
+
+
+"""Utils for running under Valgrind."""
+
+
+class ValgrindFlavorUtils(default_flavor.DefaultFlavorUtils):
+ def __init__(self, *args, **kwargs):
+ super(ValgrindFlavorUtils, self).__init__(*args, **kwargs)
+ self._suppressions_file = os.path.join(self._bot_info.skia_dir,
+ '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 = os.path.join(self._bot_info.out_dir,
+ self._bot_info.configuration, cmd[0])
+ new_cmd.append(path_to_app)
+ new_cmd.extend(cmd[1:])
+ return self._bot_info.run(new_cmd, **kwargs)
+
« no previous file with comments | « infra/bots/flavor/ssh_flavor.py ('k') | infra/bots/flavor/xsan_flavor.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698