Commit 218537d4 authored by bulach@chromium.org's avatar bulach@chromium.org

Android: run instrumentation tests per "size".

Use the same concept as downstream.
This allows filtering out disabled tests.

BUG=139365
TEST=Multiple steps on the FYI android tester.


Review URL: https://chromiumcodereview.appspot.com/10832097

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149434 0039d316-1c4b-4281-b951-d872f2087c98
parent 20102d6b
......@@ -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.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment