thermal: enable launching glmark2 in Android
Enable launching glmark2 in Android to heat GPU as one of thermal tests.
Signed-off-by: Hongbo Zhang <hongbo.zhang@linaro.com>
diff --git a/include/thermal_functions.sh b/include/thermal_functions.sh
index df7adfe..8a4d627 100644
--- a/include/thermal_functions.sh
+++ b/include/thermal_functions.sh
@@ -243,6 +243,11 @@
gpu_pid=0
start_glmark2() {
+ if [ -n "$ANDROID" ]; then
+ am start org.linaro.glmark2/.Glmark2Activity
+ return
+ fi
+
if [ -x $GPU_HEAT_BIN ]; then
$GPU_HEAT_BIN &
gpu_pid=$(pidof $GPU_HEAT_BIN)
@@ -265,6 +270,11 @@
}
kill_glmark2() {
+ if [ -n "$ANDROID" ]; then
+ am kill org.linaro.glmark2
+ return
+ fi
+
if [ "$gpu_pid" != 0 ]; then
kill -9 $gpu_pid
fi