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}" |
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 |
21 ;; | 24 ;; |
22 --build-properties=*) | 25 --build-properties=*) |
23 BUILD_PROPERTIES="$(echo "$1" | sed 's/^[^=]*=//')" | 26 BUILD_PROPERTIES="$(echo "$1" | sed 's/^[^=]*=//')" |
24 ;; | 27 ;; |
25 *) | 28 *) |
26 echo "@@@STEP_WARNINGS@@@" | 29 echo "@@@STEP_WARNINGS@@@" |
27 echo "Warning, unparsed input argument: '$1'" | 30 echo "Warning, unparsed input argument: '$1'" |
28 ;; | 31 ;; |
29 esac | 32 esac |
30 shift | 33 shift |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 python build/android/adb_logcat_printer.py "$LOGCAT_DUMP_DIR" | 206 python build/android/adb_logcat_printer.py "$LOGCAT_DUMP_DIR" |
204 } | 207 } |
205 | 208 |
206 # Run tests on an actual device. (Better have one plugged in!) | 209 # Run tests on an actual device. (Better have one plugged in!) |
207 function bb_run_unit_tests { | 210 function bb_run_unit_tests { |
208 build/android/run_tests.py --xvfb --verbose | 211 build/android/run_tests.py --xvfb --verbose |
209 } | 212 } |
210 | 213 |
211 # Run WebKit's test suites: webkit_unit_tests and TestWebKitAPI | 214 # Run WebKit's test suites: webkit_unit_tests and TestWebKitAPI |
212 function bb_run_webkit_unit_tests { | 215 function bb_run_webkit_unit_tests { |
213 build/android/run_tests.py --xvfb --verbose -s webkit_unit_tests | 216 build/android/run_tests.py --xvfb --verbose $BUILDFLAG -s webkit_unit_tests |
214 build/android/run_tests.py --xvfb --verbose -s TestWebKitAPI | 217 build/android/run_tests.py --xvfb --verbose $BUILDFLAG -s TestWebKitAPI |
215 } | 218 } |
216 | 219 |
217 # Lint WebKit's TestExpectation files. | 220 # Lint WebKit's TestExpectation files. |
218 function bb_lint_webkit_expectation_files { | 221 function bb_lint_webkit_expectation_files { |
219 echo "@@@BUILD_STEP webkit_lint@@@" | 222 echo "@@@BUILD_STEP webkit_lint@@@" |
220 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 \ |
221 --lint-test-files \ | 224 --lint-test-files \ |
222 --chromium | 225 --chromium |
223 } | 226 } |
224 | 227 |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
376 ) | 379 ) |
377 } | 380 } |
378 | 381 |
379 # Retrieve a packed json property using python | 382 # Retrieve a packed json property using python |
380 function bb_get_json_prop { | 383 function bb_get_json_prop { |
381 local JSON="$1" | 384 local JSON="$1" |
382 local PROP="$2" | 385 local PROP="$2" |
383 | 386 |
384 python -c "import json; print json.loads('$JSON').get('$PROP', '')" | 387 python -c "import json; print json.loads('$JSON').get('$PROP', '')" |
385 } | 388 } |
OLD | NEW |