Flutter Engine
The Flutter Engine
valgrind.py
Go to the documentation of this file.
1# Copyright 2014 The Chromium Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5
6from . import default
7
8
9"""Valgrind flavor, used for running code through Valgrind."""
10
11
13 def __init__(self, m, app_name):
14 super(ValgrindFlavor, self).__init__(m, app_name)
15 self._suppressions_file = self.m.path.start_dir.join(
16 'skia', 'tools', 'valgrind.supp')
17 self._valgrind_cipd_dir = self.m.vars.workdir.join('valgrind')
19 self._valgrind = self._valgrind_fake_dir.join('bin', 'valgrind')
20 self._lib_dir = self._valgrind_fake_dir.join('lib', 'valgrind')
21
22 def step(self, name, cmd, **kwargs):
23 new_cmd = [self._valgrind, '--gen-suppressions=all', '--leak-check=full',
24 '--track-origins=yes', '--error-exitcode=1', '--num-callers=40',
25 '--suppressions=%s' % self._suppressions_file]
26 path_to_app = self.host_dirs.bin_dir.join(cmd[0])
27 new_cmd.append(path_to_app)
28 new_cmd.extend(cmd[1:])
29 with self.m.env({'VALGRIND_LIB': self._lib_dir}):
30 return self.m.run(self.m.step, name, cmd=new_cmd, **kwargs)
def step(self, name, cmd, **kwargs)
Definition: valgrind.py:22
def __init__(self, m, app_name)
Definition: valgrind.py:13
Definition: __init__.py:1
Definition: run.py:1
static SkString join(const CommandLineFlags::StringArray &)
Definition: skpbench.cpp:741