OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 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 # Bash functions used by buildbot annotator scripts for the android | 6 # Bash functions used by buildbot annotator scripts for the android |
7 # build of chromium. Executing this script should not perform actions | 7 # build of chromium. Executing this script should not perform actions |
8 # other than setting variables and defining of functions. | 8 # other than setting variables and defining of functions. |
9 | 9 |
10 # Number of jobs on the compile line; e.g. make -j"${JOBS}" | 10 # Number of jobs on the compile line; e.g. make -j"${JOBS}" |
11 JOBS="${JOBS:-4}" | 11 JOBS="${JOBS:-4}" |
12 | 12 |
13 # Clobber build? Overridden by bots with BUILDBOT_CLOBBER. | 13 # Clobber build? Overridden by bots with BUILDBOT_CLOBBER. |
14 NEED_CLOBBER="${NEED_CLOBBER:-0}" | 14 NEED_CLOBBER="${NEED_CLOBBER:-0}" |
15 | 15 |
16 # Setup environment for Android build. | 16 # Setup environment for Android build. |
17 # Called from bb_baseline_setup. | 17 # Called from bb_baseline_setup. |
18 # Moved to top of file so it is easier to find. | 18 # Moved to top of file so it is easier to find. |
19 function bb_setup_environment { | 19 function bb_setup_environment { |
20 export ANDROID_SDK_ROOT=/usr/local/google/android-sdk-linux | 20 export ANDROID_SDK_ROOT=/usr/local/google/android-sdk-linux |
21 export ANDROID_NDK_ROOT=/usr/local/google/android-ndk-r7 | 21 export ANDROID_NDK_ROOT=/usr/local/google/android-ndk-r7 |
22 } | 22 } |
23 | 23 |
24 # Install the build deps by running | 24 # Install the build deps by running |
25 # build/install-build-deps-android.sh. This may update local tools. | 25 # build/install-build-deps-android-sdk.sh. This may update local tools. |
26 # $1: source root. | 26 # $1: source root. |
27 function bb_install_build_deps { | 27 function bb_install_build_deps { |
28 echo "@@@BUILD_STEP install build deps android@@@" | 28 echo "@@@BUILD_STEP install build deps android@@@" |
29 local script="$1/build/install-build-deps-android.sh" | 29 local script="$1/build/install-build-deps-android-sdk.sh" |
30 if [[ -f "$script" ]]; then | 30 if [[ -f "$script" ]]; then |
31 "$script" | 31 "$script" |
32 else | 32 else |
33 echo "Cannot find $script; why?" | 33 echo "Cannot find $script; why?" |
34 fi | 34 fi |
35 } | 35 } |
36 | 36 |
37 # Function to force-green a bot. | 37 # Function to force-green a bot. |
38 function bb_force_bot_green_and_exit { | 38 function bb_force_bot_green_and_exit { |
39 echo "@@@BUILD_STEP Bot forced green.@@@" | 39 echo "@@@BUILD_STEP Bot forced green.@@@" |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 function bb_run_tests_emulator { | 208 function bb_run_tests_emulator { |
209 echo "@@@BUILD_STEP Run Tests on an Emulator@@@" | 209 echo "@@@BUILD_STEP Run Tests on an Emulator@@@" |
210 build/android/run_tests.py -e --xvfb --verbose | 210 build/android/run_tests.py -e --xvfb --verbose |
211 } | 211 } |
212 | 212 |
213 # Run tests on an actual device. (Better have one plugged in!) | 213 # Run tests on an actual device. (Better have one plugged in!) |
214 function bb_run_tests { | 214 function bb_run_tests { |
215 echo "@@@BUILD_STEP Run Tests on actual hardware@@@" | 215 echo "@@@BUILD_STEP Run Tests on actual hardware@@@" |
216 build/android/run_tests.py --xvfb --verbose | 216 build/android/run_tests.py --xvfb --verbose |
217 } | 217 } |
OLD | NEW |