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

Side by Side Diff: buildbot/buildbot_pnacl.sh

Issue 427153003: [MIPS] Enhance MIPS testing on its buildbot (Closed) Base URL: http://git.chromium.org/native_client/src/native_client.git@master
Patch Set: Update. Created 6 years, 2 months 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
« no previous file with comments | « buildbot/buildbot_lib.py ('k') | buildbot/buildbot_selector.py » ('j') | 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 Native Client Authors. All rights reserved. 2 # Copyright (c) 2012 The Native Client 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 set -o xtrace 6 set -o xtrace
7 set -o nounset 7 set -o nounset
8 set -o errexit 8 set -o errexit
9 9
10 # Tell build.sh and test.sh that we're a bot. 10 # Tell build.sh and test.sh that we're a bot.
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 echo "@@@BUILD_STEP untar_binaries@@@" 191 echo "@@@BUILD_STEP untar_binaries@@@"
192 rm -rf scons-out/ 192 rm -rf scons-out/
193 tar xvfz arm-scons.tgz --no-same-owner 193 tar xvfz arm-scons.tgz --no-same-owner
194 } 194 }
195 195
196 # Build with gyp - this only exercises the trusted TC and hence this only 196 # Build with gyp - this only exercises the trusted TC and hence this only
197 # makes sense to run for ARM. 197 # makes sense to run for ARM.
198 gyp-arm-build() { 198 gyp-arm-build() {
199 local gypmode="Release" 199 local gypmode="Release"
200 if [ "${BUILD_MODE_HOST}" = "DEBUG" ] ; then 200 if [ "${BUILD_MODE_HOST}" = "DEBUG" ] ; then
201 gypmode="Debug" 201 gypmode="Debug"
202 fi 202 fi
203 local toolchain_dir=native_client/toolchain/linux_x86/arm_trusted 203 local toolchain_dir=native_client/toolchain/linux_x86/arm_trusted
204 local extra="-isystem ${toolchain_dir}/usr/include \ 204 local extra="-isystem ${toolchain_dir}/usr/include \
205 -Wl,-rpath-link=${toolchain_dir}/lib/arm-linux-gnueabihf \ 205 -Wl,-rpath-link=${toolchain_dir}/lib/arm-linux-gnueabihf \
206 -L${toolchain_dir}/lib \ 206 -L${toolchain_dir}/lib \
207 -L${toolchain_dir}/lib/arm-linux-gnueabihf \ 207 -L${toolchain_dir}/lib/arm-linux-gnueabihf \
208 -L${toolchain_dir}/usr/lib \ 208 -L${toolchain_dir}/usr/lib \
209 -L${toolchain_dir}/usr/lib/arm-linux-gnueabihf" 209 -L${toolchain_dir}/usr/lib/arm-linux-gnueabihf"
210 # Setup environment for arm. 210 # Setup environment for arm.
211 211
212 export AR=arm-linux-gnueabihf-ar 212 export AR=arm-linux-gnueabihf-ar
213 export AS=arm-linux-gnueabihf-as 213 export AS=arm-linux-gnueabihf-as
214 export CC="arm-linux-gnueabihf-gcc ${extra} " 214 export CC="arm-linux-gnueabihf-gcc ${extra}"
215 export CXX="arm-linux-gnueabihf-g++ ${extra} " 215 export CXX="arm-linux-gnueabihf-g++ ${extra}"
216 export LD="arm-linux-gnueabihf-g++ ${extra} " 216 export LD="arm-linux-gnueabihf-g++ ${extra}"
217 export RANLIB=arm-linux-gnueabihf-ranlib 217 export RANLIB=arm-linux-gnueabihf-ranlib
218 export SYSROOT
219 export GYP_DEFINES="target_arch=arm \ 218 export GYP_DEFINES="target_arch=arm \
220 sysroot=${toolchain_dir} \ 219 sysroot=${toolchain_dir} \
221 linux_use_tcmalloc=0 armv7=1 arm_thumb=1" 220 linux_use_tcmalloc=0 armv7=1 arm_thumb=1"
222 export GYP_GENERATORS=make 221 export GYP_GENERATORS=make
223 222
224 # NOTE: this step is also run implicitly as part of 223 # NOTE: this step is also run implicitly as part of
225 # gclient runhooks --force 224 # gclient runhooks --force
226 # it uses the exported env vars so we have to run it again 225 # it uses the exported env vars so we have to run it again
227 # 226 #
228 echo "@@@BUILD_STEP gyp_configure [${gypmode}]@@@" 227 echo "@@@BUILD_STEP gyp_configure [${gypmode}]@@@"
229 cd .. 228 cd ..
230 native_client/build/gyp_nacl native_client/build/all.gyp 229 native_client/build/gyp_nacl native_client/build/all.gyp
231 cd native_client 230 cd native_client
232 231
233 echo "@@@BUILD_STEP gyp_compile [${gypmode}]@@@" 232 echo "@@@BUILD_STEP gyp_compile [${gypmode}]@@@"
234 make -C .. -k -j8 V=1 BUILDTYPE=${gypmode} 233 make -C .. -k -j8 V=1 BUILDTYPE=${gypmode}
235 } 234 }
236 235
236 # Build with gyp for MIPS.
237 gyp-mips32-build() {
238 local gypmode="Release"
239 if [ "${BUILD_MODE_HOST}" = "DEBUG" ] ; then
240 gypmode="Debug"
241 fi
242 local toolchain_dir=$(pwd)/toolchain/linux_x86/mips_trusted
243 local extra="-EL -isystem ${toolchain_dir}/usr/include \
244 -Wl,-rpath-link=${toolchain_dir}/lib/mipsel-linux-gnu \
245 -L${toolchain_dir}/lib \
246 -L${toolchain_dir}/lib/mipsel-linux-gnu \
247 -L${toolchain_dir}/usr/lib \
248 -L${toolchain_dir}/usr/lib/mipsel-linux-gnu"
249 # Setup environment for mips32.
250
251 # Check if MIPS TC has already been built. If not, build it.
252 if [ ! -f ${toolchain_dir}/bin/mipsel-linux-gnu-gcc ] ; then
253 tools/trusted_cross_toolchains/trusted-toolchain-creator.mipsel.debian.sh \
254 nacl_sdk
255 fi
256
257 export AR="$toolchain_dir/bin/mipsel-linux-gnu-ar"
258 export AS="$toolchain_dir/bin/mipsel-linux-gnu-as"
259 export CC="$toolchain_dir/bin/mipsel-linux-gnu-gcc ${extra}"
260 export CXX="$toolchain_dir/bin/mipsel-linux-gnu-g++ ${extra}"
261 export LD="$toolchain_dir/bin/mipsel-linux-gnu-g++ ${extra}"
262 export RANLIB="$toolchain_dir/bin/mipsel-linux-gnu-ranlib"
263 export GYP_DEFINES="target_arch=mipsel mips_arch_variant=mips32r2"
264 export GYP_GENERATORS=make
265
266 # NOTE: this step is also run implicitly as part of
267 # gclient runhooks --force
268 # it uses the exported env vars so we have to run it again
269 #
270 echo "@@@BUILD_STEP gyp_configure [${gypmode}]@@@"
271 cd ..
272 native_client/build/gyp_nacl native_client/build/all.gyp
273 cd native_client
274
275 echo "@@@BUILD_STEP gyp_compile [${gypmode}]@@@"
276 make -C .. -k -j8 V=1 BUILDTYPE=${gypmode}
277 }
278
237 build-sbtc-prerequisites() { 279 build-sbtc-prerequisites() {
238 local platform=$1 280 local platform=$1
239 # Sandboxed translators currently only require irt_core since they do not 281 # Sandboxed translators currently only require irt_core since they do not
240 # use PPAPI. 282 # use PPAPI.
241 ${SCONS_COMMON} platform=${platform} sel_ldr sel_universal irt_core 283 ${SCONS_COMMON} platform=${platform} sel_ldr sel_universal irt_core
242 } 284 }
243 285
244 # Run a single invocation of scons as its own buildbot stage and handle errors 286 # Run a single invocation of scons as its own buildbot stage and handle errors
245 scons-stage-irt() { 287 scons-stage-irt() {
246 local platform=$1 288 local platform=$1
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 397
356 # Test Non-SFI Mode. 398 # Test Non-SFI Mode.
357 scons-stage-irt "arm" "${hwflags}" "${SCONS_NONSFI_NEWLIB}" 399 scons-stage-irt "arm" "${hwflags}" "${SCONS_NONSFI_NEWLIB}"
358 scons-stage-irt "arm" "${hwflags}" \ 400 scons-stage-irt "arm" "${hwflags}" \
359 "${SCONS_NONSFI_NEWLIB_NOPNACL_GENERATE_PEXE}" 401 "${SCONS_NONSFI_NEWLIB_NOPNACL_GENERATE_PEXE}"
360 scons-stage-irt "arm" "${hwflags}" "${SCONS_NONSFI}" 402 scons-stage-irt "arm" "${hwflags}" "${SCONS_NONSFI}"
361 } 403 }
362 404
363 mode-trybot-qemu() { 405 mode-trybot-qemu() {
364 clobber 406 clobber
407 local arch=$1
365 # TODO(dschuff): move the gyp build to buildbot_pnacl.py 408 # TODO(dschuff): move the gyp build to buildbot_pnacl.py
366 gyp-arm-build 409 if [[ ${arch} == "arm" ]] ; then
410 gyp-arm-build
411 elif [[ ${arch} == "mips32" ]] ; then
412 gyp-mips32-build
413 fi
367 414
368 buildbot/buildbot_pnacl.py opt arm pnacl 415 # TODO(petarj): Enable this for MIPS arch too once all the tests pass.
416 if [[ ${arch} == "arm" ]] ; then
417 buildbot/buildbot_pnacl.py opt $arch pnacl
418 fi
369 } 419 }
370 420
371 mode-buildbot-arm-dbg() { 421 mode-buildbot-arm-dbg() {
372 BUILD_MODE_HOST=DEDUG 422 BUILD_MODE_HOST=DEDUG
373 mode-buildbot-arm 423 mode-buildbot-arm
374 archive-for-hw-bots $(NAME_ARM_UPLOAD) regular 424 archive-for-hw-bots $(NAME_ARM_UPLOAD) regular
375 } 425 }
376 426
377 mode-buildbot-arm-opt() { 427 mode-buildbot-arm-opt() {
378 mode-buildbot-arm 428 mode-buildbot-arm
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 exit 1 548 exit 1
499 fi 549 fi
500 550
501 "$@" 551 "$@"
502 552
503 if [[ ${RETCODE} != 0 ]]; then 553 if [[ ${RETCODE} != 0 ]]; then
504 echo "@@@BUILD_STEP summary@@@" 554 echo "@@@BUILD_STEP summary@@@"
505 echo There were failed stages. 555 echo There were failed stages.
506 exit ${RETCODE} 556 exit ${RETCODE}
507 fi 557 fi
OLDNEW
« no previous file with comments | « buildbot/buildbot_lib.py ('k') | buildbot/buildbot_selector.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698