aboutsummaryrefslogtreecommitdiff
path: root/crosperf/suite_runner_unittest.py
diff options
context:
space:
mode:
Diffstat (limited to 'crosperf/suite_runner_unittest.py')
-rwxr-xr-xcrosperf/suite_runner_unittest.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/crosperf/suite_runner_unittest.py b/crosperf/suite_runner_unittest.py
index ed18eb7a..d7b9e770 100755
--- a/crosperf/suite_runner_unittest.py
+++ b/crosperf/suite_runner_unittest.py
@@ -171,7 +171,10 @@ class SuiteRunnerTest(unittest.TestCase):
'set -e && '
# Disable Turbo in Intel pstate driver
'if [[ -e /sys/devices/system/cpu/intel_pstate/no_turbo ]]; then '
- '(echo -n 1 > /sys/devices/system/cpu/intel_pstate/no_turbo || true); fi; '
+ ' if grep -q 0 /sys/devices/system/cpu/intel_pstate/no_turbo; then '
+ ' echo -n 1 > /sys/devices/system/cpu/intel_pstate/no_turbo; '
+ ' fi; '
+ 'fi; '
# Set governor to performance for each cpu
'for f in /sys/devices/system/cpu/cpu*/cpufreq; do '
'cd $f; '