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 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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. | 264 # Run instrumentation test. |
265 # Args: | 265 # Args: |
266 # $1: TEST_APK. | 266 # $1: TEST_APK. |
267 # $2: EXTRA_FLAGS to be passed to run_instrumentation_tests.py. | 267 # $2: EXTRA_FLAGS to be passed to run_instrumentation_tests.py. |
268 function bb_run_instrumentation_test { | 268 function bb_run_instrumentation_test { |
269 local TEST_APK=${1} | 269 local TEST_APK=${1} |
270 local EXTRA_FLAGS=${2} | 270 local EXTRA_FLAGS=${2} |
271 echo "@@@BUILD_STEP Android Instrumentation ${TEST_APK} ${EXTRA_FLAGS} "\ | 271 local APK_NAME=$(basename ${TEST_APK}) |
| 272 echo "@@@BUILD_STEP Android Instrumentation ${APK_NAME} ${EXTRA_FLAGS} "\ |
272 "on actual hardware@@@" | 273 "on actual hardware@@@" |
273 local INSTRUMENTATION_FLAGS="-vvv" | 274 local INSTRUMENTATION_FLAGS="-vvv" |
274 INSTRUMENTATION_FLAGS+=" --test-apk ${TEST_APK}" | 275 INSTRUMENTATION_FLAGS+=" --test-apk ${TEST_APK}" |
275 INSTRUMENTATION_FLAGS+=" ${EXTRA_FLAGS}" | 276 INSTRUMENTATION_FLAGS+=" ${EXTRA_FLAGS}" |
276 build/android/run_instrumentation_tests.py ${INSTRUMENTATION_FLAGS} | 277 build/android/run_instrumentation_tests.py ${INSTRUMENTATION_FLAGS} |
277 } | 278 } |
278 | 279 |
279 # Run content shell instrumentation test on device. | 280 # Run content shell instrumentation test on device. |
280 function bb_run_content_shell_instrumentation_test { | 281 function bb_run_content_shell_instrumentation_test { |
281 build/android/adb_install_content_shell | 282 build/android/adb_install_content_shell |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 --factory-properties "$FACTORY_PROPERTIES" \ | 319 --factory-properties "$FACTORY_PROPERTIES" \ |
319 --build-properties "$BUILD_PROPERTIES" | 320 --build-properties "$BUILD_PROPERTIES" |
320 extract_exitcode=$? | 321 extract_exitcode=$? |
321 if (( $extract_exitcode > 1 )); then | 322 if (( $extract_exitcode > 1 )); then |
322 echo "@@@STEP_WARNINGS@@@" | 323 echo "@@@STEP_WARNINGS@@@" |
323 return | 324 return |
324 fi | 325 fi |
325 return $extract_exitcode | 326 return $extract_exitcode |
326 ) | 327 ) |
327 } | 328 } |
OLD | NEW |