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

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

Issue 11348202: Specify the test files to be used as an argument to the instrumentation tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Specify the test files to be used as an argument to the instrumentation tests - code review fixes Created 8 years, 1 month 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
« no previous file with comments | « no previous file | build/android/pylib/run_java_tests.py » ('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 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 echo "@@@BUILD_STEP Install ${APK}@@@" 308 echo "@@@BUILD_STEP Install ${APK}@@@"
309 python build/android/adb_install_apk.py --apk ${APK} \ 309 python build/android/adb_install_apk.py --apk ${APK} \
310 --apk_package ${APK_PACKAGE} ${BUILDFLAG} 310 --apk_package ${APK_PACKAGE} ${BUILDFLAG}
311 } 311 }
312 312
313 # Run instrumentation tests for a specific APK. 313 # Run instrumentation tests for a specific APK.
314 # Args: 314 # Args:
315 # $1: APK to be installed. 315 # $1: APK to be installed.
316 # $2: APK_PACKAGE for the APK to be installed. 316 # $2: APK_PACKAGE for the APK to be installed.
317 # $3: TEST_APK to run the tests against. 317 # $3: TEST_APK to run the tests against.
318 # $4: TEST_DATA in format destination:source
318 function bb_run_all_instrumentation_tests_for_apk { 319 function bb_run_all_instrumentation_tests_for_apk {
319 local APK=${1} 320 local APK=${1}
320 local APK_PACKAGE=${2} 321 local APK_PACKAGE=${2}
321 local TEST_APK=${3} 322 local TEST_APK=${3}
323 local TEST_DATA=${4}
322 324
323 # Install application APK. 325 # Install application APK.
324 bb_install_apk ${APK} ${APK_PACKAGE} 326 bb_install_apk ${APK} ${APK_PACKAGE}
325 327
326 # Run instrumentation tests. Using -I to install the test apk. 328 # Run instrumentation tests. Using -I to install the test apk.
327 echo "@@@BUILD_STEP Run instrumentation tests ${TEST_APK}@@@" 329 echo "@@@BUILD_STEP Run instrumentation tests ${TEST_APK}@@@"
328 bb_run_step python build/android/run_instrumentation_tests.py \ 330 bb_run_step python build/android/run_instrumentation_tests.py \
329 -vvv --test-apk ${TEST_APK} -I 331 -vvv --test-apk ${TEST_APK} -I --test_data ${TEST_DATA}
330 } 332 }
331 333
332 # Run instrumentation tests for all relevant APKs on device. 334 # Run instrumentation tests for all relevant APKs on device.
333 function bb_run_instrumentation_tests { 335 function bb_run_instrumentation_tests {
334 bb_run_all_instrumentation_tests_for_apk "ContentShell.apk" \ 336 bb_run_all_instrumentation_tests_for_apk "ContentShell.apk" \
335 "org.chromium.content_shell" "ContentShellTest" 337 "org.chromium.content_shell" "ContentShellTest" \
338 "content:content/test/data/android/device_files"
336 bb_run_all_instrumentation_tests_for_apk "ChromiumTestShell.apk" \ 339 bb_run_all_instrumentation_tests_for_apk "ChromiumTestShell.apk" \
337 "org.chromium.chrome.testshell" "ChromiumTestShellTest" 340 "org.chromium.chrome.testshell" "ChromiumTestShellTest" \
341 "chrome:chrome/test/data/android/device_files"
338 } 342 }
339 343
340 # Run instrumentation tests for experimental APKs on device. 344 # Run instrumentation tests for experimental APKs on device.
341 function bb_run_experimental_instrumentation_tests { 345 function bb_run_experimental_instrumentation_tests {
342 bb_run_all_instrumentation_tests_for_apk "AndroidWebView.apk" \ 346 bb_run_all_instrumentation_tests_for_apk "AndroidWebView.apk" \
343 "org.chromium.android_webview" "AndroidWebViewTest" 347 "org.chromium.android_webview" "AndroidWebViewTest" \
348 "webview:android_webview/test/data/device_files"
344 } 349 }
345 350
346 # Zip and archive a build. 351 # Zip and archive a build.
347 function bb_zip_build { 352 function bb_zip_build {
348 echo "@@@BUILD_STEP Zip build@@@" 353 echo "@@@BUILD_STEP Zip build@@@"
349 python ../../../../scripts/slave/zip_build.py \ 354 python ../../../../scripts/slave/zip_build.py \
350 --src-dir "$SRC_ROOT" \ 355 --src-dir "$SRC_ROOT" \
351 --exclude-files "lib.target,gen,android_webview,jingle_unittests" \ 356 --exclude-files "lib.target,gen,android_webview,jingle_unittests" \
352 --factory-properties "$FACTORY_PROPERTIES" \ 357 --factory-properties "$FACTORY_PROPERTIES" \
353 --build-properties "$BUILD_PROPERTIES" 358 --build-properties "$BUILD_PROPERTIES"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 ) 415 )
411 } 416 }
412 417
413 # Retrieve a packed json property using python 418 # Retrieve a packed json property using python
414 function bb_get_json_prop { 419 function bb_get_json_prop {
415 local JSON="$1" 420 local JSON="$1"
416 local PROP="$2" 421 local PROP="$2"
417 422
418 python -c "import json; print json.loads('$JSON').get('$PROP', '')" 423 python -c "import json; print json.loads('$JSON').get('$PROP', '')"
419 } 424 }
OLDNEW
« no previous file with comments | « no previous file | build/android/pylib/run_java_tests.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698