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

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: Created 6 years, 4 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 | « no previous file | buildbot/buildbot_selector.py » ('j') | buildbot/buildbot_selector.py » ('J')
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 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 ${UP_DOWN_LOAD} DownloadArmBinariesForHWBotsTry ${name} arm-scons.tgz 207 ${UP_DOWN_LOAD} DownloadArmBinariesForHWBotsTry ${name} arm-scons.tgz
208 else 208 else
209 ${UP_DOWN_LOAD} DownloadArmBinariesForHWBots ${name} arm-scons.tgz 209 ${UP_DOWN_LOAD} DownloadArmBinariesForHWBots ${name} arm-scons.tgz
210 fi 210 fi
211 211
212 echo "@@@BUILD_STEP untar_binaries@@@" 212 echo "@@@BUILD_STEP untar_binaries@@@"
213 rm -rf scons-out/ 213 rm -rf scons-out/
214 tar xvfz arm-scons.tgz --no-same-owner 214 tar xvfz arm-scons.tgz --no-same-owner
215 } 215 }
216 216
217 # Build with gyp - this only exercises the trusted TC
218 gyp-mips32-build() {
219 local gypmode="Release"
220 if [ "${BUILD_MODE_HOST}" = "DEBUG" ] ; then
221 gypmode="Debug"
222 fi
223 local toolchain_dir=native_client/toolchain/linux_x86/mips_trusted
224 local extra="-EL -isystem ${toolchain_dir}/usr/include \
225 -Wl,-rpath-link=${toolchain_dir}/lib/mipsel-linux-gnu \
226 -L${toolchain_dir}/lib \
227 -L${toolchain_dir}/lib/mipsel-linux-gnu \
228 -L${toolchain_dir}/usr/lib \
229 -L${toolchain_dir}/usr/lib/mipsel-linux-gnu"
230 # Setup environment for mips32.
231
232 # Chech is MIPS TC already built, if not, build it.
Mark Seaborn 2014/07/31 16:12:30 "Check"
petarj 2014/08/04 00:50:37 Done.
233 if [ ! -f ${toolchain_dir}/bin/mipsel-linux-gnu-gcc ]
234 then tools/trusted_cross_toolchains/trusted-toolchain-creator.mipsel.debian. sh nacl_sdk
235 fi
236
237 export AR=mipsel-linux-gnu-ar
238 export AS=mipsel-linux-gnu-as
239 export CC="mipsel-linux-gnu-gcc ${extra} "
240 export CXX="mipsel-linux-gnu-g++ ${extra} "
241 export LD="mipsel-linux-gnu-g++ ${extra} "
242 export RANLIB=mipsel-linux-gnu-ranlib
243 export SYSROOT
244 export GYP_DEFINES="target_arch=mipsel mips_arch_variant=mips32r2"
245 export GYP_GENERATORS=make
246 # Ubuntu does not have MIPS trusted toolchain, so specify location of
247 # the one that was built.
248 export PATH=$(pwd)/toolchain/linux_x86/mips_trusted/bin:$PATH
249
250 # NOTE: this step is also run implicitly as part of
251 # gclient runhooks --force
252 # it uses the exported env vars so we have to run it again
253 #
254 echo "@@@BUILD_STEP gyp_configure [${gypmode}]@@@"
255 cd ..
256 native_client/build/gyp_nacl native_client/build/all.gyp
257 cd native_client
258
259 echo "@@@BUILD_STEP gyp_compile [${gypmode}]@@@"
260 make -C .. -k -j8 V=1 BUILDTYPE=${gypmode}
261 }
262
217 # Build with gyp - this only exercises the trusted TC and hence this only 263 # Build with gyp - this only exercises the trusted TC and hence this only
218 # makes sense to run for ARM. 264 # makes sense to run for ARM.
219 gyp-arm-build() { 265 gyp-arm-build() {
220 local gypmode="Release" 266 local gypmode="Release"
221 if [ "${BUILD_MODE_HOST}" = "DEBUG" ] ; then 267 if [ "${BUILD_MODE_HOST}" = "DEBUG" ] ; then
222 gypmode="Debug" 268 gypmode="Debug"
223 fi 269 fi
224 local toolchain_dir=native_client/toolchain/linux_x86/arm_trusted 270 local toolchain_dir=native_client/toolchain/linux_x86/arm_trusted
225 local extra="-isystem ${toolchain_dir}/usr/include \ 271 local extra="-isystem ${toolchain_dir}/usr/include \
226 -Wl,-rpath-link=${toolchain_dir}/lib/arm-linux-gnueabihf \ 272 -Wl,-rpath-link=${toolchain_dir}/lib/arm-linux-gnueabihf \
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 ${SCONS_COMMON} ${extra} ${mode} platform=${platform} ${test} || handle-error 342 ${SCONS_COMMON} ${extra} ${mode} platform=${platform} ${test} || handle-error
297 } 343 }
298 344
299 345
300 driver-tests() { 346 driver-tests() {
301 local arch=$1 347 local arch=$1
302 echo "@@@BUILD_STEP driver_tests ${arch}@@@" 348 echo "@@@BUILD_STEP driver_tests ${arch}@@@"
303 ${DRIVER_TESTS} --platform="${arch}" || handle-error 349 ${DRIVER_TESTS} --platform="${arch}" || handle-error
304 } 350 }
305 351
306 352 # QEMU upload bot runs this function, and the ARM hardware download bot runs
307 # QEMU upload bot runs this function, and the hardware download bot runs
308 # mode-buildbot-arm-hw 353 # mode-buildbot-arm-hw
309 mode-buildbot-arm() { 354 mode-buildbot() {
355 local arch=$1
310 FAIL_FAST=false 356 FAIL_FAST=false
311 # "force_emulator=" disables use of QEMU, which enables building 357 # "force_emulator=" disables use of QEMU, which enables building
312 # tests which don't work under QEMU. 358 # tests which don't work under QEMU.
313 local qemuflags="-j8 -k do_not_run_tests=1 force_emulator=" 359 local qemuflags="-j8 -k do_not_run_tests=1 force_emulator="
314 360
315 clobber 361 clobber
316 362
317 gyp-arm-build 363 if [[ ${arch} == "arm" ]] ; then
364 gyp-arm-build
365 elif [[ ${arch} == "mips" ]] ; then
366 gyp-mips32-build
367 fi
318 368
319 # Sanity check 369 # Sanity check
320 scons-stage-noirt "arm" "-j8" "run_hello_world_test" 370 scons-stage-noirt $arch "-j8" "run_hello_world_test"
321 371
322 # Don't run the rest of the tests on qemu, only build them. 372 # Don't run the rest of the tests on qemu, only build them.
323 # QEMU is too flaky for the main waterfall 373 # QEMU is too flaky for the main waterfall
324 374
325 # Normal pexe mode tests 375 # Normal pexe mode tests
326 scons-stage-noirt "arm" "${qemuflags}" "${SCONS_EVERYTHING}" 376 scons-stage-noirt $arch "${qemuflags}" "${SCONS_EVERYTHING}"
327 # This extra step is required to translate the pexes (because translation 377 # This extra step is required to translate the pexes (because translation
328 # happens as part of CommandSelLdrTestNacl and not part of the 378 # happens as part of CommandSelLdrTestNacl and not part of the
329 # build-everything step) 379 # build-everything step)
330 scons-stage-noirt "arm" "${qemuflags}" "${SCONS_S_M}" 380 scons-stage-noirt $arch "${qemuflags}" "${SCONS_S_M}"
331 # Large tests cannot be run in parallel 381 # Large tests cannot be run in parallel
332 scons-stage-noirt "arm" "${qemuflags} -j1" "large_tests" 382 scons-stage-noirt $arch "${qemuflags} -j1" "large_tests"
333 383
334 # also run some tests with the irt 384 # also run some tests with the irt
335 scons-stage-irt "arm" "${qemuflags}" "${SCONS_S_M_IRT}" 385 scons-stage-irt $arch "${qemuflags}" "${SCONS_S_M_IRT}"
336 386
337 # non-pexe-mode tests 387 # non-pexe-mode tests
338 scons-stage-noirt "arm" "${qemuflags} pnacl_generate_pexe=0" "nonpexe_tests" 388 scons-stage-noirt $arch "${qemuflags} pnacl_generate_pexe=0" "nonpexe_tests"
339 389
340 build-sbtc-prerequisites "arm" 390 build-sbtc-prerequisites $arch
341 391
342 scons-stage-irt "arm" \ 392 scons-stage-irt $arch \
343 "${qemuflags} use_sandboxed_translator=1 translate_in_build_step=0" \ 393 "${qemuflags} use_sandboxed_translator=1 translate_in_build_step=0" \
344 "toolchain_tests" 394 "toolchain_tests"
345 scons-stage-irt "arm" \ 395 scons-stage-irt $arch \
346 "${qemuflags} use_sandboxed_translator=1 translate_fast=1 \ 396 "${qemuflags} use_sandboxed_translator=1 translate_fast=1 \
347 translate_in_build_step=0" \ 397 translate_in_build_step=0" \
348 "toolchain_tests" 398 "toolchain_tests"
349 399
350 # Test Non-SFI Mode. 400 # Test Non-SFI Mode (for ARM only).
351 scons-stage-irt "arm" "${qemuflags}" "${SCONS_NONSFI_NEWLIB}" 401 if [[ ${arch} == "arm" ]] ; then
352 scons-stage-irt "arm" "${qemuflags}" "${SCONS_NONSFI}" 402 scons-stage-irt $arch "${qemuflags}" "${SCONS_NONSFI_NEWLIB}"
403 scons-stage-irt $arch "${qemuflags}" "${SCONS_NONSFI}"
404 fi
353 } 405 }
354 406
355 mode-buildbot-arm-hw() { 407 mode-buildbot-arm-hw() {
356 FAIL_FAST=false 408 FAIL_FAST=false
357 local hwflags="-j2 -k naclsdk_validate=0 built_elsewhere=1" 409 local hwflags="-j2 -k naclsdk_validate=0 built_elsewhere=1"
358 410
359 scons-stage-noirt "arm" "${hwflags}" "${SCONS_S_M}" 411 scons-stage-noirt "arm" "${hwflags}" "${SCONS_S_M}"
360 # Large tests cannot be run in parallel 412 # Large tests cannot be run in parallel
361 scons-stage-noirt "arm" "${hwflags} -j1" "large_tests" 413 scons-stage-noirt "arm" "${hwflags} -j1" "large_tests"
362 414
363 # also run some tests with the irt 415 # also run some tests with the irt
364 scons-stage-irt "arm" "${hwflags}" "${SCONS_S_M_IRT}" 416 scons-stage-irt "arm" "${hwflags}" "${SCONS_S_M_IRT}"
365 417
366 scons-stage-noirt "arm" "${hwflags} pnacl_generate_pexe=0" "nonpexe_tests" 418 scons-stage-noirt "arm" "${hwflags} pnacl_generate_pexe=0" "nonpexe_tests"
367 scons-stage-irt "arm" \ 419 scons-stage-irt "arm" \
368 "${hwflags} use_sandboxed_translator=1 translate_in_build_step=0" \ 420 "${hwflags} use_sandboxed_translator=1 translate_in_build_step=0" \
369 "toolchain_tests" 421 "toolchain_tests"
370 scons-stage-irt "arm" \ 422 scons-stage-irt "arm" \
371 "${hwflags} use_sandboxed_translator=1 translate_fast=1 \ 423 "${hwflags} use_sandboxed_translator=1 translate_fast=1 \
372 translate_in_build_step=0" \ 424 translate_in_build_step=0" \
373 "toolchain_tests" 425 "toolchain_tests"
374 426
375 # Test Non-SFI Mode. 427 # Test Non-SFI Mode.
376 scons-stage-irt "arm" "${hwflags}" "${SCONS_NONSFI_NEWLIB}" 428 scons-stage-irt "arm" "${hwflags}" "${SCONS_NONSFI_NEWLIB}"
377 scons-stage-irt "arm" "${hwflags}" "${SCONS_NONSFI}" 429 scons-stage-irt "arm" "${hwflags}" "${SCONS_NONSFI}"
378 } 430 }
379 431
380 mode-trybot-qemu() { 432 mode-trybot-qemu() {
Mark Seaborn 2014/07/31 16:12:30 Derek has a refactoring change out for review whic
433 local arch=$1
381 # Build and actually run the arm tests under qemu, except 434 # Build and actually run the arm tests under qemu, except
382 # sandboxed translation. Hopefully that's a good tradeoff between 435 # sandboxed translation. Hopefully that's a good tradeoff between
383 # flakiness and cycle time. 436 # flakiness and cycle time.
384 FAIL_FAST=false 437 FAIL_FAST=false
385 local qemuflags="-j4 -k" 438 local qemuflags="-j4 -k"
386 clobber 439 clobber
387 gyp-arm-build
388 440
389 scons-stage-noirt "arm" "${qemuflags}" "${SCONS_EVERYTHING}" 441 if [[ ${arch} == "arm" ]] ; then
442 gyp-arm-build
443 elif [[ ${arch} == "mips" ]] ; then
444 gyp-mips32-build
445 fi
446
447
448 scons-stage-noirt $arch "${qemuflags}" "${SCONS_EVERYTHING}"
390 # Large tests cannot be run in parallel 449 # Large tests cannot be run in parallel
391 scons-stage-noirt "arm" "${qemuflags} -j1" "${SCONS_S_M} large_tests" 450 scons-stage-noirt $arch "${qemuflags} -j1" "${SCONS_S_M} large_tests"
392 451
393 # also run some tests with the irt 452 # also run some tests with the irt
394 scons-stage-irt "arm" "${qemuflags}" "${SCONS_S_M_IRT}" 453 scons-stage-irt $arch "${qemuflags}" "${SCONS_S_M_IRT}"
395 454
396 # non-pexe tests 455 # non-pexe tests
397 scons-stage-noirt "arm" "${qemuflags} pnacl_generate_pexe=0" "nonpexe_tests" 456 scons-stage-noirt $arch "${qemuflags} pnacl_generate_pexe=0" "nonpexe_tests"
398 457
399 # Test Non-SFI Mode. 458 # Test Non-SFI Mode (for ARM only).
400 scons-stage-irt "arm" "${qemuflags}" "${SCONS_NONSFI_NEWLIB}" 459 if [[ ${arch} == "arm" ]] ; then
401 scons-stage-irt "arm" "${qemuflags}" "${SCONS_NONSFI}" 460 scons-stage-irt $arch "${qemuflags}" "${SCONS_NONSFI_NEWLIB}"
461 scons-stage-irt $arch "${qemuflags}" "${SCONS_NONSFI}"
462 fi
402 } 463 }
403 464
404 mode-buildbot-arm-dbg() { 465 mode-buildbot-arm-dbg() {
405 BUILD_MODE_HOST=DEDUG 466 BUILD_MODE_HOST=DEDUG
406 mode-buildbot-arm 467 mode-buildbot arm
407 archive-for-hw-bots $(NAME_ARM_UPLOAD) regular 468 archive-for-hw-bots $(NAME_ARM_UPLOAD) regular
408 } 469 }
409 470
410 mode-buildbot-arm-opt() { 471 mode-buildbot-arm-opt() {
411 mode-buildbot-arm 472 mode-buildbot arm
412 archive-for-hw-bots $(NAME_ARM_UPLOAD) regular 473 archive-for-hw-bots $(NAME_ARM_UPLOAD) regular
413 } 474 }
414 475
415 mode-buildbot-arm-try() { 476 mode-buildbot-arm-try() {
416 mode-buildbot-arm 477 mode-buildbot arm
417 archive-for-hw-bots $(NAME_ARM_TRY_UPLOAD) try 478 archive-for-hw-bots $(NAME_ARM_TRY_UPLOAD) try
418 } 479 }
419 480
420 # NOTE: the hw bots are too slow to build stuff on so we just 481 # NOTE: the hw bots are too slow to build stuff on so we just
421 # use pre-built executables 482 # use pre-built executables
422 mode-buildbot-arm-hw-dbg() { 483 mode-buildbot-arm-hw-dbg() {
423 BUILD_MODE_HOST=DEDUG 484 BUILD_MODE_HOST=DEDUG
424 unarchive-for-hw-bots $(NAME_ARM_DOWNLOAD) regular 485 unarchive-for-hw-bots $(NAME_ARM_DOWNLOAD) regular
425 mode-buildbot-arm-hw 486 mode-buildbot-arm-hw
426 } 487 }
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 exit 1 615 exit 1
555 fi 616 fi
556 617
557 "$@" 618 "$@"
558 619
559 if [[ ${RETCODE} != 0 ]]; then 620 if [[ ${RETCODE} != 0 ]]; then
560 echo "@@@BUILD_STEP summary@@@" 621 echo "@@@BUILD_STEP summary@@@"
561 echo There were failed stages. 622 echo There were failed stages.
562 exit ${RETCODE} 623 exit ${RETCODE}
563 fi 624 fi
OLDNEW
« no previous file with comments | « no previous file | buildbot/buildbot_selector.py » ('j') | buildbot/buildbot_selector.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698