Following issues fixed: 1. Name of generated rcport file is powertop*.csv not PowerTop*.csv 2. sudo not available in android so dropped it. 3. "ls -1" not supported in android "ls" command so changed it to plain "ls".
Signed-off-by: Chander Kashyap chander.kashyap@linaro.org --- Changes in v2: fixed typo
powertop/powertop_01.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/powertop/powertop_01.sh b/powertop/powertop_01.sh index cf243f1..6f2511f 100755 --- a/powertop/powertop_01.sh +++ b/powertop/powertop_01.sh @@ -33,14 +33,14 @@ run_powertop() { local report=csv local seconds=10 local iterations=2 - local report_name=PowerTOP*.csv + local report_name=powertop*.csv
# remove old reports if exists rm -f $report_name
# run powertop for $(iterations) in report generation mode start_time=`date +%s` - sudo $bin_path --$report --time=$seconds --iteration=$iterations + $bin_path --$report --time=$seconds --iteration=$iterations end_time=`date +%s`
# check if powertop run for desired time @@ -50,7 +50,7 @@ run_powertop() { check "if powertop run for $expected_time sec" "test $actual_time -ge $expected_time"
# check if $(iterations) number of reports are generated - check "if reports are generated" "test $(ls -1 $report_name | wc -l) -eq $iterations" + check "if reports are generated" "test $(ls $report_name | wc -l) -eq $iterations"
return 0 }