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 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
253 local extract_exit_code=$? | 253 local extract_exit_code=$? |
254 if (( $extract_exit_code > 1 )); then | 254 if (( $extract_exit_code > 1 )); then |
255 echo "@@@STEP_WARNINGS@@@" | 255 echo "@@@STEP_WARNINGS@@@" |
256 return | 256 return |
257 fi | 257 fi |
258 return $extract_exit_code | 258 return $extract_exit_code |
259 ) | 259 ) |
260 } | 260 } |
261 | 261 |
262 # Runs the license checker for the WebView build. | 262 # Runs the license checker for the WebView build. |
263 # License checker may return error code 1 meaning that | |
264 # there are non-fatal problems (warnings). Everything | |
265 # above 1 is considered to be a show-stopper. | |
263 function bb_check_webview_licenses { | 266 function bb_check_webview_licenses { |
264 echo "@@@BUILD_STEP Check licenses for WebView@@@" | 267 echo "@@@BUILD_STEP Check licenses for WebView@@@" |
265 ( | 268 ( |
266 set +e | 269 set +e |
267 cd "${SRC_ROOT}" | 270 cd "${SRC_ROOT}" |
268 python android_webview/tools/webview_licenses.py scan | 271 python android_webview/tools/webview_licenses.py scan |
269 if [[ $? -ne 0 ]]; then | 272 local licenses_exit_code=$? |
273 if [[ $licenses_exit_code -eq 1 ]]; then | |
270 echo "@@@STEP_WARNINGS@@@" | 274 echo "@@@STEP_WARNINGS@@@" |
275 return 0 | |
271 fi | 276 fi |
272 return 0 | 277 return $licenses_exit_code |
Isaac (away)
2013/02/07 12:08:47
This syntax will not work - the bot while halt if
mnaganov (inactive)
2013/02/07 13:48:52
Thanks for pointing this out, Isaac! I think I can
| |
273 ) | 278 ) |
274 } | 279 } |
275 | 280 |
276 # Retrieve a packed json property using python | 281 # Retrieve a packed json property using python |
277 function bb_get_json_prop { | 282 function bb_get_json_prop { |
278 local JSON="$1" | 283 local JSON="$1" |
279 local PROP="$2" | 284 local PROP="$2" |
280 | 285 |
281 python -c "import json; print json.loads('$JSON').get('$PROP', '')" | 286 python -c "import json; print json.loads('$JSON').get('$PROP', '')" |
282 } | 287 } |
OLD | NEW |