test_apk.sh 943 B

12345678910111213141516171819202122232425262728293031323334353637383940
  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. # If you have more than one device attached, run `adb devices -l` and then set
  5. # the ANDROID_SERIAL environment variable to the correct serial number.
  6. APK="$1"
  7. shift
  8. if ! [ -f "$APK" ]; then
  9. cat >&2 <<- EOM
  10. Usage:
  11. $0 SKQP_APK_FILE_PATH [OPTIONAL_TESTS_TO_RUN...]
  12. e.g.:
  13. $0 skqp-universal-debug.apk
  14. or:
  15. $0 skqp-universal-debug.apk vk_hairmodes gles_gammatext gles_aarectmodes
  16. EOM
  17. exit 1
  18. fi
  19. if [ "$#" -gt 0 ]; then
  20. SKQP_ARGS="-e class org.skia.skqp.SkQPRunner#${1}"
  21. shift
  22. for arg; do
  23. SKQP_ARGS="${SKQP_ARGS},org.skia.skqp.SkQPRunner#${arg}"
  24. done
  25. export SKQP_ARGS
  26. fi
  27. TDIR="$(mktemp -d "${TMPDIR:-/tmp}/skqp_report.XXXXXXXXXX")"
  28. THIS="$(dirname "$0")"
  29. sh "$THIS/run_apk.sh" "$APK" "$TDIR"
  30. "$THIS/../../bin/sysopen" "$TDIR"/skqp_report_*/report.html