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

Side by Side Diff: buildbot/buildbot_pnacl.sh

Issue 426763002: Further deduplicate and simplify PNaCl SCons testing (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: rebase 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 | Annotate | Revision Log
« buildbot/buildbot_pnacl.py ('K') | « buildbot/buildbot_pnacl.py ('k') | no next file » | 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 readonly SCONS_NONSFI="nonsfi_nacl=1 ${SCONS_NONSFI_TESTS}" 76 readonly SCONS_NONSFI="nonsfi_nacl=1 ${SCONS_NONSFI_TESTS}"
77 77
78 # subset of tests used on toolchain builders 78 # subset of tests used on toolchain builders
79 readonly SCONS_TC_TESTS="small_tests medium_tests" 79 readonly SCONS_TC_TESTS="small_tests medium_tests"
80 80
81 readonly SCONS_COMMON="./scons --verbose bitcode=1" 81 readonly SCONS_COMMON="./scons --verbose bitcode=1"
82 readonly UP_DOWN_LOAD="buildbot/file_up_down_load.sh" 82 readonly UP_DOWN_LOAD="buildbot/file_up_down_load.sh"
83 # This script is used by toolchain bots (i.e. tc-xxx functions) 83 # This script is used by toolchain bots (i.e. tc-xxx functions)
84 readonly PNACL_BUILD="pnacl/build.sh" 84 readonly PNACL_BUILD="pnacl/build.sh"
85 readonly DRIVER_TESTS="pnacl/driver/tests/driver_tests.py" 85 readonly DRIVER_TESTS="pnacl/driver/tests/driver_tests.py"
86 readonly BUILDBOT_PNACL_PY="buildbot/buildbot_pnacl.py"
86 87
87 88
88 tc-build-translator() { 89 tc-build-translator() {
89 echo @@@BUILD_STEP compile_translator@@@ 90 echo @@@BUILD_STEP compile_translator@@@
90 ${PNACL_BUILD} translator-clean-all 91 ${PNACL_BUILD} translator-clean-all
91 ${PNACL_BUILD} translator-all 92 ${PNACL_BUILD} translator-all
92 } 93 }
93 94
94 tc-prune-translator-pexes() { 95 tc-prune-translator-pexes() {
95 echo @@@BUILD_STEP prune_translator_pexe@@@ 96 echo @@@BUILD_STEP prune_translator_pexe@@@
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 "${hwflags} use_sandboxed_translator=1 translate_fast=1 \ 374 "${hwflags} use_sandboxed_translator=1 translate_fast=1 \
374 translate_in_build_step=0" \ 375 translate_in_build_step=0" \
375 "toolchain_tests" 376 "toolchain_tests"
376 377
377 # Test Non-SFI Mode. 378 # Test Non-SFI Mode.
378 scons-stage-irt "arm" "${hwflags}" "${SCONS_NONSFI_NEWLIB}" 379 scons-stage-irt "arm" "${hwflags}" "${SCONS_NONSFI_NEWLIB}"
379 scons-stage-irt "arm" "${hwflags}" "${SCONS_NONSFI}" 380 scons-stage-irt "arm" "${hwflags}" "${SCONS_NONSFI}"
380 } 381 }
381 382
382 mode-trybot-qemu() { 383 mode-trybot-qemu() {
383 # Build and actually run the arm tests under qemu, except
384 # sandboxed translation. Hopefully that's a good tradeoff between
385 # flakiness and cycle time.
386 FAIL_FAST=false
387 local qemuflags="-j4 -k"
388 clobber 384 clobber
385 # TODO(dschuff): move the gyp build to buildbot_pnacl.py
389 gyp-arm-build 386 gyp-arm-build
390 387
391 scons-stage-noirt "arm" "${qemuflags}" "${SCONS_EVERYTHING}" 388 ${BUILDBOT_PNACL_PY} opt arm pnacl
Mark Seaborn 2014/07/31 15:52:03 Suggestion: Could you just write buildbot/buildbo
Derek Schuff 2014/07/31 16:18:09 I actually agree, although all of our shell script
392 # Large tests cannot be run in parallel
393 scons-stage-noirt "arm" "${qemuflags} -j1" "${SCONS_S_M} large_tests"
394
395 # also run some tests with the irt
396 scons-stage-irt "arm" "${qemuflags}" "${SCONS_S_M_IRT}"
397
398 # non-pexe tests
399 scons-stage-noirt "arm" "${qemuflags} pnacl_generate_pexe=0" "nonpexe_tests"
400
401 # Test Non-SFI Mode.
402 scons-stage-irt "arm" "${qemuflags}" "${SCONS_NONSFI_NEWLIB}"
403 scons-stage-irt "arm" "${qemuflags}" "${SCONS_NONSFI}"
404 } 389 }
405 390
406 mode-buildbot-arm-dbg() { 391 mode-buildbot-arm-dbg() {
407 BUILD_MODE_HOST=DEDUG 392 BUILD_MODE_HOST=DEDUG
408 mode-buildbot-arm 393 mode-buildbot-arm
409 archive-for-hw-bots $(NAME_ARM_UPLOAD) regular 394 archive-for-hw-bots $(NAME_ARM_UPLOAD) regular
410 } 395 }
411 396
412 mode-buildbot-arm-opt() { 397 mode-buildbot-arm-opt() {
413 mode-buildbot-arm 398 mode-buildbot-arm
(...skipping 26 matching lines...) Expand all
440 # These 2 functions are also suitable for local TC sanity testing. 425 # These 2 functions are also suitable for local TC sanity testing.
441 tc-tests-all() { 426 tc-tests-all() {
442 local is_try=$1 427 local is_try=$1
443 428
444 local label="pnacl_newlib_dir=toolchain/${PNACL_TOOLCHAIN_DIR}" 429 local label="pnacl_newlib_dir=toolchain/${PNACL_TOOLCHAIN_DIR}"
445 local scons_flags="-k skip_trusted_tests=1 -j8 ${label}" 430 local scons_flags="-k skip_trusted_tests=1 -j8 ${label}"
446 431
447 # newlib 432 # newlib
448 for arch in x86-32 x86-64 arm; do 433 for arch in x86-32 x86-64 arm; do
449 driver-tests "${arch}" 434 driver-tests "${arch}"
450 scons-stage-noirt "$arch" "${scons_flags}" "${SCONS_TC_TESTS}"
451 # Large tests cannot be run in parallel
452 scons-stage-noirt "$arch" "${scons_flags} -j1" "large_tests"
453 scons-stage-noirt "$arch" "${scons_flags} pnacl_generate_pexe=0" \
454 "nonpexe_tests"
455 done 435 done
456 436
457 # Small set of sbtc tests w/ and without translate_fast=1. 437 # All the SCons tests (the same ones run by the main waterfall bot)
458 scons-stage-irt "x86-32" "${scons_flags} use_sandboxed_translator=1" \ 438 for arch in 32 64 arm; do
459 "toolchain_tests" 439 ${BUILDBOT_PNACL_PY} opt "${arch}" pnacl
460 scons-stage-irt "x86-32" \ 440 done
461 "${scons_flags} use_sandboxed_translator=1 translate_fast=1" \
462 "toolchain_tests"
463 scons-stage-irt "x86-64" "${scons_flags} use_sandboxed_translator=1" \
464 "toolchain_tests"
465 scons-stage-irt "x86-64" \
466 "${scons_flags} use_sandboxed_translator=1 translate_fast=1" \
467 "toolchain_tests"
468 # Smaller set of sbtc tests for ARM because qemu is flaky.
469 scons-stage-irt "arm" "${scons_flags} use_sandboxed_translator=1" \
470 "run_hello_world_test"
471 scons-stage-irt "arm" \
472 "${scons_flags} use_sandboxed_translator=1 translate_fast=1" \
473 "run_hello_world_test"
474
475 # Test Non-SFI Mode.
476 scons-stage-irt "x86-32" "${scons_flags}" "${SCONS_NONSFI}"
477 scons-stage-irt "arm" "${scons_flags}" "${SCONS_NONSFI}"
478
479 # Test unsandboxed mode.
480 scons-stage-irt "x86-32" "${scons_flags}" "pnacl_unsandboxed=1" \
481 "run_hello_world_test_irt"
482 441
483 # Run the GCC torture tests just for x86-32. Testing a single 442 # Run the GCC torture tests just for x86-32. Testing a single
484 # architecture gives good coverage without taking too long. We 443 # architecture gives good coverage without taking too long. We
485 # don't test x86-64 here because some of the torture tests fail on 444 # don't test x86-64 here because some of the torture tests fail on
486 # the x86-64 toolchain trybot (though not the buildbots, apparently 445 # the x86-64 toolchain trybot (though not the buildbots, apparently
487 # due to a hardware difference: 446 # due to a hardware difference:
488 # https://code.google.com/p/nativeclient/issues/detail?id=3697). 447 # https://code.google.com/p/nativeclient/issues/detail?id=3697).
448
489 # Build the SDK libs first so that linking will succeed. 449 # Build the SDK libs first so that linking will succeed.
490 echo "@@@BUILD_STEP sdk libs @@@" 450 echo "@@@BUILD_STEP sdk libs @@@"
491 ${PNACL_BUILD} sdk 451 ${PNACL_BUILD} sdk
452 ./scons --verbose platform=x86-32 -j8 sel_ldr irt_core
492 453
493 echo "@@@BUILD_STEP torture_tests x86-32 @@@" 454 echo "@@@BUILD_STEP torture_tests x86-32 @@@"
494 tools/toolchain_tester/torture_test.py pnacl x86-32 --verbose \ 455 tools/toolchain_tester/torture_test.py pnacl x86-32 --verbose \
495 --concurrency=8 || handle-error 456 --concurrency=8 || handle-error
496 } 457 }
497 458
498 tc-tests-fast() { 459 tc-tests-fast() {
499 local arch="$1" 460 local arch="$1"
500 local scons_flags="-k skip_trusted_tests=1" 461 local scons_flags="-k skip_trusted_tests=1"
501 462
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 exit 1 517 exit 1
557 fi 518 fi
558 519
559 "$@" 520 "$@"
560 521
561 if [[ ${RETCODE} != 0 ]]; then 522 if [[ ${RETCODE} != 0 ]]; then
562 echo "@@@BUILD_STEP summary@@@" 523 echo "@@@BUILD_STEP summary@@@"
563 echo There were failed stages. 524 echo There were failed stages.
564 exit ${RETCODE} 525 exit ${RETCODE}
565 fi 526 fi
OLDNEW
« buildbot/buildbot_pnacl.py ('K') | « buildbot/buildbot_pnacl.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698