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

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: Rebase. 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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 ${UP_DOWN_LOAD} DownloadArmBinariesForHWBotsTry ${name} arm-scons.tgz 180 ${UP_DOWN_LOAD} DownloadArmBinariesForHWBotsTry ${name} arm-scons.tgz
181 else 181 else
182 ${UP_DOWN_LOAD} DownloadArmBinariesForHWBots ${name} arm-scons.tgz 182 ${UP_DOWN_LOAD} DownloadArmBinariesForHWBots ${name} arm-scons.tgz
183 fi 183 fi
184 184
185 echo "@@@BUILD_STEP untar_binaries@@@" 185 echo "@@@BUILD_STEP untar_binaries@@@"
186 rm -rf scons-out/ 186 rm -rf scons-out/
187 tar xvfz arm-scons.tgz --no-same-owner 187 tar xvfz arm-scons.tgz --no-same-owner
188 } 188 }
189 189
190 # Build with gyp - this only exercises the trusted TC
Mark Seaborn 2014/10/10 17:16:37 Doesn't the Gyp build also invoke pnacl-clang? If
petarj 2014/10/13 13:02:02 Done.
191 gyp-mips32-build() {
Mark Seaborn 2014/10/10 17:16:37 Nit: can you put this after the ARM version?
petarj 2014/10/13 13:02:02 Done.
192 local gypmode="Release"
193 if [ "${BUILD_MODE_HOST}" = "DEBUG" ] ; then
194 gypmode="Debug"
Mark Seaborn 2014/10/10 17:16:36 Nit: indent by 2, not 4
petarj 2014/10/13 13:02:02 Done. (I made the change in gyp-arm-build() too)
195 fi
196 local toolchain_dir=native_client/toolchain/linux_x86/mips_trusted
197 local extra="-EL -isystem ${toolchain_dir}/usr/include \
198 -Wl,-rpath-link=${toolchain_dir}/lib/mipsel-linux-gnu \
199 -L${toolchain_dir}/lib \
200 -L${toolchain_dir}/lib/mipsel-linux-gnu \
201 -L${toolchain_dir}/usr/lib \
202 -L${toolchain_dir}/usr/lib/mipsel-linux-gnu"
203 # Setup environment for mips32.
204
205 # Check if MIPS TC has already been built. If not, build it.
206 if [ ! -f ${toolchain_dir}/bin/mipsel-linux-gnu-gcc ]
207 then tools/trusted_cross_toolchains/trusted-toolchain-creator.mipsel.debian. sh nacl_sdk
208 fi
209
210 export AR=mipsel-linux-gnu-ar
211 export AS=mipsel-linux-gnu-as
212 export CC="mipsel-linux-gnu-gcc ${extra} "
Mark Seaborn 2014/10/10 17:16:36 Trailing space not needed?
petarj 2014/10/13 13:02:02 Done. (I made the change in gyp-arm-build() too)
213 export CXX="mipsel-linux-gnu-g++ ${extra} "
214 export LD="mipsel-linux-gnu-g++ ${extra} "
215 export RANLIB=mipsel-linux-gnu-ranlib
216 export SYSROOT
Mark Seaborn 2014/10/10 17:16:36 Not set. Can this be removed?
petarj 2014/10/13 13:02:02 Done. (I made the change in gyp-arm-build() too)
217 export GYP_DEFINES="target_arch=mipsel mips_arch_variant=mips32r2"
218 export GYP_GENERATORS=make
219 # Ubuntu does not have MIPS trusted toolchain, so specify location of
220 # the one that was built.
221 export PATH=$(pwd)/toolchain/linux_x86/mips_trusted/bin:$PATH
Mark Seaborn 2014/10/10 17:16:36 Shouldn't this just be scoped to the Gyp/make invo
petarj 2014/10/13 13:02:02 Done.
222
223 # NOTE: this step is also run implicitly as part of
224 # gclient runhooks --force
225 # it uses the exported env vars so we have to run it again
226 #
227 echo "@@@BUILD_STEP gyp_configure [${gypmode}]@@@"
228 cd ..
229 native_client/build/gyp_nacl native_client/build/all.gyp
230 cd native_client
231
232 echo "@@@BUILD_STEP gyp_compile [${gypmode}]@@@"
233 make -C .. -k -j8 V=1 BUILDTYPE=${gypmode}
234 }
235
190 # Build with gyp - this only exercises the trusted TC and hence this only 236 # Build with gyp - this only exercises the trusted TC and hence this only
191 # makes sense to run for ARM. 237 # makes sense to run for ARM.
192 gyp-arm-build() { 238 gyp-arm-build() {
193 local gypmode="Release" 239 local gypmode="Release"
194 if [ "${BUILD_MODE_HOST}" = "DEBUG" ] ; then 240 if [ "${BUILD_MODE_HOST}" = "DEBUG" ] ; then
195 gypmode="Debug" 241 gypmode="Debug"
196 fi 242 fi
197 local toolchain_dir=native_client/toolchain/linux_x86/arm_trusted 243 local toolchain_dir=native_client/toolchain/linux_x86/arm_trusted
198 local extra="-isystem ${toolchain_dir}/usr/include \ 244 local extra="-isystem ${toolchain_dir}/usr/include \
199 -Wl,-rpath-link=${toolchain_dir}/lib/arm-linux-gnueabihf \ 245 -Wl,-rpath-link=${toolchain_dir}/lib/arm-linux-gnueabihf \
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 translate_in_build_step=0" \ 391 translate_in_build_step=0" \
346 "toolchain_tests" 392 "toolchain_tests"
347 393
348 # Test Non-SFI Mode. 394 # Test Non-SFI Mode.
349 scons-stage-irt "arm" "${hwflags}" "${SCONS_NONSFI_NEWLIB}" 395 scons-stage-irt "arm" "${hwflags}" "${SCONS_NONSFI_NEWLIB}"
350 scons-stage-irt "arm" "${hwflags}" "${SCONS_NONSFI}" 396 scons-stage-irt "arm" "${hwflags}" "${SCONS_NONSFI}"
351 } 397 }
352 398
353 mode-trybot-qemu() { 399 mode-trybot-qemu() {
354 clobber 400 clobber
401 local arch=$1
355 # TODO(dschuff): move the gyp build to buildbot_pnacl.py 402 # TODO(dschuff): move the gyp build to buildbot_pnacl.py
356 gyp-arm-build 403 if [[ ${arch} == "arm" ]] ; then
404 gyp-arm-build
405 elif [[ ${arch} == "mips32" ]] ; then
406 gyp-mips32-build
407 fi
357 408
358 buildbot/buildbot_pnacl.py opt arm pnacl 409 # TODO(petarj): Enable this for MIPS arch too once all the tests pass.
410 if [[ ${arch} == "arm" ]] ; then
411 buildbot/buildbot_pnacl.py opt $arch pnacl
412 fi
359 } 413 }
360 414
361 mode-buildbot-arm-dbg() { 415 mode-buildbot-arm-dbg() {
362 BUILD_MODE_HOST=DEDUG 416 BUILD_MODE_HOST=DEDUG
363 mode-buildbot-arm 417 mode-buildbot-arm
364 archive-for-hw-bots $(NAME_ARM_UPLOAD) regular 418 archive-for-hw-bots $(NAME_ARM_UPLOAD) regular
365 } 419 }
366 420
367 mode-buildbot-arm-opt() { 421 mode-buildbot-arm-opt() {
368 mode-buildbot-arm 422 mode-buildbot-arm
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 exit 1 542 exit 1
489 fi 543 fi
490 544
491 "$@" 545 "$@"
492 546
493 if [[ ${RETCODE} != 0 ]]; then 547 if [[ ${RETCODE} != 0 ]]; then
494 echo "@@@BUILD_STEP summary@@@" 548 echo "@@@BUILD_STEP summary@@@"
495 echo There were failed stages. 549 echo There were failed stages.
496 exit ${RETCODE} 550 exit ${RETCODE}
497 fi 551 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