aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLisa Nguyen <lisa.nguyen@linaro.org>2016-09-11 21:19:54 -0700
committerLisa Nguyen <lisa.nguyen@linaro.org>2016-09-12 16:42:01 -0700
commitcca3b386ff6cdd4704ff0e7374f0dff22eeb6018 (patch)
treee0a26a8f9e5529390fea548aab43efc5a5503688
parent7c616e70198299c2c983acada02612f9ce2c89ec (diff)
thermal: Add check for glmark2
Check to see if glmark2 is installed before running specific thermal tests. Signed-off-by: Lisa Nguyen <lisa.nguyen@linaro.org>
-rw-r--r--include/functions.sh10
-rwxr-xr-xthermal/thermal_03.sh7
-rwxr-xr-xthermal/thermal_06.sh7
3 files changed, 22 insertions, 2 deletions
diff --git a/include/functions.sh b/include/functions.sh
index e7df3f7..715005c 100644
--- a/include/functions.sh
+++ b/include/functions.sh
@@ -674,6 +674,16 @@ enable_all_thermal_zones() {
GPU_HEAT_BIN=/usr/bin/glmark2
gpu_pid=0
+check_for_glmark2() {
+ glmark2_found=$(which glmark2)
+
+ if [ $? -ne 0 ]; then
+ return 1
+ else
+ return 0
+ fi
+}
+
start_glmark2() {
if [ -n "$ANDROID" ]; then
am start org.linaro.glmark2/.Glmark2Activity
diff --git a/thermal/thermal_03.sh b/thermal/thermal_03.sh
index 3259ff4..69ffa1b 100755
--- a/thermal/thermal_03.sh
+++ b/thermal/thermal_03.sh
@@ -63,6 +63,11 @@ check_for_thermal_zones
if [ $? -ne 0 ]; then
log_skip "No thermal zones found"
else
- for_each_thermal_zone check_temperature_change
+ check_for_glmark2
+ if [ $? -ne 0 ]; then
+ log_skip "glmark2 not found"
+ else
+ for_each_thermal_zone check_temperature_change
+ fi
fi
test_status_show
diff --git a/thermal/thermal_06.sh b/thermal/thermal_06.sh
index d57aa0a..5e699e5 100755
--- a/thermal/thermal_06.sh
+++ b/thermal/thermal_06.sh
@@ -113,6 +113,11 @@ check_for_thermal_zones
if [ $? -ne 0 ]; then
log_skip "No thermal zones found"
else
- for_each_thermal_zone check_trip_point_change
+ check_for_glmark2
+ if [ $? -ne 0 ]; then
+ log_skip "glmark2 not found"
+ else
+ for_each_thermal_zone check_trip_point_change
+ fi
fi
test_status_show