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

Side by Side Diff: build/android/buildbot_functions.sh

Issue 10694048: Refactor and rename install-build-deps-android-sdk (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rewrote script in python Created 8 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | build/android/buildbot_fyi.sh » ('j') | build/android/envsetup.sh » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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}"
(...skipping 25 matching lines...) Expand all
36 36
37 37
38 # Setup environment for Android build. 38 # Setup environment for Android build.
39 # Called from bb_baseline_setup. 39 # Called from bb_baseline_setup.
40 # Moved to top of file so it is easier to find. 40 # Moved to top of file so it is easier to find.
41 function bb_setup_environment { 41 function bb_setup_environment {
42 export ANDROID_SDK_ROOT=/usr/local/google/android-sdk-linux 42 export ANDROID_SDK_ROOT=/usr/local/google/android-sdk-linux
43 export ANDROID_NDK_ROOT=/usr/local/google/android-ndk-r7 43 export ANDROID_NDK_ROOT=/usr/local/google/android-ndk-r7
44 } 44 }
45 45
46 # Install the build deps by running
47 # build/install-build-deps-android-sdk.sh. This may update local tools.
48 # $1: source root.
49 function bb_install_build_deps {
50 echo "@@@BUILD_STEP install build deps android@@@"
51 local script="$1/build/install-build-deps-android-sdk.sh"
52 if [[ -f "$script" ]]; then
53 "$script"
54 else
55 echo "@@@STEP_WARNINGS@@@"
56 echo "Cannot find $script; why?"
57 fi
58 }
59
60 # Function to force-green a bot. 46 # Function to force-green a bot.
61 function bb_force_bot_green_and_exit { 47 function bb_force_bot_green_and_exit {
62 echo "@@@BUILD_STEP Bot forced green.@@@" 48 echo "@@@BUILD_STEP Bot forced green.@@@"
63 exit 0 49 exit 0
64 } 50 }
65 51
66 # Basic setup for all bots to run after a source tree checkout. 52 # Basic setup for all bots to run after a source tree checkout.
67 # Args: 53 # Args:
68 # $1: source root. 54 # $1: source root.
69 # $2 and beyond: key value pairs which are parsed by bb_parse_args. 55 # $2 and beyond: key value pairs which are parsed by bb_parse_args.
(...skipping 28 matching lines...) Expand all
98 echo "Build cannot continue." 84 echo "Build cannot continue."
99 echo "@@@STEP_FAILURE@@@" 85 echo "@@@STEP_FAILURE@@@"
100 return 1 86 return 1
101 fi 87 fi
102 done 88 done
103 89
104 if [ ! "$BUILDBOT_CLOBBER" = "" ]; then 90 if [ ! "$BUILDBOT_CLOBBER" = "" ]; then
105 NEED_CLOBBER=1 91 NEED_CLOBBER=1
106 fi 92 fi
107 93
108 # Setting up a new bot? Must do this before envsetup.sh 94 # Install sdk and ndk if necessary
109 if [ ! -d "${ANDROID_NDK_ROOT}" ] ; then 95 "$SRC_ROOT/build/install_android_sdk_ndk.py" --versioned
John Grabowski 2012/07/17 18:38:15 Don't like removal of directory check. Prefer to a
Isaac (away) 2012/07/18 09:45:05 Script is a no-op for install NDK if directory exi
110 bb_install_build_deps $SRC_ROOT
111 fi
112 96
113 echo "@@@BUILD_STEP Configure with envsetup.sh@@@" 97 echo "@@@BUILD_STEP Configure with envsetup.sh@@@"
114 . build/android/envsetup.sh 98 . build/android/envsetup.sh
115 99
116 if [ "$NEED_CLOBBER" -eq 1 ]; then 100 if [ "$NEED_CLOBBER" -eq 1 ]; then
117 echo "@@@BUILD_STEP Clobber@@@" 101 echo "@@@BUILD_STEP Clobber@@@"
118 rm -rf "${SRC_ROOT}"/out 102 rm -rf "${SRC_ROOT}"/out
119 if [ -e "${SRC_ROOT}"/out ] ; then 103 if [ -e "${SRC_ROOT}"/out ] ; then
120 echo "Clobber appeared to fail? ${SRC_ROOT}/out still exists." 104 echo "Clobber appeared to fail? ${SRC_ROOT}/out still exists."
121 echo "@@@STEP_WARNINGS@@@" 105 echo "@@@STEP_WARNINGS@@@"
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 --factory-properties "$FACTORY_PROPERTIES" \ 265 --factory-properties "$FACTORY_PROPERTIES" \
282 --build-properties "$BUILD_PROPERTIES" 266 --build-properties "$BUILD_PROPERTIES"
283 extract_exitcode=$? 267 extract_exitcode=$?
284 if (( $extract_exitcode > 1 )); then 268 if (( $extract_exitcode > 1 )); then
285 echo "@@@STEP_WARNINGS@@@" 269 echo "@@@STEP_WARNINGS@@@"
286 return 270 return
287 fi 271 fi
288 return $extract_exitcode 272 return $extract_exitcode
289 ) 273 )
290 } 274 }
OLDNEW
« no previous file with comments | « no previous file | build/android/buildbot_fyi.sh » ('j') | build/android/envsetup.sh » ('J')

Powered by Google App Engine
This is Rietveld 408576698