[pm-qa] fix cpufreq_05 number ids

Message ID 1313655684-22832-1-git-send-email-daniel.lezcano@linaro.org
State Accepted
Commit 8db025452f8d30817266e8d4245a077ed5943b91
Headers show

Commit Message

Daniel Lezcano Aug. 18, 2011, 8:21 a.m.
Fix the numbering by manually setting for each cpu instead of
using the function which reset the test id.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
 cpufreq/cpufreq_05.sh |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)

Patch

diff --git a/cpufreq/cpufreq_05.sh b/cpufreq/cpufreq_05.sh
index 6ba938c..a264e24 100755
--- a/cpufreq/cpufreq_05.sh
+++ b/cpufreq/cpufreq_05.sh
@@ -51,19 +51,26 @@  switch_userspace() {
     set_governor $cpu 'userspace'
 }
 
-for_each_cpu switch_ondemand
+for cpu in $(ls $CPU_PATH | grep "cpu[0-9].*"); do
+    switch_ondemand $cpu
+done
 check "'ondemand' directory exists" "test -d $CPU_PATH/cpufreq/ondemand"
 
-for_each_cpu switch_conservative
+for cpu in $(ls $CPU_PATH | grep "cpu[0-9].*"); do
+    switch_conservative $cpu
+done
 check "'conservative' directory exists" "test -d $CPU_PATH/cpufreq/conservative"
 
-for_each_cpu switch_userspace
+for cpu in $(ls $CPU_PATH | grep "cpu[0-9].*"); do
+    switch_userspace $cpu
+done
+
 check "'ondemand' directory is not there" "test ! -d $CPU_PATH/cpufreq/ondemand"
 check "'conservative' directory is not there" "test ! -d $CPU_PATH/cpufreq/conservative"
 
 # if more than one cpu, combine governors
 nrcpus=$(ls $CPU_PATH | grep "cpu[0-9].*" | wc -l)
-if [ $nrcpus > 0 ]; then
+if [ $nrcpus > 1 ]; then
     switch_ondemand cpu0
     switch_conservative cpu1
     check "'ondemand' directory exists" "test -d $CPU_PATH/cpufreq/ondemand"