Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(645)

Unified Diff: third_party/go/src/golang.org/x/mobile/build/androidtest.bash

Issue 1275153002: Remove third_party/golang.org/x/mobile as it is no longer used with Go 1.5. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Remove golang.org/x/mobile Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/go/src/golang.org/x/mobile/build/androidtest.bash
diff --git a/third_party/go/src/golang.org/x/mobile/build/androidtest.bash b/third_party/go/src/golang.org/x/mobile/build/androidtest.bash
deleted file mode 100755
index 5a80a21593f425a4c291e27305ce679afdc16827..0000000000000000000000000000000000000000
--- a/third_party/go/src/golang.org/x/mobile/build/androidtest.bash
+++ /dev/null
@@ -1,90 +0,0 @@
-#!/usr/bin/env bash
-
-# Copyright 2014 The Go Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style
-# license that can be found in the LICENSE file.
-
-# For testing Android. Run from a repository root.
-# build/androidtest.bash
-# The compiler runs locally, pushes the copy of the repository
-# to a target device using adb, and runs tests in the device
-# using adb shell commands.
-
-set -e
-ulimit -c 0 # no core files
-
-function die() {
- echo "FAIL: $1"
- exit 1
-}
-
-if [ -z "${GOPATH}" ]; then
- die 'GOPATH must be set.'
-fi
-
-readonly CURDIR=`pwd`
-if [ ! -f AUTHORS ]; then
- die 'androidtest.bash must be run from the repository root.'
-fi
-
-function pkg() {
- local paths=(${GOPATH//:/ })
- for e in "${paths[@]}"; do
- e="${e%/}"
- local relpath="${CURDIR#"${e}/src/"}"
- if [ "${relpath}" != "${CURDIR}" ]; then
- echo "${relpath}"
- break
- fi
- done
-}
-
-export PKG="$(pkg)"
-if [ -z "${PKG}" ]; then
- die 'androidtest.bash failed to determine the repository package name.'
-fi
-
-export DEVICEDIR=/data/local/tmp/androidtest-$$
-export TMPDIR=`mktemp -d /tmp/androidtest.XXXXX`
-
-function cleanup() {
- echo '# Cleaning up...'
- rm -rf "$TMPDIR"
- adb shell rm -rf "${DEVICEDIR}"
-}
-trap cleanup EXIT
-
-# 'adb sync' syncs data in ANDROID_PRODUCT_OUT directory.
-# We copy the entire golang.org/x/mobile/... (with -p option to preserve
-# file properties) to the directory assuming tests may depend only
-# on data in the same subrepository.
-echo '# Syncing test files to android device'
-export ANDROID_PRODUCT_OUT="${TMPDIR}/androidtest-$$"
-readonly LOCALDIR="${ANDROID_PRODUCT_OUT}/${DEVICEDIR}"
-
-mkdir -p "${LOCALDIR}/${PKG}"
-echo "cp -R --preserve=all ./* ${LOCALDIR}/${PKG}/"
-cp -R --preserve=all ./* "${LOCALDIR}/${PKG}/"
-
-time adb sync data &> /dev/null
-echo ''
-
-echo '# Run tests on android (arm7)'
-# Build go_android_${GOARCH}_exec that will be invoked for
-# GOOS=android GOARCH=$GOARCH go test/run.
-mkdir -p "${TMPDIR}/bin"
-export PATH=${TMPDIR}/bin:${PATH}
-GOOS="${GOHOSTOS}" GOARCH="${GOHOSTARCH}" go build \
- -o "${TMPDIR}/bin/go_android_arm_exec" \
- "${GOPATH}/src/golang.org/x/mobile/build/go_android_exec.go"
-CGO_ENABLED=1 GOOS=android GOARCH=arm GOARM=7 \
- go test ./...
-
-# Special tests for mobile subrepository.
-if [ "$PKG" = "golang.org/x/mobile" ]; then
- echo '# Run mobile=repository specific android tests.'
-
- cd "${CURDIR}/bind/java"; ./test.bash
-fi
-
-exit 0

Powered by Google App Engine
This is Rietveld 408576698