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>
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 @@
     cpus=$(ls $CPU_PATH | grep "cpu[0-9].*")
 
     for cpu in $cpus; do
-	setprefix_cpu $cpu
+	INC=0
+	CPU=/$cpu
 	$func $cpu $@
     done