| Index: tools/telemetry/telemetry/core/platform/cros_platform_backend.py
|
| diff --git a/tools/telemetry/telemetry/core/platform/cros_platform_backend.py b/tools/telemetry/telemetry/core/platform/cros_platform_backend.py
|
| index e3d41c4ef030f91803995d00e23ee915322aa77a..c15c6f7802a3e1d544e4daac293b8b50b45797c4 100644
|
| --- a/tools/telemetry/telemetry/core/platform/cros_platform_backend.py
|
| +++ b/tools/telemetry/telemetry/core/platform/cros_platform_backend.py
|
| @@ -46,7 +46,10 @@ class CrosPlatformBackend(
|
| raise NotImplementedError()
|
|
|
| def RunCommand(self, args):
|
| - return self._cri.RunCmdOnDevice(args)[0]
|
| + stdout, stderr = self._cri.RunCmdOnDevice(args)
|
| + if stderr:
|
| + raise RuntimeError(stderr)
|
| + return stdout
|
|
|
| def GetFileContents(self, filename):
|
| try:
|
| @@ -106,8 +109,11 @@ class CrosPlatformBackend(
|
| def FlushEntireSystemCache(self):
|
| raise NotImplementedError()
|
|
|
| - def FlushSystemCacheForDirectory(self, directory, ignoring=None):
|
| - raise NotImplementedError()
|
| + def FlushSystemCacheForDirectory(self, directory):
|
| + flush_command = (
|
| + '/usr/local/telemetry/src/src/out/Release/clear_system_cache')
|
| + self.RunCommand(['chmod', '+x', flush_command])
|
| + self.RunCommand([flush_command, '--recurse', directory])
|
|
|
| def CanMonitorPower(self):
|
| return self._powermonitor.CanMonitorPower()
|
|
|