| 1 |
#! /bin/sh |
| 2 |
# Copyright 2018 Google LLC. |
| 3 |
# Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. |
| 4 |
|
| 5 |
# If you have more than one device attached, run `adb devices -l` and then set |
| 6 |
# the ANDROID_SERIAL environment variable to the correct serial number. |
| 7 |
|
| 8 |
APK="$1" |
| 9 |
shift |
| 10 |
|
| 11 |
if ! [ -f "$APK" ]; then |
| 12 |
cat >&2 <<- EOM |
| 13 |
|
| 14 |
Usage: |
| 15 |
$0 SKQP_APK_FILE_PATH [OPTIONAL_TESTS_TO_RUN...] |
| 16 |
|
| 17 |
e.g.: |
| 18 |
$0 skqp-universal-debug.apk |
| 19 |
or: |
| 20 |
$0 skqp-universal-debug.apk vk_hairmodes gles_gammatext gles_aarectmodes |
| 21 |
|
| 22 |
EOM |
| 23 |
exit 1 |
| 24 |
fi |
| 25 |
|
| 26 |
if [ "$#" -gt 0 ]; then |
| 27 |
SKQP_ARGS="-e class org.skia.skqp.SkQPRunner#${1}" |
| 28 |
shift |
| 29 |
for arg; do |
| 30 |
SKQP_ARGS="${SKQP_ARGS},org.skia.skqp.SkQPRunner#${arg}" |
| 31 |
done |
| 32 |
export SKQP_ARGS |
| 33 |
fi |
| 34 |
|
| 35 |
TDIR="$(mktemp -d "${TMPDIR:-/tmp}/skqp_report.XXXXXXXXXX")" |
| 36 |
THIS="$(dirname "$0")" |
| 37 |
|
| 38 |
sh "$THIS/run_apk.sh" "$APK" "$TDIR" |
| 39 |
|
| 40 |
"$THIS/../../bin/sysopen" "$TDIR"/skqp_report_*/report.html |