| Index: build/android/pylib/perf_tests_helper.py
|
| diff --git a/build/android/pylib/perf_tests_helper.py b/build/android/pylib/perf_tests_helper.py
|
| index bec92a20d2a1bcb308322ba658d08b5c7e304692..09adf918d0a8e2840671bb7fd228c3769844aec3 100644
|
| --- a/build/android/pylib/perf_tests_helper.py
|
| +++ b/build/android/pylib/perf_tests_helper.py
|
| @@ -133,15 +133,13 @@ class PerfTestSetup(object):
|
| num_cpus = self._adb.GetFileContents('/sys/devices/system/cpu/online',
|
| log_result=False)
|
| assert num_cpus, 'Unable to find /sys/devices/system/cpu/online'
|
| - self._num_cpus = int(num_cpus[0].split('-')[-1])
|
| + self._num_cpus = int(re.findall(r'\d+', num_cpus[0])[-1])
|
| self._original_scaling_governor = None
|
|
|
| def DropRamCaches(self):
|
| """Drops the filesystem ram caches for performance testing."""
|
| - if not self._adb.IsRootEnabled():
|
| - self._adb.EnableAdbRoot()
|
| - self._adb.RunShellCommand('sync')
|
| - self._adb.RunShellCommand('echo 3 > ' + PerfTestSetup._DROP_CACHES)
|
| + self._adb.RunShellCommand('su -c sync')
|
| + self._adb.RunShellCommand('su -c echo 3 > ' + PerfTestSetup._DROP_CACHES)
|
|
|
| def SetUp(self):
|
| """Sets up performance tests."""
|
|
|