| 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 rm -rf "${SRC_ROOT}"/out | 76 rm -rf "${SRC_ROOT}"/out |
| 77 if [ -e "${SRC_ROOT}"/out ] ; then | 77 if [ -e "${SRC_ROOT}"/out ] ; then |
| 78 echo "Clobber appeared to fail? ${SRC_ROOT}/out still exists." | 78 echo "Clobber appeared to fail? ${SRC_ROOT}/out still exists." |
| 79 echo "@@@STEP_WARNINGS@@@" | 79 echo "@@@STEP_WARNINGS@@@" |
| 80 fi | 80 fi |
| 81 fi | 81 fi |
| 82 | 82 |
| 83 bb_setup_goma_internal | 83 bb_setup_goma_internal |
| 84 . build/android/envsetup.sh | 84 . build/android/envsetup.sh |
| 85 export GYP_DEFINES+=" fastbuild=1" | 85 export GYP_DEFINES+=" fastbuild=1" |
| 86 | 86 export GYP_DEFINES+=" $(bb_get_json_prop "$FACTORY_PROPERTIES" \ |
| 87 extra_gyp_defines)" |
| 87 # Should be called only after envsetup is done. | 88 # Should be called only after envsetup is done. |
| 88 bb_run_gclient_hooks | 89 bb_run_gclient_hooks |
| 89 } | 90 } |
| 90 | 91 |
| 91 | 92 |
| 92 # Setup goma. Used internally to buildbot_functions.sh. | 93 # Setup goma. Used internally to buildbot_functions.sh. |
| 93 function bb_setup_goma_internal { | 94 function bb_setup_goma_internal { |
| 94 export GOMA_DIR=/b/build/goma | 95 export GOMA_DIR=/b/build/goma |
| 95 export GOMA_API_KEY_FILE=${GOMA_DIR}/goma.key | 96 export GOMA_API_KEY_FILE=${GOMA_DIR}/goma.key |
| 96 export GOMA_COMPILER_PROXY_DAEMON_MODE=true | 97 export GOMA_COMPILER_PROXY_DAEMON_MODE=true |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 fi | 305 fi |
| 305 return $license_exit_code | 306 return $license_exit_code |
| 306 ) | 307 ) |
| 307 } | 308 } |
| 308 | 309 |
| 309 # Retrieve a packed json property using python | 310 # Retrieve a packed json property using python |
| 310 function bb_get_json_prop { | 311 function bb_get_json_prop { |
| 311 local JSON="$1" | 312 local JSON="$1" |
| 312 local PROP="$2" | 313 local PROP="$2" |
| 313 | 314 |
| 314 python -c "import json; print json.loads('$JSON').get('$PROP')" | 315 python -c "import json; print json.loads('$JSON').get('$PROP', '')" |
| 315 } | 316 } |
| OLD | NEW |