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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 187 function bb_compile { | 187 function bb_compile { |
| 188 # This must be named 'compile', not 'Compile', for CQ interaction. | 188 # This must be named 'compile', not 'Compile', for CQ interaction. |
| 189 # Talk to maruel for details. | 189 # Talk to maruel for details. |
| 190 echo "@@@BUILD_STEP compile@@@" | 190 echo "@@@BUILD_STEP compile@@@" |
| 191 bb_goma_make | 191 bb_goma_make |
| 192 } | 192 } |
| 193 | 193 |
| 194 # Re-gyp and compile with unit test bundles configured as shlibs for | 194 # Re-gyp and compile with unit test bundles configured as shlibs for |
| 195 # the native test runner. Experimental for now. Once the native test | 195 # the native test runner. Experimental for now. Once the native test |
| 196 # loader is on by default, this entire function becomes obsolete. | 196 # loader is on by default, this entire function becomes obsolete. |
| 197 function bb_native_test_compile_run_tests { | 197 function bb_native_test_compile_run_tests { |
|
Yaron
2012/05/15 01:57:38
What happens with this?
nilesh
2012/05/15 02:29:18
We still need this step.
| |
| 198 echo "@@@BUILD_STEP Re-gyp for the native test runner@@@" | 198 echo "@@@BUILD_STEP Re-gyp for the native test runner@@@" |
| 199 GYP_DEFINES="$GYP_DEFINES gtest_target_type=shared_library" android_gyp | 199 GYP_DEFINES="$GYP_DEFINES gtest_target_type=shared_library" android_gyp |
| 200 | 200 |
| 201 echo "@@@BUILD_STEP Native test runner compile@@@" | 201 echo "@@@BUILD_STEP Native test runner compile@@@" |
| 202 bb_goma_make | 202 bb_goma_make |
| 203 | 203 |
| 204 # Make sure running the template prints an expected failure. | 204 # Make sure running the template prints an expected failure. |
| 205 echo "@@@BUILD_STEP Native test runner template test@@@" | 205 echo "@@@BUILD_STEP Native test runner template test@@@" |
| 206 tempfile=/tmp/tempfile-$$.txt | 206 tempfile=/tmp/tempfile-$$.txt |
| 207 build/android/run_tests.py --xvfb --verbose \ | 207 build/android/run_tests.py --xvfb --verbose \ |
| 208 -s out/Release/replaceme_apk/replaceme-debug.apk \ | 208 -s out/Release/replaceme_apk/replaceme-debug.apk \ |
| 209 | sed 's/@@@STEP_FAILURE@@@//g' | tee $tempfile | 209 | sed 's/@@@STEP_FAILURE@@@//g' | tee $tempfile |
| 210 happy_failure=$(cat $tempfile | grep RUNNER_FAILED | wc -l) | 210 happy_failure=$(cat $tempfile | grep RUNNER_FAILED | wc -l) |
| 211 if [[ $happy_failure -eq 0 ]] ; then | 211 if [[ $happy_failure -eq 0 ]] ; then |
| 212 echo "@@@STEP_WARNINGS@@@" | 212 echo "@@@STEP_WARNINGS@@@" |
|
John Grabowski
2012/05/15 22:24:39
looks like this is missing a "rm -f $tempfile"
can
nilesh
2012/05/15 22:59:25
Done.
| |
| 213 fi | 213 fi |
| 214 } | 214 } |
| 215 | 215 |
| 216 # 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. |
| 217 function bb_compile_experimental { | 217 function bb_compile_experimental { |
| 218 # Linking DumpRenderTree appears to hang forever? | 218 # Linking DumpRenderTree appears to hang forever? |
| 219 EXPERIMENTAL_TARGETS="android_experimental" | 219 EXPERIMENTAL_TARGETS="android_experimental" |
| 220 for target in ${EXPERIMENTAL_TARGETS} ; do | 220 for target in ${EXPERIMENTAL_TARGETS} ; do |
| 221 echo "@@@BUILD_STEP Experimental Compile $target @@@" | 221 echo "@@@BUILD_STEP Experimental Compile $target @@@" |
| 222 set +e | 222 set +e |
| 223 bb_goma_make -k "${target}" | 223 bb_goma_make -k "${target}" |
| 224 if [ $? -ne 0 ] ; then | 224 if [ $? -ne 0 ] ; then |
| 225 echo "@@@STEP_WARNINGS@@@" | 225 echo "@@@STEP_WARNINGS@@@" |
| 226 fi | 226 fi |
| 227 set -e | 227 set -e |
| 228 done | 228 done |
| 229 } | 229 } |
| 230 | 230 |
| 231 # Run tests on an emulator. | 231 # Run tests on an emulator. |
| 232 function bb_run_tests_emulator { | 232 function bb_run_tests_emulator { |
| 233 echo "@@@BUILD_STEP Run Tests on an Emulator@@@" | 233 echo "@@@BUILD_STEP Run Tests on an Emulator@@@" |
| 234 build/android/run_tests.py -e --xvfb --verbose | 234 build/android/run_tests.py -e --xvfb --verbose |
| 235 } | 235 } |
| 236 | 236 |
| 237 # Run tests on an actual device. (Better have one plugged in!) | 237 # Run tests on an actual device. (Better have one plugged in!) |
| 238 function bb_run_tests { | 238 function bb_run_tests { |
| 239 echo "@@@BUILD_STEP Run Tests on actual hardware@@@" | 239 echo "@@@BUILD_STEP Run Tests on actual hardware@@@" |
| 240 build/android/run_tests.py --xvfb --verbose | 240 build/android/run_tests.py --xvfb --verbose |
| 241 } | 241 } |
| 242 | |
| 243 # Run APK tests on an actual device. | |
| 244 function bb_run_apk_tests { | |
| 245 echo "@@@BUILD_STEP Run APK Tests on actual hardware@@@" | |
| 246 tempfile=/tmp/tempfile-$$.txt | |
| 247 # Filter out STEP_FAILURES, we don't want REDNESS on test failures for now. | |
| 248 build/android/run_tests.py --xvfb --verbose --apk=True \ | |
| 249 | sed 's/@@@STEP_FAILURE@@@//g' | tee $tempfile | |
| 250 happy_failure=$(cat $tempfile | grep RUNNER_FAILED | wc -l) | |
| 251 if [[ $happy_failure -eq 0 ]] ; then | |
| 252 echo "@@@STEP_WARNINGS@@@" | |
| 253 fi | |
|
John Grabowski
2012/05/15 22:24:39
rm -f $tempfile
but...
refactor so we have a bb_r
nilesh
2012/05/15 22:59:25
I have not removed the run_tests.py step from bb_n
John Grabowski
2012/05/15 23:06:31
Yes. What I meant was, you did some cut and paste
| |
| 254 } | |
|
John Grabowski
2012/05/15 22:24:39
delete $tempfile when done
nilesh
2012/05/15 22:59:25
Done.
| |
| OLD | NEW |