aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThara Gopinath <thara.gopinath@linaro.org>2021-12-07 17:40:53 -0500
committerThara Gopinath <thara.gopinath@linaro.org>2021-12-07 17:40:53 -0500
commitb51a5fb83ca855560e98d42cec6afd226232cf6d (patch)
tree9674f3fdd8a8a2706bb2f77e56b79dafa0ebb4dc
parenta68258861fbc9375ec3725635cdadf3a85bf03c3 (diff)
Update benchmarks.sh to work on all platforms irrespective of content of cpufreq directory
Signed-off-by: Thara Gopinath <thara.gopinath@linaro.org>
-rwxr-xr-xbenchmarks.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/benchmarks.sh b/benchmarks.sh
index 42be6df..fce9993 100755
--- a/benchmarks.sh
+++ b/benchmarks.sh
@@ -43,7 +43,15 @@ exit 1
}
rm -Rf $OUTPUT_FILE
-policies=$(ls /sys/devices/system/cpu/cpufreq)
+
+cpufreq_content=$(ls /sys/devices/system/cpu/cpufreq)
+policies=""
+for elem in $cpufreq_content;
+do
+ if [[ "$elem" == "policy"* ]]; then
+ policies+="${elem} "
+ fi
+done
[ -z "$policies" ] && default_system_test
declare -A cur_policy=()