Chromium Code Reviews| 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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 187 function bb_compile { | 187 function bb_compile { |
| 188 # This must be named 'compile', not 'Compile', for CQ interaction. | 188 # This must be named 'compile', not 'Compile', for CQ interaction. |
| 189 # Talk to maruel for details. | 189 # Talk to maruel for details. |
| 190 echo "@@@BUILD_STEP compile@@@" | 190 echo "@@@BUILD_STEP compile@@@" |
| 191 bb_goma_make | 191 bb_goma_make |
| 192 } | 192 } |
| 193 | 193 |
| 194 # Re-gyp and compile with unit test bundles configured as shlibs for | 194 # Re-gyp and compile with unit test bundles configured as shlibs for |
| 195 # the native test runner. Experimental for now. Once the native test | 195 # the native test runner. Experimental for now. Once the native test |
| 196 # loader is on by default, this entire function becomes obsolete. | 196 # loader is on by default, this entire function becomes obsolete. |
| 197 function bb_native_test_compile_run_tests { | 197 function bb_apk_test_compile { |
| 198 echo "@@@BUILD_STEP Re-gyp for the native test runner@@@" | 198 echo "@@@BUILD_STEP Re-gyp for the native test runner@@@" |
| 199 GYP_DEFINES="$GYP_DEFINES gtest_target_type=shared_library" android_gyp | 199 GYP_DEFINES="$GYP_DEFINES gtest_target_type=shared_library" android_gyp |
| 200 | 200 |
| 201 echo "@@@BUILD_STEP Native test runner compile@@@" | 201 echo "@@@BUILD_STEP Native test runner compile@@@" |
| 202 bb_goma_make | 202 bb_goma_make |
| 203 | |
| 204 # Make sure running the template prints an expected failure. | |
| 205 echo "@@@BUILD_STEP Native test runner template test@@@" | |
| 206 tempfile=/tmp/tempfile-$$.txt | |
| 207 build/android/run_tests.py --xvfb --verbose \ | |
| 208 -s out/Release/replaceme_apk/replaceme-debug.apk \ | |
| 209 | sed 's/@@@STEP_FAILURE@@@//g' | tee $tempfile | |
| 210 happy_failure=$(cat $tempfile | grep RUNNER_FAILED | wc -l) | |
| 211 if [[ $happy_failure -eq 0 ]] ; then | |
| 212 echo "@@@STEP_WARNINGS@@@" | |
| 213 fi | |
| 214 } | 203 } |
| 215 | 204 |
| 216 # Experimental compile step; does not turn the tree red if it fails. | 205 # Experimental compile step; does not turn the tree red if it fails. |
| 217 function bb_compile_experimental { | 206 function bb_compile_experimental { |
| 218 # Linking DumpRenderTree appears to hang forever? | 207 # Linking DumpRenderTree appears to hang forever? |
| 219 EXPERIMENTAL_TARGETS="android_experimental" | 208 EXPERIMENTAL_TARGETS="android_experimental" |
| 220 for target in ${EXPERIMENTAL_TARGETS} ; do | 209 for target in ${EXPERIMENTAL_TARGETS} ; do |
| 221 echo "@@@BUILD_STEP Experimental Compile $target @@@" | 210 echo "@@@BUILD_STEP Experimental Compile $target @@@" |
| 222 set +e | 211 set +e |
| 223 bb_goma_make -k "${target}" | 212 bb_goma_make -k "${target}" |
| 224 if [ $? -ne 0 ] ; then | 213 if [ $? -ne 0 ] ; then |
| 225 echo "@@@STEP_WARNINGS@@@" | 214 echo "@@@STEP_WARNINGS@@@" |
| 226 fi | 215 fi |
| 227 set -e | 216 set -e |
| 228 done | 217 done |
| 229 } | 218 } |
| 230 | 219 |
| 231 # Run tests on an emulator. | 220 # Run tests on an emulator. |
| 232 function bb_run_tests_emulator { | 221 function bb_run_tests_emulator { |
| 233 echo "@@@BUILD_STEP Run Tests on an Emulator@@@" | 222 echo "@@@BUILD_STEP Run Tests on an Emulator@@@" |
| 234 build/android/run_tests.py -e --xvfb --verbose | 223 build/android/run_tests.py -e --xvfb --verbose |
| 235 } | 224 } |
| 236 | 225 |
| 237 # Run tests on an actual device. (Better have one plugged in!) | 226 # Run tests on an actual device. (Better have one plugged in!) |
| 238 function bb_run_tests { | 227 function bb_run_tests { |
| 239 echo "@@@BUILD_STEP Run Tests on actual hardware@@@" | 228 echo "@@@BUILD_STEP Run Tests on actual hardware@@@" |
| 240 build/android/run_tests.py --xvfb --verbose | 229 build/android/run_tests.py --xvfb --verbose |
| 241 } | 230 } |
| 231 | |
| 232 # Run APK tests on an actual device. | |
| 233 function bb_run_apk_tests { | |
|
John Grabowski
2012/05/15 23:50:28
how about apk_test_run to be consistewnt
nilesh
2012/05/16 00:02:05
Done.
| |
| 234 echo "@@@BUILD_STEP Run APK Tests on actual hardware@@@" | |
| 235 tempfile=/tmp/tempfile-$$.txt | |
| 236 # Filter out STEP_FAILURES, we don't want REDNESS on test failures for now. | |
| 237 build/android/run_tests.py --xvfb --verbose --apk=True \ | |
| 238 | sed 's/@@@STEP_FAILURE@@@//g' | tee $tempfile | |
| 239 happy_failure=$(cat $tempfile | grep RUNNER_FAILED | wc -l) | |
| 240 if [[ $happy_failure -eq 0 ]] ; then | |
| 241 echo "@@@STEP_WARNINGS@@@" | |
| 242 fi | |
| 243 rm -f $tempfile | |
| 244 } | |
| OLD | NEW |