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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 108 | 108 |
| 109 ${GOMA_DIR}/goma_ctl.sh start | 109 ${GOMA_DIR}/goma_ctl.sh start |
| 110 if [ -f ${goma_dir}/goma.key ]; then | 110 if [ -f ${goma_dir}/goma.key ]; then |
| 111 export GOMA_API_KEY_FILE=${GOMA_DIR}/goma.key | 111 export GOMA_API_KEY_FILE=${GOMA_DIR}/goma.key |
| 112 fi | 112 fi |
| 113 export GOMA_COMPILER_PROXY_DAEMON_MODE=true | 113 export GOMA_COMPILER_PROXY_DAEMON_MODE=true |
| 114 export GOMA_COMPILER_PROXY_RPC_TIMEOUT_SECS=300 | 114 export GOMA_COMPILER_PROXY_RPC_TIMEOUT_SECS=300 |
| 115 export PATH=$GOMA_DIR:$PATH | 115 export PATH=$GOMA_DIR:$PATH |
| 116 } | 116 } |
| 117 | 117 |
| 118 # Temporarily added back when goma disabled | |
| 119 function old_make { | |
| 120 # TODO(michaelbai): how to use ccache in NDK. | |
| 121 if [ -n "${USE_CCACHE}" ]; then | |
| 122 if [ -e "${PREBUILT_CCACHE_PATH}" ]; then | |
| 123 use_ccache_var="$PREBUILT_CCACHE_PATH " | |
| 124 else | |
| 125 use_ccache_var="" | |
| 126 fi | |
| 127 fi | |
| 128 # Only cross-compile if the build is being done either from Chromium's src/ | |
| 129 # directory, or through WebKit, in which case the WEBKIT_ANDROID_BUILD | |
| 130 # environment variable will be defined. WebKit uses a different directory. | |
| 131 if [ -f "$PWD/build/android/envsetup.sh" ] || | |
| 132 [ -n "${WEBKIT_ANDROID_BUILD}" ]; then | |
| 133 CC="${use_ccache_var}${CROSS_CC}" CXX="${use_ccache_var}${CROSS_CXX}" \ | |
| 134 LINK="${CROSS_LINK}" AR="${CROSS_AR}" RANLIB="${CROSS_RANLIB}" \ | |
| 135 command make $* | |
| 136 else | |
| 137 command make $* | |
| 138 fi | |
| 139 } | |
| 140 | |
| 141 # $@: make args. | 118 # $@: make args. |
| 142 # Use goma if possible; degrades to non-Goma if needed. | 119 # Use goma if possible; degrades to non-Goma if needed. |
| 143 function bb_goma_make { | 120 function bb_goma_make { |
| 144 # Disable Goma | 121 # Disable Goma |
| 145 # Seems to work on "Android FYI" | 122 # Seems to work on "Android FYI" |
| 146 # http://build.chromium.org/p/chromium.fyi/builders/Chromium%20Linux%20Androi d/builds/6421/steps/Compile/logs/stdio | 123 # http://build.chromium.org/p/chromium.fyi/builders/Chromium%20Linux%20Androi d/builds/6421/steps/Compile/logs/stdio |
| 147 # and Linux trybots | 124 # and Linux trybots |
| 148 # http://build.chromium.org/p/chromium/builders/Linux%20x64/builds/23995/step s/compile/logs/stdio | 125 # http://build.chromium.org/p/chromium/builders/Linux%20x64/builds/23995/step s/compile/logs/stdio |
| 149 # But not on Android trybots? | 126 # But not on Android trybots? |
| 150 # http://build.chromium.org/p/tryserver.chromium/builders/android/builds/2136 /steps/Compile/logs/stdio | 127 # http://build.chromium.org/p/tryserver.chromium/builders/android/builds/2136 /steps/Compile/logs/stdio |
| 151 old_make -j${JOBS} "$@" | 128 make -j${JOBS} "$@" |
| 152 return | 129 return |
| 153 | 130 |
| 131 # TODO(bulach): to use goma, we should use android_goma_gyp, | |
| 132 # and then just: | |
| 133 # PATH=$GOMA_DIR make -j${JOBS} "$@" | |
|
Ami GONE FROM CHROMIUM
2012/03/14 17:13:18
s/R/R:$PATH/
bulach
2012/03/14 17:36:43
Done.
| |
| 154 bb_setup_goma_internal | 134 bb_setup_goma_internal |
| 155 | 135 |
| 156 if [ "${GOMA_DIR}" = "" ]; then | 136 if [ "${GOMA_DIR}" = "" ]; then |
| 157 make -j${JOBS} "$@" | 137 make -j${JOBS} "$@" |
| 158 return | 138 return |
| 159 fi | 139 fi |
| 160 | 140 |
| 161 HOST_CC=$GOMA_DIR/gcc | 141 HOST_CC=$GOMA_DIR/gcc |
| 162 HOST_CXX=$GOMA_DIR/g++ | 142 HOST_CXX=$GOMA_DIR/g++ |
| 163 TARGET_CC=$(/bin/ls $ANDROID_TOOLCHAIN/*-gcc | head -n1) | 143 TARGET_CC=$(/bin/ls $ANDROID_TOOLCHAIN/*-gcc | head -n1) |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 208 function bb_run_tests_emulator { | 188 function bb_run_tests_emulator { |
| 209 echo "@@@BUILD_STEP Run Tests on an Emulator@@@" | 189 echo "@@@BUILD_STEP Run Tests on an Emulator@@@" |
| 210 build/android/run_tests.py -e --xvfb --verbose | 190 build/android/run_tests.py -e --xvfb --verbose |
| 211 } | 191 } |
| 212 | 192 |
| 213 # Run tests on an actual device. (Better have one plugged in!) | 193 # Run tests on an actual device. (Better have one plugged in!) |
| 214 function bb_run_tests { | 194 function bb_run_tests { |
| 215 echo "@@@BUILD_STEP Run Tests on actual hardware@@@" | 195 echo "@@@BUILD_STEP Run Tests on actual hardware@@@" |
| 216 build/android/run_tests.py --xvfb --verbose | 196 build/android/run_tests.py --xvfb --verbose |
| 217 } | 197 } |
| OLD | NEW |