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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 | 182 |
183 bb_stop_goma_internal | 183 bb_stop_goma_internal |
184 } | 184 } |
185 | 185 |
186 # Compile step | 186 # Compile step |
187 function bb_compile { | 187 function bb_compile { |
188 echo "@@@BUILD_STEP Compile@@@" | 188 echo "@@@BUILD_STEP Compile@@@" |
189 bb_goma_make | 189 bb_goma_make |
190 } | 190 } |
191 | 191 |
| 192 # Re-gyp and compile with unit test bundles configured as shlibs for |
| 193 # the native test runner. Experimental for now. Once the native test |
| 194 # loader is on by default, this entire function becomes obsolete. |
| 195 function bb_native_test_compile_run_tests { |
| 196 echo "@@@BUILD_STEP Re-gyp for the native test runner@@@" |
| 197 GYP_DEFINES="$GYP_DEFINES gtest_target_type=shared_library" android_gyp |
| 198 |
| 199 echo "@@@BUILD_STEP Native test runner compile@@@" |
| 200 bb_goma_make |
| 201 |
| 202 # Make sure running the template prints an expected failure. |
| 203 echo "@@@BUILD_STEP Native test runner template test@@@" |
| 204 tempfile=/tmp/tempfile-$$.txt |
| 205 build/android/run_tests.py --xvfb --verbose \ |
| 206 -s out/Release/replaceme_apk/ChromeNativeTests-debug.apk \ |
| 207 | sed 's/@@@STEP_FAILURE@@@//g' | tee $tempfile |
| 208 happy_failure=$(cat $tempfile | grep RUNNER_FAILED | wc -l) |
| 209 if [[ $happy_failure -eq 0 ]] ; then |
| 210 echo "@@@STEP_FAILURE@@@" |
| 211 fi |
| 212 } |
| 213 |
192 # Experimental compile step; does not turn the tree red if it fails. | 214 # Experimental compile step; does not turn the tree red if it fails. |
193 function bb_compile_experimental { | 215 function bb_compile_experimental { |
194 # Linking DumpRenderTree appears to hang forever? | 216 # Linking DumpRenderTree appears to hang forever? |
195 EXPERIMENTAL_TARGETS="android_experimental" | 217 EXPERIMENTAL_TARGETS="android_experimental" |
196 for target in ${EXPERIMENTAL_TARGETS} ; do | 218 for target in ${EXPERIMENTAL_TARGETS} ; do |
197 echo "@@@BUILD_STEP Experimental Compile $target @@@" | 219 echo "@@@BUILD_STEP Experimental Compile $target @@@" |
198 set +e | 220 set +e |
199 bb_goma_make -k "${target}" | 221 bb_goma_make -k "${target}" |
200 if [ $? -ne 0 ] ; then | 222 if [ $? -ne 0 ] ; then |
201 echo "@@@STEP_WARNINGS@@@" | 223 echo "@@@STEP_WARNINGS@@@" |
202 fi | 224 fi |
203 set -e | 225 set -e |
204 done | 226 done |
205 } | 227 } |
206 | 228 |
207 # Run tests on an emulator. | 229 # Run tests on an emulator. |
208 function bb_run_tests_emulator { | 230 function bb_run_tests_emulator { |
209 echo "@@@BUILD_STEP Run Tests on an Emulator@@@" | 231 echo "@@@BUILD_STEP Run Tests on an Emulator@@@" |
210 build/android/run_tests.py -e --xvfb --verbose | 232 build/android/run_tests.py -e --xvfb --verbose |
211 } | 233 } |
212 | 234 |
213 # Run tests on an actual device. (Better have one plugged in!) | 235 # Run tests on an actual device. (Better have one plugged in!) |
214 function bb_run_tests { | 236 function bb_run_tests { |
215 echo "@@@BUILD_STEP Run Tests on actual hardware@@@" | 237 echo "@@@BUILD_STEP Run Tests on actual hardware@@@" |
216 build/android/run_tests.py --xvfb --verbose | 238 build/android/run_tests.py --xvfb --verbose |
217 } | 239 } |
OLD | NEW |