2018-08-23 18:50:07 +00:00
|
|
|
#! /bin/sh
|
|
|
|
# Copyright 2018 Google LLC.
|
|
|
|
# Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
|
|
|
|
|
|
|
|
# If you have more than one device attached, run `adb devices -l` and then set
|
|
|
|
# the ANDROID_SERIAL environment variable to the correct serial number.
|
|
|
|
|
|
|
|
APK="$1"
|
|
|
|
shift
|
|
|
|
|
|
|
|
if ! [ -f "$APK" ]; then
|
|
|
|
cat >&2 <<- EOM
|
|
|
|
|
|
|
|
Usage:
|
|
|
|
$0 SKQP_APK_FILE_PATH [OPTIONAL_TESTS_TO_RUN...]
|
|
|
|
|
|
|
|
e.g.:
|
|
|
|
$0 skqp-universal-debug.apk
|
|
|
|
or:
|
|
|
|
$0 skqp-universal-debug.apk vk_hairmodes gles_gammatext gles_aarectmodes
|
|
|
|
|
|
|
|
EOM
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2018-11-26 19:07:41 +00:00
|
|
|
if [ "$#" -gt 0 ]; then
|
2019-04-19 18:38:59 +00:00
|
|
|
SKQP_ARGS="-e class org.skia.skqp.SkQPRunner#${1}"
|
2018-08-23 18:50:07 +00:00
|
|
|
shift
|
|
|
|
for arg; do
|
2019-04-19 18:38:59 +00:00
|
|
|
SKQP_ARGS="${SKQP_ARGS},org.skia.skqp.SkQPRunner#${arg}"
|
2018-08-23 18:50:07 +00:00
|
|
|
done
|
2019-04-19 18:38:59 +00:00
|
|
|
export SKQP_ARGS
|
2018-08-23 18:50:07 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
TDIR="$(mktemp -d "${TMPDIR:-/tmp}/skqp_report.XXXXXXXXXX")"
|
2019-04-19 18:38:59 +00:00
|
|
|
THIS="$(dirname "$0")"
|
2018-08-23 18:50:07 +00:00
|
|
|
|
2019-04-19 18:38:59 +00:00
|
|
|
sh "$THIS/run_apk.sh" "$APK" "$TDIR"
|
2018-08-23 18:50:07 +00:00
|
|
|
|
2019-04-19 18:38:59 +00:00
|
|
|
"$THIS/../../bin/sysopen" "$TDIR"/skqp_report_*/report.html
|