Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2315)

Unified Diff: build/android/buildbot_functions.sh

Issue 10832097: Android: run instrumentation tests per "size". (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/buildbot_functions.sh
diff --git a/build/android/buildbot_functions.sh b/build/android/buildbot_functions.sh
index 383ab42c32688b70ac3a5f4bde78410f9bd97b3f..37b0cb0c7adaa0585675e0b5435e997f28f8c55e 100755
--- a/build/android/buildbot_functions.sh
+++ b/build/android/buildbot_functions.sh
@@ -261,13 +261,30 @@ function bb_run_content_shell_test {
"${SRC_ROOT}"/out/Release/content_shell/ContentShell-debug.apk
}
+# Run instrumentation test.
+# Args:
+# $1: TEST_APK.
+# $2: EXTRA_FLAGS to be passed to run_instrumentation_tests.py.
+function bb_run_instrumentation_test {
+ local TEST_APK=${1}
+ local EXTRA_FLAGS=${2}
+ echo "@@@BUILD_STEP Android Instrumentation ${TEST_APK} ${EXTRA_FLAGS} "\
+ "on actual hardware@@@"
+ local INSTRUMENTATION_FLAGS="-vvv"
+ INSTRUMENTATION_FLAGS+=" --test-apk ${TEST_APK}"
+ INSTRUMENTATION_FLAGS+=" ${EXTRA_FLAGS}"
+ build/android/run_instrumentation_tests.py ${INSTRUMENTATION_FLAGS}
+}
+
# Run content shell instrumentation test on device.
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
+ local TEST_APK="content_shell_test/ContentShellTest-debug"
+ # Use -I to install the test apk only on the first run.
+ bb_run_instrumentation_test ${TEST_APK} "-I -A Smoke"
+ bb_run_instrumentation_test ${TEST_APK} "-A SmallTest"
+ bb_run_instrumentation_test ${TEST_APK} "-A MediumTest"
+ bb_run_instrumentation_test ${TEST_APK} "-A LargeTest"
}
# Zip and archive a build.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698