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 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 } | 216 } |
217 | 217 |
218 # Compile step | 218 # Compile step |
219 function bb_compile { | 219 function bb_compile { |
220 # This must be named 'compile', not 'Compile', for CQ interaction. | 220 # This must be named 'compile', not 'Compile', for CQ interaction. |
221 # Talk to maruel for details. | 221 # Talk to maruel for details. |
222 echo "@@@BUILD_STEP compile@@@" | 222 echo "@@@BUILD_STEP compile@@@" |
223 bb_goma_make | 223 bb_goma_make |
224 } | 224 } |
225 | 225 |
226 # Re-gyp and compile with unit test bundles configured as shlibs for | |
227 # the native test runner. Experimental for now. Once the native test | |
228 # loader is on by default, this entire function becomes obsolete. | |
229 function bb_compile_apk_tests { | |
230 echo "@@@BUILD_STEP Re-gyp for the native test runner@@@" | |
231 # Setup goma again. Not doing this breaks the android_gyp step. | |
232 bb_setup_goma_internal | |
233 | |
234 GYP_DEFINES="$GYP_DEFINES gtest_target_type=shared_library" android_gyp | |
235 | |
236 echo "@@@BUILD_STEP Native test runner compile@@@" | |
237 bb_goma_make | |
238 } | |
239 | |
240 # Experimental compile step; does not turn the tree red if it fails. | 226 # Experimental compile step; does not turn the tree red if it fails. |
241 function bb_compile_experimental { | 227 function bb_compile_experimental { |
242 # Linking DumpRenderTree appears to hang forever? | 228 # Linking DumpRenderTree appears to hang forever? |
243 EXPERIMENTAL_TARGETS="android_experimental" | 229 EXPERIMENTAL_TARGETS="android_experimental" |
244 for target in ${EXPERIMENTAL_TARGETS} ; do | 230 for target in ${EXPERIMENTAL_TARGETS} ; do |
245 echo "@@@BUILD_STEP Experimental Compile $target @@@" | 231 echo "@@@BUILD_STEP Experimental Compile $target @@@" |
246 set +e | 232 set +e |
247 bb_goma_make -k "${target}" | 233 bb_goma_make -k "${target}" |
248 if [ $? -ne 0 ] ; then | 234 if [ $? -ne 0 ] ; then |
249 echo "@@@STEP_WARNINGS@@@" | 235 echo "@@@STEP_WARNINGS@@@" |
250 fi | 236 fi |
251 set -e | 237 set -e |
252 done | 238 done |
253 } | 239 } |
254 | 240 |
255 # Run tests on an emulator. | 241 # Run tests on an emulator. |
256 function bb_run_tests_emulator { | 242 function bb_run_tests_emulator { |
257 echo "@@@BUILD_STEP Run Tests on an Emulator@@@" | 243 echo "@@@BUILD_STEP Run Tests on an Emulator@@@" |
258 build/android/run_tests.py -e --xvfb --verbose | 244 build/android/run_tests.py -e --xvfb --verbose |
259 } | 245 } |
260 | 246 |
261 # Run tests on an actual device. (Better have one plugged in!) | 247 # Run tests on an actual device. (Better have one plugged in!) |
262 function bb_run_tests { | 248 function bb_run_tests { |
263 echo "@@@BUILD_STEP Run Tests on actual hardware@@@" | 249 echo "@@@BUILD_STEP Run Tests on actual hardware@@@" |
264 build/android/run_tests.py --xvfb --verbose | |
265 } | |
266 | |
267 # Run APK tests on an actual device. | |
268 function bb_run_apk_tests { | |
269 echo "@@@BUILD_STEP Run APK Tests on actual hardware@@@" | |
270 build/android/run_tests.py --xvfb --verbose --apk=True | 250 build/android/run_tests.py --xvfb --verbose --apk=True |
271 } | 251 } |
272 | 252 |
273 # Zip and archive a build. | 253 # Zip and archive a build. |
274 function bb_zip_build { | 254 function bb_zip_build { |
275 echo "@@@BUILD_STEP Zip build@@@" | 255 echo "@@@BUILD_STEP Zip build@@@" |
276 python ../../../../scripts/slave/zip_build.py \ | 256 python ../../../../scripts/slave/zip_build.py \ |
277 --src-dir "$SRC_ROOT" \ | 257 --src-dir "$SRC_ROOT" \ |
278 --factory-properties "$FACTORY_PROPERTIES" \ | 258 --factory-properties "$FACTORY_PROPERTIES" \ |
279 --build-properties "$BUILD_PROPERTIES" | 259 --build-properties "$BUILD_PROPERTIES" |
280 } | 260 } |
281 | 261 |
282 # Download and extract a build. | 262 # Download and extract a build. |
283 function bb_extract_build { | 263 function bb_extract_build { |
284 echo "@@@BUILD_STEP Download and extract build@@@" | 264 echo "@@@BUILD_STEP Download and extract build@@@" |
285 if [[ -z $FACTORY_PROPERTIES || -z $BUILD_PROPERTIES ]]; then | 265 if [[ -z $FACTORY_PROPERTIES || -z $BUILD_PROPERTIES ]]; then |
286 return 1 | 266 return 1 |
287 fi | 267 fi |
288 | 268 |
289 python ../../../../scripts/slave/extract_build.py \ | 269 python ../../../../scripts/slave/extract_build.py \ |
290 --build-dir "$SRC_ROOT" \ | 270 --build-dir "$SRC_ROOT" \ |
291 --build-output-dir "out" \ | 271 --build-output-dir "out" \ |
292 --target Release \ | 272 --target Release \ |
293 --factory-properties "$FACTORY_PROPERTIES" \ | 273 --factory-properties "$FACTORY_PROPERTIES" \ |
294 --build-properties "$BUILD_PROPERTIES" | 274 --build-properties "$BUILD_PROPERTIES" |
295 } | 275 } |
OLD | NEW |