diff options
author | Hal Canary <halcanary@google.com> | 2018-01-22 16:51:55 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-01-22 22:28:06 +0000 |
commit | 4080305f57e6d4e03ddff81ac465094805f93b0e (patch) | |
tree | a6d0cf252965660d7285c552580ee26ca628633d | |
parent | 48661b868fbbf7a6193ef49bb6a05a0df61e7c45 (diff) |
SkQP: add some scripts for admin
Change-Id: Idfba4c3e91eb048792ab395d4ab2e4a98ed8888c
Reviewed-on: https://skia-review.googlesource.com/98323
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
-rwxr-xr-x | tools/skqp/make_apk.sh | 56 | ||||
-rwxr-xr-x | tools/skqp/make_known_tests.sh | 19 | ||||
-rwxr-xr-x | tools/skqp/make_model.sh | 15 |
3 files changed, 90 insertions, 0 deletions
diff --git a/tools/skqp/make_apk.sh b/tools/skqp/make_apk.sh new file mode 100755 index 0000000000..6b44a2b97f --- /dev/null +++ b/tools/skqp/make_apk.sh @@ -0,0 +1,56 @@ +#! /bin/sh + +# Copyright 2018 Google Inc. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +set -e + +ANDROID_NDK="$1" + +if ! [ -d "$ANDROID_NDK" ] || ! [ -x "${ANDROID_NDK}/ndk-build" ]; then + printf "\nUsage:\n %s ANDROID_NDK_PATH\n" "$0" >&2 + exit 1 +fi + +case ":${PATH}:" in + */depot_tools:*) ;; + *) + printf '\ndepot_tools should be in your $PATH.\n' >&2 + exit 1;; +esac + +if ! [ -d "$ANDROID_HOME" ] || ! [ -x "${ANDROID_HOME}/platform-tools/adb" ]; then + printf '\n$ANDROID_HOME not set or is broken.\n' >&2 + exit 1 +fi + +set -x + +ARCH=${SKQP_ARCH:-arm} + +cd "$(dirname "$0")/../.." + +mkdir -p out/skqp-${ARCH} + +cat > out/skqp-${ARCH}/args.gn << EOF + ndk = "$ANDROID_NDK" + ndk_api = 26 + target_cpu = "${ARCH}" + skia_embed_resources = true + is_debug = false + skia_enable_pdf = false +EOF + +GIT_SYNC_DEPS_QUIET=Y tools/git-sync-deps + +bin/gn gen out/skqp-${ARCH} + +rm -rf out/skqp-${ARCH}/gen + +platform_tools/android/bin/android_build_app -C out/skqp-${ARCH} skqp + +set +x + +printf '\n\nAPK built: "%s/skqp.apk"\n\n' "$(pwd)/out/skqp-${ARCH}" + diff --git a/tools/skqp/make_known_tests.sh b/tools/skqp/make_known_tests.sh new file mode 100755 index 0000000000..fd1e8798c1 --- /dev/null +++ b/tools/skqp/make_known_tests.sh @@ -0,0 +1,19 @@ +#! /bin/sh + +# Copyright 2018 Google Inc. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +set -e -x + +tools/git-sync-deps +bin/bn gen out/default +ninja -C out/default list_gms list_gpu_unit_tests +out/default/list_gms > \ + platform_tools/android/apps/skqp/src/main/assets/skqp/KnownGMs.txt +out/default/list_gpu_unit_tests > \ + platform_tools/android/apps/skqp/src/main/assets/skqp/KnownGpuUnitTests.txt +git add \ + platform_tools/android/apps/skqp/src/main/assets/skqp/KnownGMs.txt \ + platform_tools/android/apps/skqp/src/main/assets/skqp/KnownGpuUnitTests.txt + diff --git a/tools/skqp/make_model.sh b/tools/skqp/make_model.sh new file mode 100755 index 0000000000..6dd10e35aa --- /dev/null +++ b/tools/skqp/make_model.sh @@ -0,0 +1,15 @@ +#! /bin/sh +# Copyright 2018 Google Inc. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +set -e -x + +test -f "$1" + +go get -u go.skia.org/infra/golden/go/search + +go run tools/skqp/make_gmkb.go "$1" platform_tools/android/apps/skqp/src/main/assets/gmkb + +git add platform_tools/android/apps/skqp/src/main/assets/gmkb + |