Chromium Code Reviews| Index: build/android/pylib/perf/perf_control_unittest.py |
| diff --git a/build/android/pylib/perf/perf_control_unittest.py b/build/android/pylib/perf/perf_control_unittest.py |
| index bd30a4eea7af9e0472dc4ddd91f390aec27abdf3..72a5aeff43056d7766dd5d6aebc0fc1fff7312a9 100644 |
| --- a/build/android/pylib/perf/perf_control_unittest.py |
| +++ b/build/android/pylib/perf/perf_control_unittest.py |
| @@ -23,24 +23,24 @@ class TestPerfControl(unittest.TestCase): |
| self._device = device_utils.DeviceUtils( |
| android_commands.AndroidCommands(device=devices[0])) |
| - def testForceAllCpusOnline(self): |
| + def testHighPerfMode(self): |
| perf = perf_control.PerfControl(self._device) |
| - cpu_online_files = self._device.old_interface.RunShellCommand( |
| - 'ls -d /sys/devices/system/cpu/cpu[0-9]*/online') |
| + |
| try: |
| - perf.ForceAllCpusOnline(True) |
| + perf.SetHighPerfMode() |
| + cpu_online_files = self._device.old_interface.RunShellCommand( |
| + 'ls -d /sys/devices/system/cpu/cpu[0-9]*/online') |
| for path in cpu_online_files: |
| self.assertEquals('1', |
| self._device.old_interface.GetFileContents(path)[0]) |
| - mode = self._device.old_interface.RunShellCommand('ls -l %s' % path)[0] |
| - self.assertEquals('-r--r--r--', mode[:10]) |
| - finally: |
| - perf.ForceAllCpusOnline(False) |
| - |
| - for path in cpu_online_files: |
| - mode = self._device.old_interface.RunShellCommand('ls -l %s' % path)[0] |
| - self.assertEquals('-rw-r--r--', mode[:10]) |
| + cpu_governor_files = self._device.old_interface.RunShellCommand( |
| + 'ls -d /sys/devices/system/cpu/cpu[0-9]*/cpufreq/cpuinfo_cur_freq') |
|
Sami
2014/06/17 04:16:44
Should we be checking scaling_governor instead of
epenner
2014/06/17 22:10:56
Thanks! As you can see I haven't run this yet. I w
|
| + for path in cpu_governor_files: |
| + self.assertEquals('performance', |
| + self._device.old_interface.GetFileContents(path)[0]) |
| + finally: |
| + perf.SetDefaultPerfMode() |
| if __name__ == '__main__': |
| unittest.main() |