| OLD | NEW | 
|---|
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be | 
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. | 
| 4 | 4 | 
| 5 | 5 | 
| 6 import default_flavor | 6 import default_flavor | 
| 7 | 7 | 
| 8 | 8 | 
| 9 """Utils for running under Valgrind.""" | 9 """Utils for running under Valgrind.""" | 
| 10 | 10 | 
| 11 | 11 | 
| 12 class ValgrindFlavorUtils(default_flavor.DefaultFlavorUtils): | 12 class ValgrindFlavorUtils(default_flavor.DefaultFlavorUtils): | 
| 13   def __init__(self, *args, **kwargs): | 13   def __init__(self, *args, **kwargs): | 
| 14     super(ValgrindFlavorUtils, self).__init__(*args, **kwargs) | 14     super(ValgrindFlavorUtils, self).__init__(*args, **kwargs) | 
| 15     self._suppressions_file = self._skia_api.m.infra_paths['slave_build'].join( | 15     self._suppressions_file = self._skia_api.m.path['slave_build'].join( | 
| 16         'skia', 'tools', 'valgrind.supp') | 16         'skia', 'tools', 'valgrind.supp') | 
| 17 | 17 | 
| 18   def step(self, name, cmd, **kwargs): | 18   def step(self, name, cmd, **kwargs): | 
| 19     new_cmd = ['valgrind', '--gen-suppressions=all', '--leak-check=full', | 19     new_cmd = ['valgrind', '--gen-suppressions=all', '--leak-check=full', | 
| 20                '--track-origins=yes', '--error-exitcode=1', '--num-callers=40', | 20                '--track-origins=yes', '--error-exitcode=1', '--num-callers=40', | 
| 21                '--suppressions=%s' % self._suppressions_file] | 21                '--suppressions=%s' % self._suppressions_file] | 
| 22     path_to_app = self._skia_api.out_dir.join( | 22     path_to_app = self._skia_api.out_dir.join( | 
| 23         self._skia_api.configuration, cmd[0]) | 23         self._skia_api.configuration, cmd[0]) | 
| 24     new_cmd.append(path_to_app) | 24     new_cmd.append(path_to_app) | 
| 25     new_cmd.extend(cmd[1:]) | 25     new_cmd.extend(cmd[1:]) | 
| 26     return self._skia_api.run(self._skia_api.m.step, name, cmd=new_cmd, | 26     return self._skia_api.run(self._skia_api.m.step, name, cmd=new_cmd, | 
| 27                               **kwargs) | 27                               **kwargs) | 
| 28 | 28 | 
| OLD | NEW | 
|---|