| 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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 ) | 292 ) |
| 293 } | 293 } |
| 294 | 294 |
| 295 # Runs the license checker for the WebView build. | 295 # Runs the license checker for the WebView build. |
| 296 function bb_check_webview_licenses { | 296 function bb_check_webview_licenses { |
| 297 echo "@@@BUILD_STEP Check licenses for WebView@@@" | 297 echo "@@@BUILD_STEP Check licenses for WebView@@@" |
| 298 ( | 298 ( |
| 299 set +e | 299 set +e |
| 300 cd "${SRC_ROOT}" | 300 cd "${SRC_ROOT}" |
| 301 python android_webview/tools/webview_licenses.py scan | 301 python android_webview/tools/webview_licenses.py scan |
| 302 local license_exit_code=$? | 302 if [[ $? -ne 0 ]]; then |
| 303 if [[ license_exit_code -ne 0 ]]; then | |
| 304 echo "@@@STEP_FAILURE@@@" | 303 echo "@@@STEP_FAILURE@@@" |
| 305 fi | 304 fi |
| 306 return $license_exit_code | 305 return 0 |
| 307 ) | 306 ) |
| 308 } | 307 } |
| 309 | 308 |
| 310 # Retrieve a packed json property using python | 309 # Retrieve a packed json property using python |
| 311 function bb_get_json_prop { | 310 function bb_get_json_prop { |
| 312 local JSON="$1" | 311 local JSON="$1" |
| 313 local PROP="$2" | 312 local PROP="$2" |
| 314 | 313 |
| 315 python -c "import json; print json.loads('$JSON').get('$PROP', '')" | 314 python -c "import json; print json.loads('$JSON').get('$PROP', '')" |
| 316 } | 315 } |
| OLD | NEW |