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>
This commit is contained in:
parent
48661b868f
commit
4080305f57
56
tools/skqp/make_apk.sh
Executable file
56
tools/skqp/make_apk.sh
Executable file
@ -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}"
|
||||||
|
|
19
tools/skqp/make_known_tests.sh
Executable file
19
tools/skqp/make_known_tests.sh
Executable file
@ -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
|
||||||
|
|
15
tools/skqp/make_model.sh
Executable file
15
tools/skqp/make_model.sh
Executable file
@ -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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user