OLD | NEW |
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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 fi | 93 fi |
94 } | 94 } |
95 | 95 |
96 # Used internally to buildbot_functions.sh. | 96 # Used internally to buildbot_functions.sh. |
97 function _bb_android_run_tests () { | 97 function _bb_android_run_tests () { |
98 local FLAGS | 98 local FLAGS |
99 FLAGS="--xvfb --verbose" | 99 FLAGS="--xvfb --verbose" |
100 if [[ ${BUILDTYPE} == Release ]]; then | 100 if [[ ${BUILDTYPE} == Release ]]; then |
101 FLAGS="${FLAGS} --release" | 101 FLAGS="${FLAGS} --release" |
102 fi | 102 fi |
103 build/android/run_tests.py ${FLAGS} "$@" | 103 build/android/run_tests.py ${FLAGS} ${EXTRA_RUN_TESTS_FLAGS} "$@" |
104 } | 104 } |
105 | 105 |
106 function bb_compile_setup { | 106 function bb_compile_setup { |
107 bb_setup_goma_internal | 107 bb_setup_goma_internal |
108 # Should be called only after envsetup is done. | 108 # Should be called only after envsetup is done. |
109 gclient runhooks | 109 gclient runhooks |
110 } | 110 } |
111 | 111 |
112 # Setup goma. Used internally to buildbot_functions.sh. | 112 # Setup goma. Used internally to buildbot_functions.sh. |
113 function bb_setup_goma_internal { | 113 function bb_setup_goma_internal { |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 # Install application APK. | 336 # Install application APK. |
337 bb_install_apk ${APK} ${APK_PACKAGE} | 337 bb_install_apk ${APK} ${APK_PACKAGE} |
338 | 338 |
339 # Run instrumentation tests. Using -I to install the test apk. | 339 # Run instrumentation tests. Using -I to install the test apk. |
340 echo "@@@BUILD_STEP Run instrumentation tests ${TEST_APK}@@@" | 340 echo "@@@BUILD_STEP Run instrumentation tests ${TEST_APK}@@@" |
341 FLAGS="-vvv" | 341 FLAGS="-vvv" |
342 if [[ "${BUILDTYPE}" == Release ]]; then | 342 if [[ "${BUILDTYPE}" == Release ]]; then |
343 FLAGS="${FLAGS} --release" | 343 FLAGS="${FLAGS} --release" |
344 fi | 344 fi |
345 bb_run_step python build/android/run_instrumentation_tests.py \ | 345 bb_run_step python build/android/run_instrumentation_tests.py \ |
346 ${FLAGS} --test-apk ${TEST_APK} -I --test_data ${TEST_DATA} | 346 ${FLAGS} ${EXTRA_RUN_TESTS_FLAGS} --test-apk ${TEST_APK} -I \ |
| 347 --test_data ${TEST_DATA} |
347 } | 348 } |
348 | 349 |
349 # Run instrumentation tests for all relevant APKs on device. | 350 # Run instrumentation tests for all relevant APKs on device. |
350 function bb_run_instrumentation_tests { | 351 function bb_run_instrumentation_tests { |
351 bb_run_all_instrumentation_tests_for_apk "ContentShell.apk" \ | 352 bb_run_all_instrumentation_tests_for_apk "ContentShell.apk" \ |
352 "org.chromium.content_shell" "ContentShellTest" \ | 353 "org.chromium.content_shell" "ContentShellTest" \ |
353 "content:content/test/data/android/device_files" | 354 "content:content/test/data/android/device_files" |
354 bb_run_all_instrumentation_tests_for_apk "ChromiumTestShell.apk" \ | 355 bb_run_all_instrumentation_tests_for_apk "ChromiumTestShell.apk" \ |
355 "org.chromium.chrome.testshell" "ChromiumTestShellTest" \ | 356 "org.chromium.chrome.testshell" "ChromiumTestShellTest" \ |
356 "chrome:chrome/test/data/android/device_files" | 357 "chrome:chrome/test/data/android/device_files" |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
431 ) | 432 ) |
432 } | 433 } |
433 | 434 |
434 # Retrieve a packed json property using python | 435 # Retrieve a packed json property using python |
435 function bb_get_json_prop { | 436 function bb_get_json_prop { |
436 local JSON="$1" | 437 local JSON="$1" |
437 local PROP="$2" | 438 local PROP="$2" |
438 | 439 |
439 python -c "import json; print json.loads('$JSON').get('$PROP', '')" | 440 python -c "import json; print json.loads('$JSON').get('$PROP', '')" |
440 } | 441 } |
OLD | NEW |