If the heater program for heating CPU cannot be launched for some reason, the
tests should return right now, it is wasting time to execute all the rest parts
without heater program.

Signed-off-by: Hongbo Zhang <hongbo.zh...@linaro.org>
---
 thermal/thermal_03.sh | 1 +
 thermal/thermal_04.sh | 1 +
 thermal/thermal_06.sh | 1 +
 3 files changed, 3 insertions(+)

diff --git a/thermal/thermal_03.sh b/thermal/thermal_03.sh
index ff8ca33..f2cfb81 100755
--- a/thermal/thermal_03.sh
+++ b/thermal/thermal_03.sh
@@ -48,6 +48,7 @@ check_temperature_change() {
     cpu_pid=$(ps | grep heat_cpu| awk '{print $1}')
     test -z $cpu_pid && cpu_pid=0
     check "start cpu heat binary" "test $cpu_pid -ne 0"
+    test $cpu_pid -eq 0 && return
 
     start_glmark2
 
diff --git a/thermal/thermal_04.sh b/thermal/thermal_04.sh
index 8f0dee7..7fe53e2 100755
--- a/thermal/thermal_04.sh
+++ b/thermal/thermal_04.sh
@@ -58,6 +58,7 @@ verify_cooling_device_temp_change() {
     local cool_temp=0
     ./$HEAT_CPU_MODERATE moderate &
     pid=$!
+    test $pid -eq 0 && return
 
     while (test $count -le $max_state); do
        echo 0 > $dirpath/cur_state
diff --git a/thermal/thermal_06.sh b/thermal/thermal_06.sh
index 0084281..b0a9442 100755
--- a/thermal/thermal_06.sh
+++ b/thermal/thermal_06.sh
@@ -60,6 +60,7 @@ check_trip_point_change() {
     cpu_pid=$(ps | grep heat_cpu| awk '{print $1}')
     test -z $cpu_pid && cpu_pid=0
     check "start cpu heat binary" "test $cpu_pid -ne 0"
+    test $cpu_pid -eq 0 && return
 
     start_glmark2
 
-- 
1.8.0


_______________________________________________
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev

Reply via email to