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