| 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 | 91 |
| 92 # Setup goma. Used internally to buildbot_functions.sh. | 92 # Setup goma. Used internally to buildbot_functions.sh. |
| 93 function bb_setup_goma_internal { | 93 function bb_setup_goma_internal { |
| 94 export GOMA_DIR=/b/build/goma | 94 export GOMA_DIR=/b/build/goma |
| 95 export GOMA_API_KEY_FILE=${GOMA_DIR}/goma.key | 95 export GOMA_API_KEY_FILE=${GOMA_DIR}/goma.key |
| 96 export GOMA_COMPILER_PROXY_DAEMON_MODE=true | 96 export GOMA_COMPILER_PROXY_DAEMON_MODE=true |
| 97 export GOMA_COMPILER_PROXY_RPC_TIMEOUT_SECS=300 | 97 export GOMA_COMPILER_PROXY_RPC_TIMEOUT_SECS=300 |
| 98 | 98 |
| 99 echo "Killing old goma processes" | 99 echo "Killing old goma processes" |
| 100 ${GOMA_DIR}/goma_ctl.sh stop || true | 100 ${GOMA_DIR}/goma_ctl.sh stop || true |
| 101 killall compiler_proxy || true | 101 killall -9 compiler_proxy || true |
| 102 | 102 |
| 103 echo "Starting goma" | 103 echo "Starting goma" |
| 104 ${GOMA_DIR}/goma_ctl.sh start | 104 ${GOMA_DIR}/goma_ctl.sh start |
| 105 trap bb_stop_goma_internal SIGHUP SIGINT SIGTERM | 105 trap bb_stop_goma_internal SIGHUP SIGINT SIGTERM |
| 106 } | 106 } |
| 107 | 107 |
| 108 # Stop goma. | 108 # Stop goma. |
| 109 function bb_stop_goma_internal { | 109 function bb_stop_goma_internal { |
| 110 echo "Stopping goma" | 110 echo "Stopping goma" |
| 111 ${GOMA_DIR}/goma_ctl.sh stop | 111 ${GOMA_DIR}/goma_ctl.sh stop |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 ) | 302 ) |
| 303 } | 303 } |
| 304 | 304 |
| 305 # Retrieve a packed json property using python | 305 # Retrieve a packed json property using python |
| 306 function bb_get_json_prop { | 306 function bb_get_json_prop { |
| 307 local JSON="$1" | 307 local JSON="$1" |
| 308 local PROP="$2" | 308 local PROP="$2" |
| 309 | 309 |
| 310 python -c "import json; print json.loads('$JSON').get('$PROP')" | 310 python -c "import json; print json.loads('$JSON').get('$PROP')" |
| 311 } | 311 } |
| OLD | NEW |