From 88df8d2e5a87df5605b1d5530408cc6f534d8feb Mon Sep 17 00:00:00 2001 From: Stephan Altmueller Date: Wed, 7 Mar 2018 14:44:44 -0500 Subject: Test SKQP on Firebase Testlab and Upload - adds building the testlab driver (run_testlab) as a separate step - adds gcloud isolate necessary to run testlab - adds Testlab support and uploading a verified AKP to GCS (with meta data attached). Bug: skia: Change-Id: I1bf265f46c99360eb3a9eb684886f93de48085fe Reviewed-on: https://skia-review.googlesource.com/111603 Reviewed-by: Eric Boren Reviewed-by: Ben Wagner Commit-Queue: Stephan Altmueller --- tools/skqp/clean_app.sh | 17 +++++++++++++++++ tools/skqp/make_universal_apk | 27 ++++++++++++--------------- 2 files changed, 29 insertions(+), 15 deletions(-) create mode 100755 tools/skqp/clean_app.sh (limited to 'tools/skqp') diff --git a/tools/skqp/clean_app.sh b/tools/skqp/clean_app.sh new file mode 100755 index 0000000000..d6b5284d88 --- /dev/null +++ b/tools/skqp/clean_app.sh @@ -0,0 +1,17 @@ +#! /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 + +# Change to the root and remove previously added build assets from the source +# tree of the SKQP app. +cd "$(dirname "$0")/../.." +cd platform_tools/android/apps +git clean -fxd skqp/build \ + skqp/src/main/assets/gmkb \ + skqp/src/main/assets/resources \ + skqp/src/main/libs \ + .gradle build viewer/build diff --git a/tools/skqp/make_universal_apk b/tools/skqp/make_universal_apk index 56b725380b..0ebe036ac1 100755 --- a/tools/skqp/make_universal_apk +++ b/tools/skqp/make_universal_apk @@ -25,6 +25,9 @@ Additionally, \`python\` and \`ninja\` should be in your path. If SKQP_EXTRA_MODELS is non-empty, assets unneeded by the CTS tests will be included for experimental mode. +It assumes that the source tree is in the desired state, e.g. by having +run 'python tools/git-sync-deps' in the root of the skia checkout. + EOM exit 1 } @@ -38,23 +41,18 @@ for ARCH in $*; do case $ARCH in arm|arm64|x86|x64);; *) usage;; esac; done set -x # Verbose set -e # Exit immediately -cd "$(dirname "$0")/../.." +# check if OUTPUT_DIR was set in the environment. +if [ -z "${APK_OUTPUT_DIR}" ]; then + APK_OUTPUT_DIR=out/skqp +fi -( - cd platform_tools/android/apps - git clean -fxd skqp/build \ - skqp/src/main/assets/gmkb \ - skqp/src/main/assets/resources \ - skqp/src/main/libs \ - .gradle build viewer/build -) +cd "$(dirname "$0")/../.." python tools/skqp/download_model if [ -z "$SKQP_EXTRA_MODELS" ]; then python tools/skqp/remove_unneeded_assets fi python tools/skqp/setup_resources -python tools/git-sync-deps APP=skqp LIB=libskqp_app.so @@ -66,11 +64,10 @@ if [ $# -eq 0 ]; then fi for ARCH in $*; do + BUILD="${APK_OUTPUT_DIR}-${ARCH}" if [ "$SKQP_DEBUG" ]; then - BUILD=out/skqp-${ARCH}-debug - python tools/skqp/generate_gn_args $BUILD "$ANDROID_NDK" --arch "$ARCH" --debug + python tools/skqp/generate_gn_args $BUILD-debug "$ANDROID_NDK" --arch "$ARCH" --debug else - BUILD=out/skqp-$ARCH python tools/skqp/generate_gn_args $BUILD "$ANDROID_NDK" --arch "$ARCH" fi bin/gn gen $BUILD @@ -92,6 +89,6 @@ done apps/gradlew -p apps/$APP -P suppressNativeBuild :$APP:assembleUniversalDebug ) -mkdir -p out/skqp -cp platform_tools/android/apps/$APP/build/outputs/apk/$APP-universal-debug.apk out/skqp/ +mkdir -p $APK_OUTPUT_DIR +cp platform_tools/android/apps/$APP/build/outputs/apk/$APP-universal-debug.apk "${APK_OUTPUT_DIR}/" -- cgit v1.2.3