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

Side by Side 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, 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 | no next file » | 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 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
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. 257 # Run simple content shell test on device.
258 function bb_run_content_shell_test { 258 function bb_run_content_shell_test {
259 echo "@@@BUILD_STEP Run simple content shell test on actual hardware@@@" 259 echo "@@@BUILD_STEP Run simple content shell test on actual hardware@@@"
260 content/shell/android/simple_content_shell_test.sh \ 260 content/shell/android/simple_content_shell_test.sh \
261 "${SRC_ROOT}"/out/Release/content_shell/ContentShell-debug.apk 261 "${SRC_ROOT}"/out/Release/content_shell/ContentShell-debug.apk
262 } 262 }
263 263
264 # Run instrumentation test.
265 # Args:
266 # $1: TEST_APK.
267 # $2: EXTRA_FLAGS to be passed to run_instrumentation_tests.py.
268 function bb_run_instrumentation_test {
269 local TEST_APK=${1}
270 local EXTRA_FLAGS=${2}
271 echo "@@@BUILD_STEP Android Instrumentation ${TEST_APK} ${EXTRA_FLAGS} "\
272 "on actual hardware@@@"
273 local INSTRUMENTATION_FLAGS="-vvv"
274 INSTRUMENTATION_FLAGS+=" --test-apk ${TEST_APK}"
275 INSTRUMENTATION_FLAGS+=" ${EXTRA_FLAGS}"
276 build/android/run_instrumentation_tests.py ${INSTRUMENTATION_FLAGS}
277 }
278
264 # Run content shell instrumentation test on device. 279 # Run content shell instrumentation test on device.
265 function bb_run_content_shell_instrumentation_test { 280 function bb_run_content_shell_instrumentation_test {
266 echo "@@@BUILD_STEP Run content shell instrumentation test on actual "\
267 "hardware@@@"
268 build/android/adb_install_content_shell 281 build/android/adb_install_content_shell
269 build/android/run_instrumentation_tests.py -I \ 282 local TEST_APK="content_shell_test/ContentShellTest-debug"
270 --test-apk content_shell_test/ContentShellTest-debug -vvv 283 # Use -I to install the test apk only on the first run.
284 bb_run_instrumentation_test ${TEST_APK} "-I -A Smoke"
285 bb_run_instrumentation_test ${TEST_APK} "-A SmallTest"
286 bb_run_instrumentation_test ${TEST_APK} "-A MediumTest"
287 bb_run_instrumentation_test ${TEST_APK} "-A LargeTest"
271 } 288 }
272 289
273 # Zip and archive a build. 290 # Zip and archive a build.
274 function bb_zip_build { 291 function bb_zip_build {
275 echo "@@@BUILD_STEP Zip build@@@" 292 echo "@@@BUILD_STEP Zip build@@@"
276 python ../../../../scripts/slave/zip_build.py \ 293 python ../../../../scripts/slave/zip_build.py \
277 --src-dir "$SRC_ROOT" \ 294 --src-dir "$SRC_ROOT" \
278 --exclude-files "lib.target" \ 295 --exclude-files "lib.target" \
279 --factory-properties "$FACTORY_PROPERTIES" \ 296 --factory-properties "$FACTORY_PROPERTIES" \
280 --build-properties "$BUILD_PROPERTIES" 297 --build-properties "$BUILD_PROPERTIES"
(...skipping 20 matching lines...) Expand all
301 --factory-properties "$FACTORY_PROPERTIES" \ 318 --factory-properties "$FACTORY_PROPERTIES" \
302 --build-properties "$BUILD_PROPERTIES" 319 --build-properties "$BUILD_PROPERTIES"
303 extract_exitcode=$? 320 extract_exitcode=$?
304 if (( $extract_exitcode > 1 )); then 321 if (( $extract_exitcode > 1 )); then
305 echo "@@@STEP_WARNINGS@@@" 322 echo "@@@STEP_WARNINGS@@@"
306 return 323 return
307 fi 324 fi
308 return $extract_exitcode 325 return $extract_exitcode
309 ) 326 )
310 } 327 }
OLDNEW
« 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