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 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 \ | |
|
Yaron
2012/04/12 01:29:53
replaceme_apk? I dont' see where this instance of
John Grabowski
2012/04/13 01:11:37
It isn't. This test is for compiling the template
| |
| 207 | sed 's/@@@STEP_FAILURE@@@//g' | tee $tempfile | |
| 208 happy_failure=$(cat $tempfile | grep NATIVE_LOADER_FAILED | wc -l) | |
|
Yaron
2012/04/12 01:29:53
is a failure really ever happy?
bulach
2012/04/12 15:51:42
nit: a grep -c makes wc unecessary... but honestly
John Grabowski
2012/04/13 01:11:37
Yes. If compiling the template yells about "no sh
John Grabowski
2012/04/13 01:11:37
Not sure I agree. We are building the template.
bulach
2012/04/13 09:42:51
well, even if it's temporary, I'd rather have the
| |
| 209 if [[ $happy_failure -eq 0 ]] ; then | |
| 210 echo "@@@STEP_FAILURE@@@" | |
| 211 else | |
| 212 echo "The previous NATIVE_LOADER_FAILED implies success for the runner." | |
| 213 fi | |
| 214 } | |
| 215 | |
| 192 # Experimental compile step; does not turn the tree red if it fails. | 216 # Experimental compile step; does not turn the tree red if it fails. |
| 193 function bb_compile_experimental { | 217 function bb_compile_experimental { |
| 194 # Linking DumpRenderTree appears to hang forever? | 218 # Linking DumpRenderTree appears to hang forever? |
| 195 EXPERIMENTAL_TARGETS="android_experimental" | 219 EXPERIMENTAL_TARGETS="android_experimental" |
| 196 for target in ${EXPERIMENTAL_TARGETS} ; do | 220 for target in ${EXPERIMENTAL_TARGETS} ; do |
| 197 echo "@@@BUILD_STEP Experimental Compile $target @@@" | 221 echo "@@@BUILD_STEP Experimental Compile $target @@@" |
| 198 set +e | 222 set +e |
| 199 bb_goma_make -k "${target}" | 223 bb_goma_make -k "${target}" |
| 200 if [ $? -ne 0 ] ; then | 224 if [ $? -ne 0 ] ; then |
| 201 echo "@@@STEP_WARNINGS@@@" | 225 echo "@@@STEP_WARNINGS@@@" |
| 202 fi | 226 fi |
| 203 set -e | 227 set -e |
| 204 done | 228 done |
| 205 } | 229 } |
| 206 | 230 |
| 207 # Run tests on an emulator. | 231 # Run tests on an emulator. |
| 208 function bb_run_tests_emulator { | 232 function bb_run_tests_emulator { |
| 209 echo "@@@BUILD_STEP Run Tests on an Emulator@@@" | 233 echo "@@@BUILD_STEP Run Tests on an Emulator@@@" |
| 210 build/android/run_tests.py -e --xvfb --verbose | 234 build/android/run_tests.py -e --xvfb --verbose |
| 211 } | 235 } |
| 212 | 236 |
| 213 # Run tests on an actual device. (Better have one plugged in!) | 237 # Run tests on an actual device. (Better have one plugged in!) |
| 214 function bb_run_tests { | 238 function bb_run_tests { |
| 215 echo "@@@BUILD_STEP Run Tests on actual hardware@@@" | 239 echo "@@@BUILD_STEP Run Tests on actual hardware@@@" |
| 216 build/android/run_tests.py --xvfb --verbose | 240 build/android/run_tests.py --xvfb --verbose |
| 217 } | 241 } |
| OLD | NEW |