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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 | 192 |
193 # Run tests on an emulator. | 193 # Run tests on an emulator. |
194 function bb_run_tests_emulator { | 194 function bb_run_tests_emulator { |
195 echo "@@@BUILD_STEP Run Tests on an Emulator@@@" | 195 echo "@@@BUILD_STEP Run Tests on an Emulator@@@" |
196 build/android/run_tests.py -e --xvfb --verbose | 196 build/android/run_tests.py -e --xvfb --verbose |
197 } | 197 } |
198 | 198 |
199 # Run tests on an actual device. (Better have one plugged in!) | 199 # Run tests on an actual device. (Better have one plugged in!) |
200 function bb_run_unit_tests { | 200 function bb_run_unit_tests { |
201 python build/android/device_status_check.py | 201 python build/android/device_status_check.py |
202 local LOGCAT_DUMP_DIR="$CHROME_SRC/out/logcat" | 202 LOGCAT_DUMP_DIR="$CHROME_SRC/out/logcat" |
203 rm -rf "$LOGCAT_DUMP_DIR" | 203 rm -rf "$LOGCAT_DUMP_DIR" |
204 python build/android/adb_logcat_monitor.py "$LOGCAT_DUMP_DIR" & | 204 python build/android/adb_logcat_monitor.py "$LOGCAT_DUMP_DIR" & |
205 | 205 |
206 build/android/run_tests.py --xvfb --verbose | 206 build/android/run_tests.py --xvfb --verbose |
207 | 207 |
208 echo "@@@BUILD_STEP Logcat dump@@@" | 208 echo "@@@BUILD_STEP Logcat dump@@@" |
209 python build/android/adb_logcat_printer.py "$LOGCAT_DUMP_DIR" | 209 python build/android/adb_logcat_printer.py "$LOGCAT_DUMP_DIR" |
210 } | 210 } |
211 | 211 |
212 # Run instrumentation test. | 212 # Run instrumentation test. |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 ) | 302 ) |
303 } | 303 } |
304 | 304 |
305 # Retrieve a packed json property using python | 305 # Retrieve a packed json property using python |
306 function bb_get_json_prop { | 306 function bb_get_json_prop { |
307 local JSON="$1" | 307 local JSON="$1" |
308 local PROP="$2" | 308 local PROP="$2" |
309 | 309 |
310 python -c "import json; print json.loads('$JSON').get('$PROP')" | 310 python -c "import json; print json.loads('$JSON').get('$PROP')" |
311 } | 311 } |
OLD | NEW |