| 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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 local EXTRA_FLAGS=${2} | 218 local EXTRA_FLAGS=${2} |
| 219 local INSTRUMENTATION_FLAGS="-vvv" | 219 local INSTRUMENTATION_FLAGS="-vvv" |
| 220 INSTRUMENTATION_FLAGS+=" --test-apk ${TEST_APK}" | 220 INSTRUMENTATION_FLAGS+=" --test-apk ${TEST_APK}" |
| 221 INSTRUMENTATION_FLAGS+=" ${EXTRA_FLAGS}" | 221 INSTRUMENTATION_FLAGS+=" ${EXTRA_FLAGS}" |
| 222 build/android/run_instrumentation_tests.py ${INSTRUMENTATION_FLAGS} | 222 build/android/run_instrumentation_tests.py ${INSTRUMENTATION_FLAGS} |
| 223 } | 223 } |
| 224 | 224 |
| 225 # Run content shell instrumentation test on device. | 225 # Run content shell instrumentation test on device. |
| 226 function bb_run_instrumentation_tests { | 226 function bb_run_instrumentation_tests { |
| 227 build/android/adb_install_content_shell | 227 build/android/adb_install_content_shell |
| 228 local TEST_APK="content_shell_test/ContentShellTest-debug" | 228 local TEST_APK="ContentShellTest" |
| 229 # Use -I to install the test apk only on the first run. | 229 # Use -I to install the test apk only on the first run. |
| 230 # TODO(bulach): remove the second once we have a Smoke test. | 230 # TODO(bulach): remove the second once we have a Smoke test. |
| 231 bb_run_instrumentation_test ${TEST_APK} "-I -A Smoke" | 231 bb_run_instrumentation_test ${TEST_APK} "-I -A Smoke" |
| 232 bb_run_instrumentation_test ${TEST_APK} "-I -A SmallTest" | 232 bb_run_instrumentation_test ${TEST_APK} "-I -A SmallTest" |
| 233 bb_run_instrumentation_test ${TEST_APK} "-A MediumTest" | 233 bb_run_instrumentation_test ${TEST_APK} "-A MediumTest" |
| 234 bb_run_instrumentation_test ${TEST_APK} "-A LargeTest" | 234 bb_run_instrumentation_test ${TEST_APK} "-A LargeTest" |
| 235 } | 235 } |
| 236 | 236 |
| 237 # Zip and archive a build. | 237 # Zip and archive a build. |
| 238 function bb_zip_build { | 238 function bb_zip_build { |
| (...skipping 63 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 |