Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(112)

Side by Side Diff: build/android/buildbot/buildbot_functions.sh

Issue 11361179: Fix findbugs failure on Release buildtype. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « build/android/buildbot/bb_try_builder.sh ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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}"
11 JOBS="${JOBS:-4}" 11 JOBS="${JOBS:-4}"
12 12
13 # Parse named arguments passed into the annotator script 13 # Parse named arguments passed into the annotator script
14 # and assign them global variable names. 14 # and assign them global variable names.
15 function bb_parse_args { 15 function bb_parse_args {
16 while [[ $1 ]]; do 16 while [[ $1 ]]; do
17 case "$1" in 17 case "$1" in
18 --factory-properties=*) 18 --factory-properties=*)
19 FACTORY_PROPERTIES="$(echo "$1" | sed 's/^[^=]*=//')" 19 FACTORY_PROPERTIES="$(echo "$1" | sed 's/^[^=]*=//')"
20 BUILDTYPE=$(bb_get_json_prop "$FACTORY_PROPERTIES" target) 20 BUILDTYPE=$(bb_get_json_prop "$FACTORY_PROPERTIES" target)
21 if [[ $BUILDTYPE = Release ]]; then
22 BUILDFLAG="--release"
23 fi
24 ;; 21 ;;
25 --build-properties=*) 22 --build-properties=*)
26 BUILD_PROPERTIES="$(echo "$1" | sed 's/^[^=]*=//')" 23 BUILD_PROPERTIES="$(echo "$1" | sed 's/^[^=]*=//')"
27 ;; 24 ;;
28 *) 25 *)
29 echo "@@@STEP_WARNINGS@@@" 26 echo "@@@STEP_WARNINGS@@@"
30 echo "Warning, unparsed input argument: '$1'" 27 echo "Warning, unparsed input argument: '$1'"
31 ;; 28 ;;
32 esac 29 esac
33 shift 30 shift
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 python build/android/adb_logcat_printer.py "$LOGCAT_DUMP_DIR" 203 python build/android/adb_logcat_printer.py "$LOGCAT_DUMP_DIR"
207 } 204 }
208 205
209 # Run tests on an actual device. (Better have one plugged in!) 206 # Run tests on an actual device. (Better have one plugged in!)
210 function bb_run_unit_tests { 207 function bb_run_unit_tests {
211 build/android/run_tests.py --xvfb --verbose 208 build/android/run_tests.py --xvfb --verbose
212 } 209 }
213 210
214 # Run WebKit's test suites: webkit_unit_tests and TestWebKitAPI 211 # Run WebKit's test suites: webkit_unit_tests and TestWebKitAPI
215 function bb_run_webkit_unit_tests { 212 function bb_run_webkit_unit_tests {
213 if [[ $BUILDTYPE = Release ]]; then
214 local BUILDFLAG="--release"
215 fi
216 build/android/run_tests.py --xvfb --verbose $BUILDFLAG -s webkit_unit_tests 216 build/android/run_tests.py --xvfb --verbose $BUILDFLAG -s webkit_unit_tests
217 build/android/run_tests.py --xvfb --verbose $BUILDFLAG -s TestWebKitAPI 217 build/android/run_tests.py --xvfb --verbose $BUILDFLAG -s TestWebKitAPI
218 } 218 }
219 219
220 # Lint WebKit's TestExpectation files. 220 # Lint WebKit's TestExpectation files.
221 function bb_lint_webkit_expectation_files { 221 function bb_lint_webkit_expectation_files {
222 echo "@@@BUILD_STEP webkit_lint@@@" 222 echo "@@@BUILD_STEP webkit_lint@@@"
223 bb_run_step python webkit/tools/layout_tests/run_webkit_tests.py \ 223 bb_run_step python webkit/tools/layout_tests/run_webkit_tests.py \
224 --lint-test-files \ 224 --lint-test-files \
225 --chromium 225 --chromium
(...skipping 25 matching lines...) Expand all
251 --platform=chromium-android \ 251 --platform=chromium-android \
252 --test-results-server "$RESULTSERVER" 252 --test-results-server "$RESULTSERVER"
253 } 253 }
254 254
255 # Run experimental unittest bundles. 255 # Run experimental unittest bundles.
256 function bb_run_experimental_unit_tests { 256 function bb_run_experimental_unit_tests {
257 build/android/run_tests.py --xvfb --verbose -s android_webview_unittests 257 build/android/run_tests.py --xvfb --verbose -s android_webview_unittests
258 } 258 }
259 259
260 # Run findbugs. 260 # Run findbugs.
261 function bb_run_findbugs_diff { 261 function bb_run_findbugs {
262 echo "@@@BUILD_STEP findbugs_diff@@@" 262 echo "@@@BUILD_STEP findbugs@@@"
263 build/android/findbugs_diff.py 263 if [[ $BUILDTYPE = Release ]]; then
264 local BUILDFLAG="--release-build"
265 fi
266 bb_run_step build/android/findbugs_diff.py $BUILDFLAG
267 bb_run_step tools/android/findbugs_plugin/test/run_findbugs_plugin_tests.py \
268 $BUILDFLAG
264 } 269 }
265 270
266 # Run findbugs plugin tests. 271 # Run a buildbot step and handle failure (failure will not halt build).
267 function bb_run_findbugs_plugin_tests {
268 echo "@@@BUILD_STEP findbugs_plugin_tests@@@"
269 tools/android/findbugs_plugin/test/run_findbugs_plugin_tests.py
270 }
271
272 # Run a buildbot step and handle failure.
273 function bb_run_step { 272 function bb_run_step {
274 ( 273 (
275 set +e 274 set +e
276 "$@" 275 "$@"
277 if [[ $? != 0 ]]; then 276 if [[ $? != 0 ]]; then
278 echo "@@@STEP_FAILURE@@@" 277 echo "@@@STEP_FAILURE@@@"
279 fi 278 fi
280 ) 279 )
281 } 280 }
282 281
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 ) 375 )
377 } 376 }
378 377
379 # Retrieve a packed json property using python 378 # Retrieve a packed json property using python
380 function bb_get_json_prop { 379 function bb_get_json_prop {
381 local JSON="$1" 380 local JSON="$1"
382 local PROP="$2" 381 local PROP="$2"
383 382
384 python -c "import json; print json.loads('$JSON').get('$PROP', '')" 383 python -c "import json; print json.loads('$JSON').get('$PROP', '')"
385 } 384 }
OLDNEW
« no previous file with comments | « build/android/buildbot/bb_try_builder.sh ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698