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