skia2/infra/skqp/run_skqp.sh
Kevin Lubick 35b87a5b44 Add Build and Test jobs for SKQP using docker.
Uses Docker to compile an APK and then run it on an emulator.

We use a specialized image for build (includes Clang, etc)
And then the 3rd party base image for just the test (which
has the emulator and SDK on it).

Bug: skia:7578, skia:7692
Change-Id: I948e0b091868e7173b00e3affd7c3d59a5cd1ec2
Reviewed-on: https://skia-review.googlesource.com/c/159681
Reviewed-by: Stephan Altmueller <stephana@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
2018-10-08 19:17:25 +00:00

28 lines
930 B
Bash
Executable File

#!/bin/bash
# Copyright 2018 Google LLC
#
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# Assumes this is in a docker container with a skia repo mounted at /SRC and a folder containing the
# built APK to be in /OUT.
# Additionally, this assumes that the docker container was run to have an android emulator running
# that is accesible with adb.
# This script in particular doesn't care about arm vs x86, but the current incarnation has an x86
# emulator and so the apk should be built for that.
#
# Example usage:
#
set -ex
# Wait for boot
timeout 60 adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done'
# Some extra sleep to make sure the emulator is awake and ready for installation
sleep 10
adb install -r /OUT/*.apk
adb logcat -c
adb shell am instrument -w org.skia.skqp
adb logcat -d TestRunner org.skia.skqp skia DEBUG "*:S"