aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHongbo Zhang <hongbo.zhang@linaro.org>2013-02-06 11:09:31 +0800
committerHongbo Zhang <hongbo.zhang@linaro.org>2013-02-06 11:09:31 +0800
commitd85f7bdd38fb0c4c1ac72c10cd101006ffc5af01 (patch)
tree17169f4362de8541b9f0bf39caa7904239f1fdd2
parent974802b87b3662cf224f38db8059add7869cfdb4 (diff)
pm-qa: thermal: let tests return if heater program cannot be launched
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.zhang@linaro.org>
-rwxr-xr-xthermal/thermal_03.sh1
-rwxr-xr-xthermal/thermal_04.sh1
-rwxr-xr-xthermal/thermal_06.sh1
3 files changed, 3 insertions, 0 deletions
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