| 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 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 # When extract_build.py downloads an unversioned build it | 272 # When extract_build.py downloads an unversioned build it |
| 273 # issues a warning by exiting with large numbered return code | 273 # issues a warning by exiting with large numbered return code |
| 274 # When it fails to download it build, it exits with return | 274 # When it fails to download it build, it exits with return |
| 275 # code 1. We disable halt on error mode and return normally | 275 # code 1. We disable halt on error mode and return normally |
| 276 # unless the python tool returns 1. | 276 # unless the python tool returns 1. |
| 277 ( | 277 ( |
| 278 set +e | 278 set +e |
| 279 python ../../../../scripts/slave/extract_build.py \ | 279 python ../../../../scripts/slave/extract_build.py \ |
| 280 --build-dir "$SRC_ROOT" \ | 280 --build-dir "$SRC_ROOT" \ |
| 281 --build-output-dir "out" \ | 281 --build-output-dir "out" \ |
| 282 --target Release \ | 282 --target Debug \ |
| 283 --factory-properties "$FACTORY_PROPERTIES" \ | 283 --factory-properties "$FACTORY_PROPERTIES" \ |
| 284 --build-properties "$BUILD_PROPERTIES" | 284 --build-properties "$BUILD_PROPERTIES" |
| 285 extract_exitcode=$? | 285 extract_exitcode=$? |
| 286 if (( $extract_exitcode > 1 )); then | 286 if (( $extract_exitcode > 1 )); then |
| 287 echo "@@@STEP_WARNINGS@@@" | 287 echo "@@@STEP_WARNINGS@@@" |
| 288 return | 288 return |
| 289 fi | 289 fi |
| 290 return $extract_exitcode | 290 return $extract_exitcode |
| 291 ) | 291 ) |
| 292 } | 292 } |
| 293 | 293 |
| 294 # Reboot all phones and wait for them to start back up | 294 # Reboot all phones and wait for them to start back up |
| 295 # Does not break build if a phone fails to restart | 295 # Does not break build if a phone fails to restart |
| 296 function bb_reboot_phones { | 296 function bb_reboot_phones { |
| 297 echo "@@@BUILD_STEP Rebooting phones@@@" | 297 echo "@@@BUILD_STEP Rebooting phones@@@" |
| 298 ( | 298 ( |
| 299 set +e | 299 set +e |
| 300 cd $CHROME_SRC/build/android/pylib; | 300 cd $CHROME_SRC/build/android/pylib; |
| 301 for DEVICE in $(adb_get_devices); do | 301 for DEVICE in $(adb_get_devices); do |
| 302 python -c "import android_commands;\ | 302 python -c "import android_commands;\ |
| 303 android_commands.AndroidCommands(device='$DEVICE').Reboot(True)" & | 303 android_commands.AndroidCommands(device='$DEVICE').Reboot(True)" & |
| 304 done | 304 done |
| 305 wait | 305 wait |
| 306 ) | 306 ) |
| 307 } | 307 } |
| OLD | NEW |