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 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 fi | 266 fi |
267 | 267 |
268 # When extract_build.py downloads an unversioned build it | 268 # When extract_build.py downloads an unversioned build it |
269 # issues a warning by exiting with large numbered return code | 269 # issues a warning by exiting with large numbered return code |
270 # When it fails to download it build, it exits with return | 270 # When it fails to download it build, it exits with return |
271 # code 1. We disable halt on error mode and return normally | 271 # code 1. We disable halt on error mode and return normally |
272 # unless the python tool returns 1. | 272 # unless the python tool returns 1. |
273 ( | 273 ( |
274 set +e | 274 set +e |
275 python ../../../../scripts/slave/extract_build.py \ | 275 python ../../../../scripts/slave/extract_build.py \ |
276 --build-dir "$SRC_ROOT" \ | 276 --build-dir "$SRC_ROOT/build" \ |
277 --build-output-dir "out" \ | 277 --build-output-dir "../out" \ |
278 --factory-properties "$FACTORY_PROPERTIES" \ | 278 --factory-properties "$FACTORY_PROPERTIES" \ |
279 --build-properties "$BUILD_PROPERTIES" | 279 --build-properties "$BUILD_PROPERTIES" |
280 local extract_exit_code=$? | 280 local extract_exit_code=$? |
281 if (( $extract_exit_code > 1 )); then | 281 if (( $extract_exit_code > 1 )); then |
282 echo "@@@STEP_WARNINGS@@@" | 282 echo "@@@STEP_WARNINGS@@@" |
283 return | 283 return |
284 fi | 284 fi |
285 return $extract_exit_code | 285 return $extract_exit_code |
286 ) | 286 ) |
287 } | 287 } |
(...skipping 27 matching lines...) Expand all Loading... |
315 ) | 315 ) |
316 } | 316 } |
317 | 317 |
318 # Retrieve a packed json property using python | 318 # Retrieve a packed json property using python |
319 function bb_get_json_prop { | 319 function bb_get_json_prop { |
320 local JSON="$1" | 320 local JSON="$1" |
321 local PROP="$2" | 321 local PROP="$2" |
322 | 322 |
323 python -c "import json; print json.loads('$JSON').get('$PROP', '')" | 323 python -c "import json; print json.loads('$JSON').get('$PROP', '')" |
324 } | 324 } |
OLD | NEW |