Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 74 readonly SCONS_NONSFI="nonsfi_nacl=1 ${SCONS_NONSFI_TESTS}" | 74 readonly SCONS_NONSFI="nonsfi_nacl=1 ${SCONS_NONSFI_TESTS}" |
| 75 | 75 |
| 76 # subset of tests used on toolchain builders | 76 # subset of tests used on toolchain builders |
| 77 readonly SCONS_TC_TESTS="small_tests medium_tests" | 77 readonly SCONS_TC_TESTS="small_tests medium_tests" |
| 78 | 78 |
| 79 readonly SCONS_COMMON="./scons --verbose bitcode=1" | 79 readonly SCONS_COMMON="./scons --verbose bitcode=1" |
| 80 readonly UP_DOWN_LOAD="buildbot/file_up_down_load.sh" | 80 readonly UP_DOWN_LOAD="buildbot/file_up_down_load.sh" |
| 81 # This script is used by toolchain bots (i.e. tc-xxx functions) | 81 # This script is used by toolchain bots (i.e. tc-xxx functions) |
| 82 readonly PNACL_BUILD="pnacl/build.sh" | 82 readonly PNACL_BUILD="pnacl/build.sh" |
| 83 readonly DRIVER_TESTS="pnacl/driver/tests/driver_tests.py" | 83 readonly DRIVER_TESTS="pnacl/driver/tests/driver_tests.py" |
| 84 readonly BUILDBOT_PNACL_PY="buildbot/buildbot_pnacl.py" | |
| 84 | 85 |
| 85 | 86 |
| 86 tc-build-translator() { | 87 tc-build-translator() { |
| 87 echo @@@BUILD_STEP compile_translator@@@ | 88 echo @@@BUILD_STEP compile_translator@@@ |
| 88 ${PNACL_BUILD} translator-clean-all | 89 ${PNACL_BUILD} translator-clean-all |
| 89 ${PNACL_BUILD} translator-all | 90 ${PNACL_BUILD} translator-all |
| 90 } | 91 } |
| 91 | 92 |
| 92 tc-prune-translator-pexes() { | 93 tc-prune-translator-pexes() { |
| 93 echo @@@BUILD_STEP prune_translator_pexe@@@ | 94 echo @@@BUILD_STEP prune_translator_pexe@@@ |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 341 | 342 |
| 342 scons-stage-irt "arm" \ | 343 scons-stage-irt "arm" \ |
| 343 "${qemuflags} use_sandboxed_translator=1 translate_in_build_step=0" \ | 344 "${qemuflags} use_sandboxed_translator=1 translate_in_build_step=0" \ |
| 344 "toolchain_tests" | 345 "toolchain_tests" |
| 345 scons-stage-irt "arm" \ | 346 scons-stage-irt "arm" \ |
| 346 "${qemuflags} use_sandboxed_translator=1 translate_fast=1 \ | 347 "${qemuflags} use_sandboxed_translator=1 translate_fast=1 \ |
| 347 translate_in_build_step=0" \ | 348 translate_in_build_step=0" \ |
| 348 "toolchain_tests" | 349 "toolchain_tests" |
| 349 | 350 |
| 350 # Test Non-SFI Mode. | 351 # Test Non-SFI Mode. |
| 351 scons-stage-irt "arm" "${qemuflags}" "${SCONS_NONSFI_NEWLIB}" | 352 scons-stage-irt "arm" "${qemuflags}" "${SCONS_NONSFI_NEWLIB}" |
|
Mark Seaborn
2014/07/29 17:11:33
Can you convert this (mode-buildbot-arm*) too?
Ot
Derek Schuff
2014/07/29 18:41:50
The ARM buildbot still matches the nacl-arm_opt_pa
| |
| 352 scons-stage-irt "arm" "${qemuflags}" "${SCONS_NONSFI}" | 353 scons-stage-irt "arm" "${qemuflags}" "${SCONS_NONSFI}" |
| 353 } | 354 } |
| 354 | 355 |
| 355 mode-buildbot-arm-hw() { | 356 mode-buildbot-arm-hw() { |
| 356 FAIL_FAST=false | 357 FAIL_FAST=false |
| 357 local hwflags="-j2 -k naclsdk_validate=0 built_elsewhere=1" | 358 local hwflags="-j2 -k naclsdk_validate=0 built_elsewhere=1" |
| 358 | 359 |
| 359 scons-stage-noirt "arm" "${hwflags}" "${SCONS_S_M}" | 360 scons-stage-noirt "arm" "${hwflags}" "${SCONS_S_M}" |
| 360 # Large tests cannot be run in parallel | 361 # Large tests cannot be run in parallel |
| 361 scons-stage-noirt "arm" "${hwflags} -j1" "large_tests" | 362 scons-stage-noirt "arm" "${hwflags} -j1" "large_tests" |
| 362 | 363 |
| 363 # also run some tests with the irt | 364 # also run some tests with the irt |
| 364 scons-stage-irt "arm" "${hwflags}" "${SCONS_S_M_IRT}" | 365 scons-stage-irt "arm" "${hwflags}" "${SCONS_S_M_IRT}" |
| 365 | 366 |
| 366 scons-stage-noirt "arm" "${hwflags} pnacl_generate_pexe=0" "nonpexe_tests" | 367 scons-stage-noirt "arm" "${hwflags} pnacl_generate_pexe=0" "nonpexe_tests" |
| 367 scons-stage-irt "arm" \ | 368 scons-stage-irt "arm" \ |
| 368 "${hwflags} use_sandboxed_translator=1 translate_in_build_step=0" \ | 369 "${hwflags} use_sandboxed_translator=1 translate_in_build_step=0" \ |
| 369 "toolchain_tests" | 370 "toolchain_tests" |
| 370 scons-stage-irt "arm" \ | 371 scons-stage-irt "arm" \ |
| 371 "${hwflags} use_sandboxed_translator=1 translate_fast=1 \ | 372 "${hwflags} use_sandboxed_translator=1 translate_fast=1 \ |
| 372 translate_in_build_step=0" \ | 373 translate_in_build_step=0" \ |
| 373 "toolchain_tests" | 374 "toolchain_tests" |
| 374 | 375 |
| 375 # Test Non-SFI Mode. | 376 # Test Non-SFI Mode. |
| 376 scons-stage-irt "arm" "${hwflags}" "${SCONS_NONSFI_NEWLIB}" | 377 scons-stage-irt "arm" "${hwflags}" "${SCONS_NONSFI_NEWLIB}" |
| 377 scons-stage-irt "arm" "${hwflags}" "${SCONS_NONSFI}" | 378 scons-stage-irt "arm" "${hwflags}" "${SCONS_NONSFI}" |
| 378 } | 379 } |
| 379 | 380 |
| 380 mode-trybot-qemu() { | 381 mode-trybot-qemu() { |
| 381 # Build and actually run the arm tests under qemu, except | |
| 382 # sandboxed translation. Hopefully that's a good tradeoff between | |
| 383 # flakiness and cycle time. | |
| 384 FAIL_FAST=false | |
| 385 local qemuflags="-j4 -k" | |
| 386 clobber | 382 clobber |
| 383 # TODO(dschuff): move the gyp build to buildbot_pnacl.py | |
| 387 gyp-arm-build | 384 gyp-arm-build |
| 388 | 385 |
| 389 scons-stage-noirt "arm" "${qemuflags}" "${SCONS_EVERYTHING}" | 386 ${BUILDBOT_PNACL_PY} opt arm pnacl |
| 390 # Large tests cannot be run in parallel | |
| 391 scons-stage-noirt "arm" "${qemuflags} -j1" "${SCONS_S_M} large_tests" | |
| 392 | |
| 393 # also run some tests with the irt | |
| 394 scons-stage-irt "arm" "${qemuflags}" "${SCONS_S_M_IRT}" | |
| 395 | |
| 396 # non-pexe tests | |
| 397 scons-stage-noirt "arm" "${qemuflags} pnacl_generate_pexe=0" "nonpexe_tests" | |
| 398 | |
| 399 # Test Non-SFI Mode. | |
| 400 scons-stage-irt "arm" "${qemuflags}" "${SCONS_NONSFI_NEWLIB}" | |
| 401 scons-stage-irt "arm" "${qemuflags}" "${SCONS_NONSFI}" | |
| 402 } | 387 } |
| 403 | 388 |
| 404 mode-buildbot-arm-dbg() { | 389 mode-buildbot-arm-dbg() { |
| 405 BUILD_MODE_HOST=DEDUG | 390 BUILD_MODE_HOST=DEDUG |
| 406 mode-buildbot-arm | 391 mode-buildbot-arm |
| 407 archive-for-hw-bots $(NAME_ARM_UPLOAD) regular | 392 archive-for-hw-bots $(NAME_ARM_UPLOAD) regular |
| 408 } | 393 } |
| 409 | 394 |
| 410 mode-buildbot-arm-opt() { | 395 mode-buildbot-arm-opt() { |
| 411 mode-buildbot-arm | 396 mode-buildbot-arm |
| (...skipping 26 matching lines...) Expand all Loading... | |
| 438 # These 2 functions are also suitable for local TC sanity testing. | 423 # These 2 functions are also suitable for local TC sanity testing. |
| 439 tc-tests-all() { | 424 tc-tests-all() { |
| 440 local is_try=$1 | 425 local is_try=$1 |
| 441 | 426 |
| 442 local label="pnacl_newlib_dir=toolchain/${PNACL_TOOLCHAIN_DIR}" | 427 local label="pnacl_newlib_dir=toolchain/${PNACL_TOOLCHAIN_DIR}" |
| 443 local scons_flags="-k skip_trusted_tests=1 -j8 ${label}" | 428 local scons_flags="-k skip_trusted_tests=1 -j8 ${label}" |
| 444 | 429 |
| 445 # newlib | 430 # newlib |
| 446 for arch in x86-32 x86-64 arm; do | 431 for arch in x86-32 x86-64 arm; do |
| 447 driver-tests "${arch}" | 432 driver-tests "${arch}" |
| 448 scons-stage-noirt "$arch" "${scons_flags}" "${SCONS_TC_TESTS}" | |
| 449 # Large tests cannot be run in parallel | |
| 450 scons-stage-noirt "$arch" "${scons_flags} -j1" "large_tests" | |
| 451 scons-stage-noirt "$arch" "${scons_flags} pnacl_generate_pexe=0" \ | |
| 452 "nonpexe_tests" | |
| 453 done | 433 done |
| 454 | 434 |
| 455 # Small set of sbtc tests w/ and without translate_fast=1. | 435 # All the SCons tests (the same ones run by the main waterfall bot) |
| 456 scons-stage-irt "x86-32" "${scons_flags} use_sandboxed_translator=1" \ | 436 for arch in 32 64 arm; do |
| 457 "toolchain_tests" | 437 ${BUILDBOT_PNACL_PY} opt "${arch}" pnacl |
| 458 scons-stage-irt "x86-32" \ | 438 done |
| 459 "${scons_flags} use_sandboxed_translator=1 translate_fast=1" \ | |
| 460 "toolchain_tests" | |
| 461 scons-stage-irt "x86-64" "${scons_flags} use_sandboxed_translator=1" \ | |
| 462 "toolchain_tests" | |
| 463 scons-stage-irt "x86-64" \ | |
| 464 "${scons_flags} use_sandboxed_translator=1 translate_fast=1" \ | |
| 465 "toolchain_tests" | |
| 466 # Smaller set of sbtc tests for ARM because qemu is flaky. | |
| 467 scons-stage-irt "arm" "${scons_flags} use_sandboxed_translator=1" \ | |
| 468 "run_hello_world_test" | |
| 469 scons-stage-irt "arm" \ | |
| 470 "${scons_flags} use_sandboxed_translator=1 translate_fast=1" \ | |
| 471 "run_hello_world_test" | |
| 472 | |
| 473 # Test Non-SFI Mode. | |
| 474 scons-stage-irt "x86-32" "${scons_flags}" "${SCONS_NONSFI}" | |
| 475 scons-stage-irt "arm" "${scons_flags}" "${SCONS_NONSFI}" | |
| 476 | |
| 477 # Test unsandboxed mode. | |
| 478 scons-stage-irt "x86-32" "${scons_flags}" "pnacl_unsandboxed=1" \ | |
| 479 "run_hello_world_test_irt" | |
| 480 | 439 |
| 481 # Run the GCC torture tests just for x86-32. Testing a single | 440 # Run the GCC torture tests just for x86-32. Testing a single |
| 482 # architecture gives good coverage without taking too long. We | 441 # architecture gives good coverage without taking too long. We |
| 483 # don't test x86-64 here because some of the torture tests fail on | 442 # don't test x86-64 here because some of the torture tests fail on |
| 484 # the x86-64 toolchain trybot (though not the buildbots, apparently | 443 # the x86-64 toolchain trybot (though not the buildbots, apparently |
| 485 # due to a hardware difference: | 444 # due to a hardware difference: |
| 486 # https://code.google.com/p/nativeclient/issues/detail?id=3697). | 445 # https://code.google.com/p/nativeclient/issues/detail?id=3697). |
| 446 | |
| 487 # Build the SDK libs first so that linking will succeed. | 447 # Build the SDK libs first so that linking will succeed. |
| 488 echo "@@@BUILD_STEP sdk libs @@@" | 448 echo "@@@BUILD_STEP sdk libs @@@" |
| 489 ${PNACL_BUILD} sdk | 449 ${PNACL_BUILD} sdk |
| 450 ./scons --verbose platform=x86-32 -j8 sel_ldr | |
|
Mark Seaborn
2014/07/29 17:11:33
I'm curious: How come this isn't covered by BUILDB
Derek Schuff
2014/07/29 18:41:50
It's because the python version clobbers all the s
| |
| 490 | 451 |
| 491 echo "@@@BUILD_STEP torture_tests x86-32 @@@" | 452 echo "@@@BUILD_STEP torture_tests x86-32 @@@" |
| 492 tools/toolchain_tester/torture_test.py pnacl x86-32 --verbose \ | 453 tools/toolchain_tester/torture_test.py pnacl x86-32 --verbose \ |
| 493 --concurrency=8 || handle-error | 454 --concurrency=8 || handle-error |
| 494 } | 455 } |
| 495 | 456 |
| 496 tc-tests-fast() { | 457 tc-tests-fast() { |
| 497 local arch="$1" | 458 local arch="$1" |
| 498 local scons_flags="-k skip_trusted_tests=1" | 459 local scons_flags="-k skip_trusted_tests=1" |
| 499 | 460 |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 554 exit 1 | 515 exit 1 |
| 555 fi | 516 fi |
| 556 | 517 |
| 557 "$@" | 518 "$@" |
| 558 | 519 |
| 559 if [[ ${RETCODE} != 0 ]]; then | 520 if [[ ${RETCODE} != 0 ]]; then |
| 560 echo "@@@BUILD_STEP summary@@@" | 521 echo "@@@BUILD_STEP summary@@@" |
| 561 echo There were failed stages. | 522 echo There were failed stages. |
| 562 exit ${RETCODE} | 523 exit ${RETCODE} |
| 563 fi | 524 fi |
| OLD | NEW |