OLD | NEW |
(Empty) | |
| 1 #!/bin/bash |
| 2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. |
| 5 # |
| 6 # "compile and run tests" script for the android build of chromium. |
| 7 # Intended for use by buildbot. |
| 8 # At this time, we only have one bot which is both a builder and |
| 9 # tester. Script assumes it runs in the "build" directory. |
| 10 # |
| 11 # This script uses buildbot "Annotator" style for steps. |
| 12 # This script does not sync the source tree. |
| 13 |
| 14 set -e |
| 15 set -x |
| 16 |
| 17 NEED_CLOBBER=0 |
| 18 |
| 19 echo "@@@BUILD_STEP cd into source root@@@" |
| 20 SRC_ROOT=$(cd "$(dirname $0)/../.."; pwd) |
| 21 cd $SRC_ROOT |
| 22 |
| 23 echo "@@@BUILD_STEP Basic setup@@@" |
| 24 export ANDROID_SDK_ROOT=/usr/local/google/android-sdk-linux_x86 |
| 25 export ANDROID_NDK_ROOT=/usr/local/google/android-ndk-r7 |
| 26 for mandatory_directory in "${ANDROID_SDK_ROOT}" "${ANDROID_NDK_ROOT}" ; do |
| 27 if [[ ! -d "${mandatory_directory}" ]]; then |
| 28 echo "Directory ${mandatory_directory} does not exist." |
| 29 echo "Build cannot continue." |
| 30 exit 1 |
| 31 fi |
| 32 done |
| 33 |
| 34 if [ ! -n "$BUILDBOT_CLOBBER" ]; then |
| 35 NEED_CLOBBER=1 |
| 36 fi |
| 37 |
| 38 ## Build and test steps |
| 39 |
| 40 echo "@@@BUILD_STEP Configure with envsetup.sh@@@" |
| 41 . build/android/envsetup.sh |
| 42 |
| 43 if [ "$NEED_CLOBBER" -eq 1 ]; then |
| 44 echo "@@@BUILD_STEP Clobber@@@" |
| 45 rm -rf "${SRC_ROOT}"/out |
| 46 fi |
| 47 |
| 48 echo "@@@BUILD_STEP android_gyp@@@" |
| 49 android_gyp |
| 50 |
| 51 echo "@@@BUILD_STEP Compile@@@" |
| 52 make -j4 |
| 53 |
| 54 echo "@@@BUILD_STEP Run Tests@@@" |
| 55 build/android/run_tests.py -e --xvfb |
| 56 |
| 57 exit 0 |
OLD | NEW |