pm-qa: change result message for tests
- change the result message for each subtest, so that it won't interfere with lava log
parsing. Report total pass and fail count for tests.
- bug: https://bugs.launchpad.net/linaro-power-qa/+bug/1156614
- change permission in cputopology scripts for execution
Signed-off-by: Sanjay Singh Rawat <sanjay.rawat@linaro.org>
diff --git a/include/functions.sh b/include/functions.sh
index 7ee809b..fa9a370 100644
--- a/include/functions.sh
+++ b/include/functions.sh
@@ -30,6 +30,17 @@
PREFIX=$TEST_NAME
INC=0
CPU=
+pass_count=0
+fail_count=0
+
+test_status_show() {
+ echo "-------- total = $(($pass_count + $fail_count))"
+ echo "-------- pass = $pass_count"
+ # report failure only if it is there
+ if [ $fail_count -ne 0 ] ; then
+ echo "-------- fail = $fail_count"
+ fi
+}
log_begin() {
printf "%-76s" "$TEST_NAME.$INC$CPU: $@... "
@@ -216,11 +227,13 @@
$func $@
if [ $? != 0 ]; then
- log_end "fail"
+ log_end "Err"
+ fail_count=$(($fail_count + 1))
return 1
fi
- log_end "pass"
+ log_end "Ok"
+ pass_count=$(($pass_count + 1))
return 0
}