| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 SRC_ROOT="$1" | 42 SRC_ROOT="$1" |
| 43 # Remove SRC_ROOT param | 43 # Remove SRC_ROOT param |
| 44 shift | 44 shift |
| 45 cd $SRC_ROOT | 45 cd $SRC_ROOT |
| 46 | 46 |
| 47 echo "@@@BUILD_STEP Environment setup@@@" | 47 echo "@@@BUILD_STEP Environment setup@@@" |
| 48 bb_parse_args "$@" | 48 bb_parse_args "$@" |
| 49 | 49 |
| 50 export GYP_GENERATORS=ninja | 50 export GYP_GENERATORS=ninja |
| 51 export GOMA_DIR=/b/build/goma | 51 export GOMA_DIR=/b/build/goma |
| 52 . build/android/envsetup.sh | 52 . build/android/envsetup.sh "" |
| 53 | 53 |
| 54 local extra_gyp_defines="$(bb_get_json_prop "$FACTORY_PROPERTIES" \ | 54 local extra_gyp_defines="$(bb_get_json_prop "$SLAVE_PROPERTIES" \ |
| 55 extra_gyp_defines) $(bb_get_json_prop "$SLAVE_PROPERTIES" \ | |
| 56 extra_gyp_defines)" | 55 extra_gyp_defines)" |
| 57 export GYP_DEFINES+=" fastbuild=1 $extra_gyp_defines" | 56 export GYP_DEFINES+=" fastbuild=1 $extra_gyp_defines" |
| 58 if echo $extra_gyp_defines | grep -qE 'clang|asan'; then | 57 if echo $extra_gyp_defines | grep -qE 'clang|asan'; then |
| 59 unset CXX_target | 58 unset CXX_target |
| 60 fi | 59 fi |
| 61 | 60 |
| 62 local build_path="${SRC_ROOT}/out/${BUILDTYPE}" | 61 local build_path="${SRC_ROOT}/out/${BUILDTYPE}" |
| 63 local landmines_triggered_path="$build_path/.landmines_triggered" | 62 local landmines_triggered_path="$build_path/.landmines_triggered" |
| 64 python "$SRC_ROOT/build/landmines.py" | 63 python "$SRC_ROOT/build/landmines.py" |
| 65 | 64 |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 ) | 220 ) |
| 222 } | 221 } |
| 223 | 222 |
| 224 # Retrieve a packed json property using python | 223 # Retrieve a packed json property using python |
| 225 function bb_get_json_prop { | 224 function bb_get_json_prop { |
| 226 local JSON="$1" | 225 local JSON="$1" |
| 227 local PROP="$2" | 226 local PROP="$2" |
| 228 | 227 |
| 229 python -c "import json; print json.loads('$JSON').get('$PROP', '')" | 228 python -c "import json; print json.loads('$JSON').get('$PROP', '')" |
| 230 } | 229 } |
| OLD | NEW |