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

Side by Side Diff: build/android/buildbot_functions.sh

Issue 10828094: Android: replace temporary test runner with the instrumentation runner. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Install test apk Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | build/android/buildbot_fyi.sh » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 build/android/run_tests.py -e --xvfb --verbose 247 build/android/run_tests.py -e --xvfb --verbose
248 } 248 }
249 249
250 # Run tests on an actual device. (Better have one plugged in!) 250 # Run tests on an actual device. (Better have one plugged in!)
251 function bb_run_tests { 251 function bb_run_tests {
252 python build/android/device_status_check.py 252 python build/android/device_status_check.py
253 echo "@@@BUILD_STEP Run Tests on actual hardware@@@" 253 echo "@@@BUILD_STEP Run Tests on actual hardware@@@"
254 build/android/run_tests.py --xvfb --verbose 254 build/android/run_tests.py --xvfb --verbose
255 } 255 }
256 256
257 # Run simple content shell test on device.
258 function bb_run_content_shell_test {
259 echo "@@@BUILD_STEP Run simple content shell test on actual hardware@@@"
260 content/shell/android/simple_content_shell_test.sh \
261 "${SRC_ROOT}"/out/Release/content_shell/ContentShell-debug.apk
262 }
263
264 # Run instrumentation test. 257 # Run instrumentation test.
265 # Args: 258 # Args:
266 # $1: TEST_APK. 259 # $1: TEST_APK.
267 # $2: EXTRA_FLAGS to be passed to run_instrumentation_tests.py. 260 # $2: EXTRA_FLAGS to be passed to run_instrumentation_tests.py.
268 function bb_run_instrumentation_test { 261 function bb_run_instrumentation_test {
269 local TEST_APK=${1} 262 local TEST_APK=${1}
270 local EXTRA_FLAGS=${2} 263 local EXTRA_FLAGS=${2}
271 local APK_NAME=$(basename ${TEST_APK}) 264 local APK_NAME=$(basename ${TEST_APK})
272 echo "@@@BUILD_STEP Android Instrumentation ${APK_NAME} ${EXTRA_FLAGS} "\ 265 echo "@@@BUILD_STEP Android Instrumentation ${APK_NAME} ${EXTRA_FLAGS} "\
273 "on actual hardware@@@" 266 "on actual hardware@@@"
274 local INSTRUMENTATION_FLAGS="-vvv" 267 local INSTRUMENTATION_FLAGS="-vvv"
275 INSTRUMENTATION_FLAGS+=" --test-apk ${TEST_APK}" 268 INSTRUMENTATION_FLAGS+=" --test-apk ${TEST_APK}"
276 INSTRUMENTATION_FLAGS+=" ${EXTRA_FLAGS}" 269 INSTRUMENTATION_FLAGS+=" ${EXTRA_FLAGS}"
277 build/android/run_instrumentation_tests.py ${INSTRUMENTATION_FLAGS} 270 build/android/run_instrumentation_tests.py ${INSTRUMENTATION_FLAGS}
278 } 271 }
279 272
280 # Run content shell instrumentation test on device. 273 # Run content shell instrumentation test on device.
281 function bb_run_content_shell_instrumentation_test { 274 function bb_run_content_shell_instrumentation_test {
282 build/android/adb_install_content_shell 275 build/android/adb_install_content_shell
283 local TEST_APK="content_shell_test/ContentShellTest-debug" 276 local TEST_APK="content_shell_test/ContentShellTest-debug"
284 # Use -I to install the test apk only on the first run. 277 # Use -I to install the test apk only on the first run.
278 # TODO(bulach): remove the second once we have a Smoke test.
285 bb_run_instrumentation_test ${TEST_APK} "-I -A Smoke" 279 bb_run_instrumentation_test ${TEST_APK} "-I -A Smoke"
286 bb_run_instrumentation_test ${TEST_APK} "-A SmallTest" 280 bb_run_instrumentation_test ${TEST_APK} "-I -A SmallTest"
287 bb_run_instrumentation_test ${TEST_APK} "-A MediumTest" 281 bb_run_instrumentation_test ${TEST_APK} "-A MediumTest"
288 bb_run_instrumentation_test ${TEST_APK} "-A LargeTest" 282 bb_run_instrumentation_test ${TEST_APK} "-A LargeTest"
289 } 283 }
290 284
291 # Zip and archive a build. 285 # Zip and archive a build.
292 function bb_zip_build { 286 function bb_zip_build {
293 echo "@@@BUILD_STEP Zip build@@@" 287 echo "@@@BUILD_STEP Zip build@@@"
294 python ../../../../scripts/slave/zip_build.py \ 288 python ../../../../scripts/slave/zip_build.py \
295 --src-dir "$SRC_ROOT" \ 289 --src-dir "$SRC_ROOT" \
296 --exclude-files "lib.target" \ 290 --exclude-files "lib.target" \
(...skipping 22 matching lines...) Expand all
319 --factory-properties "$FACTORY_PROPERTIES" \ 313 --factory-properties "$FACTORY_PROPERTIES" \
320 --build-properties "$BUILD_PROPERTIES" 314 --build-properties "$BUILD_PROPERTIES"
321 extract_exitcode=$? 315 extract_exitcode=$?
322 if (( $extract_exitcode > 1 )); then 316 if (( $extract_exitcode > 1 )); then
323 echo "@@@STEP_WARNINGS@@@" 317 echo "@@@STEP_WARNINGS@@@"
324 return 318 return
325 fi 319 fi
326 return $extract_exitcode 320 return $extract_exitcode
327 ) 321 )
328 } 322 }
OLDNEW
« no previous file with comments | « no previous file | build/android/buildbot_fyi.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698