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}" |
(...skipping 16 matching lines...) Expand all Loading... |
27 ;; | 27 ;; |
28 *) | 28 *) |
29 echo "@@@STEP_WARNINGS@@@" | 29 echo "@@@STEP_WARNINGS@@@" |
30 echo "Warning, unparsed input argument: '$1'" | 30 echo "Warning, unparsed input argument: '$1'" |
31 ;; | 31 ;; |
32 esac | 32 esac |
33 shift | 33 shift |
34 done | 34 done |
35 } | 35 } |
36 | 36 |
37 | |
38 # Setup environment for Android build. Do not set ANDROID_SDK_ROOT so that | |
39 # default version from $ROOT/src/third_party/android_tools/ | |
40 # Called from bb_baseline_setup. | |
41 # Moved to top of file so it is easier to find. | |
42 function bb_setup_environment { | |
43 export ANDROID_NDK_ROOT=/usr/local/google/android-ndk-r7 | |
44 } | |
45 | |
46 # Function to force-green a bot. | 37 # Function to force-green a bot. |
47 function bb_force_bot_green_and_exit { | 38 function bb_force_bot_green_and_exit { |
48 echo "@@@BUILD_STEP Bot forced green.@@@" | 39 echo "@@@BUILD_STEP Bot forced green.@@@" |
49 exit 0 | 40 exit 0 |
50 } | 41 } |
51 | 42 |
52 function bb_run_gclient_hooks { | 43 function bb_run_gclient_hooks { |
53 echo "@@@BUILD_STEP runhooks android@@@" | 44 echo "@@@BUILD_STEP runhooks android@@@" |
54 gclient runhooks | 45 gclient runhooks |
55 } | 46 } |
(...skipping 16 matching lines...) Expand all Loading... |
72 return 1 | 63 return 1 |
73 fi | 64 fi |
74 cd $SRC_ROOT | 65 cd $SRC_ROOT |
75 | 66 |
76 if [ ! -f build/android/envsetup.sh ] ; then | 67 if [ ! -f build/android/envsetup.sh ] ; then |
77 echo "No envsetup.sh" | 68 echo "No envsetup.sh" |
78 echo "@@@STEP_FAILURE@@@" | 69 echo "@@@STEP_FAILURE@@@" |
79 return 1 | 70 return 1 |
80 fi | 71 fi |
81 | 72 |
82 bb_setup_environment | |
83 | |
84 for mandatory_directory in $(dirname "${ANDROID_SDK_ROOT}") \ | 73 for mandatory_directory in $(dirname "${ANDROID_SDK_ROOT}") \ |
85 $(dirname "${ANDROID_NDK_ROOT}") ; do | 74 $(dirname "${ANDROID_NDK_ROOT}") ; do |
86 if [[ ! -d "${mandatory_directory}" ]]; then | 75 if [[ ! -d "${mandatory_directory}" ]]; then |
87 echo "Directory ${mandatory_directory} does not exist." | 76 echo "Directory ${mandatory_directory} does not exist." |
88 echo "Build cannot continue." | 77 echo "Build cannot continue." |
89 echo "@@@STEP_FAILURE@@@" | 78 echo "@@@STEP_FAILURE@@@" |
90 return 1 | 79 return 1 |
91 fi | 80 fi |
92 done | 81 done |
93 | 82 |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 --factory-properties "$FACTORY_PROPERTIES" \ | 283 --factory-properties "$FACTORY_PROPERTIES" \ |
295 --build-properties "$BUILD_PROPERTIES" | 284 --build-properties "$BUILD_PROPERTIES" |
296 extract_exitcode=$? | 285 extract_exitcode=$? |
297 if (( $extract_exitcode > 1 )); then | 286 if (( $extract_exitcode > 1 )); then |
298 echo "@@@STEP_WARNINGS@@@" | 287 echo "@@@STEP_WARNINGS@@@" |
299 return | 288 return |
300 fi | 289 fi |
301 return $extract_exitcode | 290 return $extract_exitcode |
302 ) | 291 ) |
303 } | 292 } |
OLD | NEW |