skia2/tools/skqp/test_apk.sh
Hal Canary ba1602896d SkQP: new docker test code
`tools/skqp/docker_run_apk.sh` executes SkQP tests in an emulator

`tools/skqp/run_apk.sh` is used by `docker_run_apk.sh` and
`tools/skqp/test_apk.sh` to factor out common code.

Also: `bin/sysopen` now pipes output to `/dev/null` and doesn't block.

TODO: harmonize with test code executed by bots in `infra/skqp/`.

No-Try: true
Change-Id: Ia212a84565ff52279a845e20372a0ad7cc0726a4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209401
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-04-19 18:50:03 +00:00

41 lines
943 B
Bash
Executable File

#! /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
if [ "$#" -gt 0 ]; then
SKQP_ARGS="-e class org.skia.skqp.SkQPRunner#${1}"
shift
for arg; do
SKQP_ARGS="${SKQP_ARGS},org.skia.skqp.SkQPRunner#${arg}"
done
export SKQP_ARGS
fi
TDIR="$(mktemp -d "${TMPDIR:-/tmp}/skqp_report.XXXXXXXXXX")"
THIS="$(dirname "$0")"
sh "$THIS/run_apk.sh" "$APK" "$TDIR"
"$THIS/../../bin/sysopen" "$TDIR"/skqp_report_*/report.html