diff options
Diffstat (limited to 'infra/bots/recipe_modules/skia/valgrind_flavor.py')
-rw-r--r-- | infra/bots/recipe_modules/skia/valgrind_flavor.py | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/infra/bots/recipe_modules/skia/valgrind_flavor.py b/infra/bots/recipe_modules/skia/valgrind_flavor.py new file mode 100644 index 0000000000..2c00566436 --- /dev/null +++ b/infra/bots/recipe_modules/skia/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 default_flavor + + +"""Utils for running under Valgrind.""" + + +class ValgrindFlavorUtils(default_flavor.DefaultFlavorUtils): + def __init__(self, *args, **kwargs): + super(ValgrindFlavorUtils, self).__init__(*args, **kwargs) + self._suppressions_file = self._skia_api.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._skia_api.run(self._skia_api.m.step, name, cmd=new_cmd, + **kwargs) + |