| 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 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 local EXTRA_FLAGS=${2} | 222 local EXTRA_FLAGS=${2} |
| 223 local INSTRUMENTATION_FLAGS="-vvv" | 223 local INSTRUMENTATION_FLAGS="-vvv" |
| 224 INSTRUMENTATION_FLAGS+=" --test-apk ${TEST_APK}" | 224 INSTRUMENTATION_FLAGS+=" --test-apk ${TEST_APK}" |
| 225 INSTRUMENTATION_FLAGS+=" ${EXTRA_FLAGS}" | 225 INSTRUMENTATION_FLAGS+=" ${EXTRA_FLAGS}" |
| 226 build/android/run_instrumentation_tests.py ${INSTRUMENTATION_FLAGS} | 226 build/android/run_instrumentation_tests.py ${INSTRUMENTATION_FLAGS} |
| 227 } | 227 } |
| 228 | 228 |
| 229 # Run content shell instrumentation test on device. | 229 # Run content shell instrumentation test on device. |
| 230 function bb_run_instrumentation_tests { | 230 function bb_run_instrumentation_tests { |
| 231 build/android/adb_install_content_shell | 231 build/android/adb_install_content_shell |
| 232 local TEST_APK="content_shell_test/ContentShellTest-debug" | 232 local TEST_APK="ContentShellTest" |
| 233 # Use -I to install the test apk only on the first run. | 233 # Use -I to install the test apk only on the first run. |
| 234 # TODO(bulach): remove the second once we have a Smoke test. | 234 # TODO(bulach): remove the second once we have a Smoke test. |
| 235 bb_run_instrumentation_test ${TEST_APK} "-I -A Smoke" | 235 bb_run_instrumentation_test ${TEST_APK} "-I -A Smoke" |
| 236 bb_run_instrumentation_test ${TEST_APK} "-I -A SmallTest" | 236 bb_run_instrumentation_test ${TEST_APK} "-I -A SmallTest" |
| 237 bb_run_instrumentation_test ${TEST_APK} "-A MediumTest" | 237 bb_run_instrumentation_test ${TEST_APK} "-A MediumTest" |
| 238 bb_run_instrumentation_test ${TEST_APK} "-A LargeTest" | 238 bb_run_instrumentation_test ${TEST_APK} "-A LargeTest" |
| 239 } | 239 } |
| 240 | 240 |
| 241 # Zip and archive a build. | 241 # Zip and archive a build. |
| 242 function bb_zip_build { | 242 function bb_zip_build { |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 ) | 306 ) |
| 307 } | 307 } |
| 308 | 308 |
| 309 # Retrieve a packed json property using python | 309 # Retrieve a packed json property using python |
| 310 function bb_get_json_prop { | 310 function bb_get_json_prop { |
| 311 local JSON="$1" | 311 local JSON="$1" |
| 312 local PROP="$2" | 312 local PROP="$2" |
| 313 | 313 |
| 314 python -c "import json; print json.loads('$JSON').get('$PROP')" | 314 python -c "import json; print json.loads('$JSON').get('$PROP')" |
| 315 } | 315 } |
| OLD | NEW |