diff options
author | Daniel Lezcano <daniel.lezcano@linaro.org> | 2011-08-09 23:45:30 +0200 |
---|---|---|
committer | Daniel Lezcano <daniel.lezcano@linaro.org> | 2011-08-09 23:45:30 +0200 |
commit | 1efddc170298385f2bb17a30918258b345107899 (patch) | |
tree | 53356d78fbe6fe9f43a0d25c75aca81b76e14601 | |
parent | 18e22b566057b4dcfa2ca371381dbd712039ebc0 (diff) |
number the test with an id
Automatically increment the test id making possible to identify
the test clearly.
The result will under the form:
...
cpufreq_03.0/cpu0 checking governor change to 'conservative'... PASS
cpufreq_03.1/cpu0 checking governor change to 'ondemand'... PASS
cpufreq_03.2/cpu0 checking governor change to 'userspace'... PASS
cpufreq_03.3/cpu0 checking governor change to 'powersave'... PASS
cpufreq_03.4/cpu0 checking governor change to 'performance'... PASS
cpufreq_03.0/cpu1 checking governor change to 'conservative'... PASS
cpufreq_03.1/cpu1 checking governor change to 'ondemand'... PASS
cpufreq_03.2/cpu1 checking governor change to 'userspace'... PASS
cpufreq_03.3/cpu1 checking governor change to 'powersave'... PASS
cpufreq_03.4/cpu1 checking governor change to 'performance'... PASS
cpufreq_04.0/cpu0 checking setting frequency '2.6 GHz'... PASS
cpufreq_04.1/cpu0 checking setting frequency '2.6 GHz'... PASS
cpufreq_04.2/cpu0 checking setting frequency '2.0 GHz'... PASS
cpufreq_04.3/cpu0 checking setting frequency '1.6 GHz'... PASS
cpufreq_04.4/cpu0 checking setting frequency '1.2 GHz'... PASS
cpufreq_04.5/cpu0 checking setting frequency '800.0 MHz'... PASS
cpufreq_04.0/cpu1 checking setting frequency '2.6 GHz'... PASS
cpufreq_04.1/cpu1 checking setting frequency '2.6 GHz'... PASS
cpufreq_04.2/cpu1 checking setting frequency '2.0 GHz'... PASS
cpufreq_04.3/cpu1 checking setting frequency '1.6 GHz'... PASS
cpufreq_04.4/cpu1 checking setting frequency '1.2 GHz'... PASS
cpufreq_04.5/cpu1 checking setting frequency '800.0 MHz'... PASS
cpufreq_05.0/cpu1 checking 'ondemand' directory exists... PASS
...
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Paul Larson <paul.larson@linaro.org>
-rw-r--r-- | include/functions.sh | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/include/functions.sh b/include/functions.sh index 3d45517..1eefa32 100644 --- a/include/functions.sh +++ b/include/functions.sh @@ -25,15 +25,13 @@ CPU_PATH="/sys/devices/system/cpu" TEST_NAME=$(basename ${0%.sh}) -BLOCK=$(basename $(pwd)) -PREFIX=$BLOCK:$TEST_NAME - -setprefix_cpu() { - PREFIX=$BLOCK:$TEST_NAME/$1 -} +PREFIX=$TEST_NAME +INC=0 +CPU= log_begin() { - printf "%-75s" "$PREFIX $@ ... " + printf "%-76s" "$TEST_NAME.$INC$CPU $@... " + INC=$(($INC+1)) } log_end() { @@ -53,7 +51,8 @@ for_each_cpu() { cpus=$(ls $CPU_PATH | grep "cpu[0-9].*") for cpu in $cpus; do - setprefix_cpu $cpu + INC=0 + CPU=/$cpu $func $cpu $@ done |