Chromium Code Reviews| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 56 echo "Cannot find $script; why?" | 56 echo "Cannot find $script; why?" |
| 57 fi | 57 fi |
| 58 } | 58 } |
| 59 | 59 |
| 60 # Function to force-green a bot. | 60 # Function to force-green a bot. |
| 61 function bb_force_bot_green_and_exit { | 61 function bb_force_bot_green_and_exit { |
| 62 echo "@@@BUILD_STEP Bot forced green.@@@" | 62 echo "@@@BUILD_STEP Bot forced green.@@@" |
| 63 exit 0 | 63 exit 0 |
| 64 } | 64 } |
| 65 | 65 |
| 66 function bb_run_gclient_hooks { | |
| 67 echo "@@@BUILD_STEP runhooks android@@@" | |
| 68 gclient runhooks | |
| 69 } | |
| 70 | |
| 66 # Basic setup for all bots to run after a source tree checkout. | 71 # Basic setup for all bots to run after a source tree checkout. |
| 67 # Args: | 72 # Args: |
| 68 # $1: source root. | 73 # $1: source root. |
| 69 # $2 and beyond: key value pairs which are parsed by bb_parse_args. | 74 # $2 and beyond: key value pairs which are parsed by bb_parse_args. |
| 70 function bb_baseline_setup { | 75 function bb_baseline_setup { |
| 71 echo "@@@BUILD_STEP cd into source root@@@" | 76 echo "@@@BUILD_STEP cd into source root@@@" |
| 72 SRC_ROOT="$1" | 77 SRC_ROOT="$1" |
| 73 # Remove SRC_ROOT param | 78 # Remove SRC_ROOT param |
| 74 shift | 79 shift |
| 75 | 80 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 115 | 120 |
| 116 if [ "$NEED_CLOBBER" -eq 1 ]; then | 121 if [ "$NEED_CLOBBER" -eq 1 ]; then |
| 117 echo "@@@BUILD_STEP Clobber@@@" | 122 echo "@@@BUILD_STEP Clobber@@@" |
| 118 rm -rf "${SRC_ROOT}"/out | 123 rm -rf "${SRC_ROOT}"/out |
| 119 if [ -e "${SRC_ROOT}"/out ] ; then | 124 if [ -e "${SRC_ROOT}"/out ] ; then |
| 120 echo "Clobber appeared to fail? ${SRC_ROOT}/out still exists." | 125 echo "Clobber appeared to fail? ${SRC_ROOT}/out still exists." |
| 121 echo "@@@STEP_WARNINGS@@@" | 126 echo "@@@STEP_WARNINGS@@@" |
| 122 fi | 127 fi |
| 123 fi | 128 fi |
| 124 | 129 |
| 125 echo "@@@BUILD_STEP android_gyp@@@" | 130 # Should be called only after envsetup is done. |
|
Isaac (away)
2012/07/18 21:30:49
nit: do we really need a separate bash function /
John Grabowski
2012/07/18 21:42:25
Isaac; absolutely! Makes it easier for testing bb
nilesh
2012/07/18 21:48:07
Linux also has a separate step for this. This repl
| |
| 126 android_gyp | 131 bb_run_gclient_hooks |
| 127 } | 132 } |
| 128 | 133 |
| 129 | 134 |
| 130 # Setup goma. Used internally to buildbot_functions.sh. | 135 # Setup goma. Used internally to buildbot_functions.sh. |
| 131 function bb_setup_goma_internal { | 136 function bb_setup_goma_internal { |
| 132 | 137 |
| 133 # Quick bail if I messed things up and can't wait for the CQ to | 138 # Quick bail if I messed things up and can't wait for the CQ to |
| 134 # flush out. | 139 # flush out. |
| 135 # TODO(jrg): remove this condition when things are | 140 # TODO(jrg): remove this condition when things are |
| 136 # proven stable (4/1/12 or so). | 141 # proven stable (4/1/12 or so). |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 288 --factory-properties "$FACTORY_PROPERTIES" \ | 293 --factory-properties "$FACTORY_PROPERTIES" \ |
| 289 --build-properties "$BUILD_PROPERTIES" | 294 --build-properties "$BUILD_PROPERTIES" |
| 290 extract_exitcode=$? | 295 extract_exitcode=$? |
| 291 if (( $extract_exitcode > 1 )); then | 296 if (( $extract_exitcode > 1 )); then |
| 292 echo "@@@STEP_WARNINGS@@@" | 297 echo "@@@STEP_WARNINGS@@@" |
| 293 return | 298 return |
| 294 fi | 299 fi |
| 295 return $extract_exitcode | 300 return $extract_exitcode |
| 296 ) | 301 ) |
| 297 } | 302 } |
| OLD | NEW |