diff options
author | bulach@chromium.org <bulach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-31 15:21:28 +0000 |
---|---|---|
committer | bulach@chromium.org <bulach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-31 15:21:28 +0000 |
commit | 78851e09242f8fe5f709cc6b42842f8e6c33f429 (patch) | |
tree | 3a72084bb602e183623d472889e2cbf5a5e94fc3 /build/android | |
parent | 1dd6ac9f69a86069e34f9f623ca38fdf653f704f (diff) | |
download | chromium_src-78851e09242f8fe5f709cc6b42842f8e6c33f429.zip chromium_src-78851e09242f8fe5f709cc6b42842f8e6c33f429.tar.gz chromium_src-78851e09242f8fe5f709cc6b42842f8e6c33f429.tar.bz2 |
Android: follow up on instrumentation tests.
Follow up from:
http://codereview.chromium.org/10826071/
Build and install content shell on all attached devices.
BUG=139365
TEST=Android FYI tester runs instrumentation tests.
Review URL: https://chromiumcodereview.appspot.com/10825100
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149186 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build/android')
-rwxr-xr-x | build/android/adb_install_content_shell | 23 | ||||
-rwxr-xr-x | build/android/buildbot_functions.sh | 1 |
2 files changed, 21 insertions, 3 deletions
diff --git a/build/android/adb_install_content_shell b/build/android/adb_install_content_shell index d1a8ee9..3667998 100755 --- a/build/android/adb_install_content_shell +++ b/build/android/adb_install_content_shell @@ -4,6 +4,23 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -# install -r doesn't always work? Try uninstalling first. -adb uninstall org.chromium.content_shell -adb install -r ${CHROME_SRC}/out/Release/content_shell/ContentShell-debug.apk +CONTENT_SHELL_APK=${CHROME_SRC}/out/Release/content_shell/ContentShell-debug.apk + +if [ ! -f "${CONTENT_SHELL_APK}" ]; then + echo "Error: Could not find ${CONTENT_SHELL_APK} to install." + exit 1 +fi + +DEVS=$(adb devices | grep device | grep -v devices | awk '{ print $1 }') + +if [[ -z $DEVS ]]; then + echo "Error: No connected devices. Device needed to run content shell test." + exit 1 +fi + +for DEV in ${DEVS}; do + # Reinstall content shell. This will also kill existing content_shell procs. + echo "Installing ${CONTENT_SHELL_APK} in ${DEV}" + adb -s ${DEV} uninstall org.chromium.content_shell + adb -s ${DEV} install -r ${CONTENT_SHELL_APK} +done diff --git a/build/android/buildbot_functions.sh b/build/android/buildbot_functions.sh index 309fbbf..2f64af2 100755 --- a/build/android/buildbot_functions.sh +++ b/build/android/buildbot_functions.sh @@ -265,6 +265,7 @@ function bb_run_content_shell_test { function bb_run_content_shell_instrumentation_test { echo "@@@BUILD_STEP Run content shell instrumentation test on actual "\ "hardware@@@" + build/android/adb_install_content_shell build/android/run_instrumentation_tests.py -I \ --test-apk content_shell_test/ContentShellTest-debug -vvv } |