Chromium Code Reviews| 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 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 203 python build/android/adb_logcat_printer.py "$LOGCAT_DUMP_DIR" | 203 python build/android/adb_logcat_printer.py "$LOGCAT_DUMP_DIR" |
| 204 } | 204 } |
| 205 | 205 |
| 206 # Run tests on an actual device. (Better have one plugged in!) | 206 # Run tests on an actual device. (Better have one plugged in!) |
| 207 function bb_run_unit_tests { | 207 function bb_run_unit_tests { |
| 208 build/android/run_tests.py --xvfb --verbose | 208 build/android/run_tests.py --xvfb --verbose |
| 209 } | 209 } |
| 210 | 210 |
| 211 # Run experimental unittest bundles. | 211 # Run experimental unittest bundles. |
| 212 function bb_run_experimental_unit_tests { | 212 function bb_run_experimental_unit_tests { |
| 213 # This build step was added because bash does not allow empty functions. | 213 build/android/run_tests.py --xvfb --verbose -s android_webview_unittests |
|
joth
2012/11/02 11:06:07
I'll let cmp comment on this one, but I'd be sligh
mkosiba (inactive)
2012/11/02 15:59:39
Done.
| |
| 214 # run_tests.py echoes a build step, comment/remove this build step when you | |
| 215 # add tests to the experimental step. | |
| 216 echo '@@@BUILD_STEP experimental_unit_tests@@@' | |
| 217 | |
| 218 } | 214 } |
| 219 | 215 |
| 220 # Run a buildbot step and handle failure. | 216 # Run a buildbot step and handle failure. |
| 221 function bb_run_step { | 217 function bb_run_step { |
| 222 ( | 218 ( |
| 223 set +e | 219 set +e |
| 224 "$@" | 220 "$@" |
| 225 if [[ $? != 0 ]]; then | 221 if [[ $? != 0 ]]; then |
| 226 echo "@@@STEP_FAILURE@@@" | 222 echo "@@@STEP_FAILURE@@@" |
| 227 fi | 223 fi |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 324 ) | 320 ) |
| 325 } | 321 } |
| 326 | 322 |
| 327 # Retrieve a packed json property using python | 323 # Retrieve a packed json property using python |
| 328 function bb_get_json_prop { | 324 function bb_get_json_prop { |
| 329 local JSON="$1" | 325 local JSON="$1" |
| 330 local PROP="$2" | 326 local PROP="$2" |
| 331 | 327 |
| 332 python -c "import json; print json.loads('$JSON').get('$PROP', '')" | 328 python -c "import json; print json.loads('$JSON').get('$PROP', '')" |
| 333 } | 329 } |
| OLD | NEW |