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 11 matching lines...) Expand all Loading... | |
| 22 # This remembers when any build steps failed, but we ended up continuing. | 22 # This remembers when any build steps failed, but we ended up continuing. |
| 23 RETCODE=0 | 23 RETCODE=0 |
| 24 # For scons builds an empty target indicates all targets should be built. | 24 # For scons builds an empty target indicates all targets should be built. |
| 25 # This does not run any tests, though. | 25 # This does not run any tests, though. |
| 26 # Large tests are not included in this group because they cannot be run | 26 # Large tests are not included in this group because they cannot be run |
| 27 # in parallel (they can do things like bind to local TCP ports). Large | 27 # in parallel (they can do things like bind to local TCP ports). Large |
| 28 # tests are run separately in the functions below. | 28 # tests are run separately in the functions below. |
| 29 readonly SCONS_EVERYTHING="" | 29 readonly SCONS_EVERYTHING="" |
| 30 readonly SCONS_S_M="small_tests medium_tests" | 30 readonly SCONS_S_M="small_tests medium_tests" |
| 31 readonly SCONS_S_M_IRT="small_tests_irt medium_tests_irt" | 31 readonly SCONS_S_M_IRT="small_tests_irt medium_tests_irt" |
| 32 # TODO(mseaborn): Enable more tests for Non-SFI Mode when they pass. | |
| 33 readonly SCONS_NONSFI="nonsfi_nacl=1 run_hello_world_test_irt" | |
| 32 # subset of tests used on toolchain builders | 34 # subset of tests used on toolchain builders |
| 33 readonly SCONS_TC_TESTS="small_tests medium_tests" | 35 readonly SCONS_TC_TESTS="small_tests medium_tests" |
| 34 | 36 |
| 35 readonly SCONS_COMMON="./scons --verbose bitcode=1" | 37 readonly SCONS_COMMON="./scons --verbose bitcode=1" |
| 36 readonly UP_DOWN_LOAD="buildbot/file_up_down_load.sh" | 38 readonly UP_DOWN_LOAD="buildbot/file_up_down_load.sh" |
| 37 # This script is used by toolchain bots (i.e. tc-xxx functions) | 39 # This script is used by toolchain bots (i.e. tc-xxx functions) |
| 38 readonly PNACL_BUILD="pnacl/build.sh" | 40 readonly PNACL_BUILD="pnacl/build.sh" |
| 39 readonly LLVM_TEST="pnacl/scripts/llvm-test.py" | 41 readonly LLVM_TEST="pnacl/scripts/llvm-test.py" |
| 40 readonly DRIVER_TESTS="pnacl/driver/tests/driver_tests.py" | 42 readonly DRIVER_TESTS="pnacl/driver/tests/driver_tests.py" |
| 41 readonly ACCEPTABLE_TOOLCHAIN_SIZE_MB=80 | 43 readonly ACCEPTABLE_TOOLCHAIN_SIZE_MB=80 |
| (...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 419 | 421 |
| 420 build-sbtc-prerequisites "arm" | 422 build-sbtc-prerequisites "arm" |
| 421 | 423 |
| 422 scons-stage-irt "arm" \ | 424 scons-stage-irt "arm" \ |
| 423 "${qemuflags} use_sandboxed_translator=1 translate_in_build_step=0" \ | 425 "${qemuflags} use_sandboxed_translator=1 translate_in_build_step=0" \ |
| 424 "toolchain_tests" | 426 "toolchain_tests" |
| 425 scons-stage-irt "arm" \ | 427 scons-stage-irt "arm" \ |
| 426 "${qemuflags} use_sandboxed_translator=1 translate_fast=1 \ | 428 "${qemuflags} use_sandboxed_translator=1 translate_fast=1 \ |
| 427 translate_in_build_step=0" \ | 429 translate_in_build_step=0" \ |
| 428 "toolchain_tests" | 430 "toolchain_tests" |
| 431 | |
| 432 # Test Non-SFI Mode. | |
| 433 scons-stage-irt "arm" "${qemuflags}" "${SCONS_NONSFI}" | |
| 429 } | 434 } |
| 430 | 435 |
| 431 mode-buildbot-arm-hw() { | 436 mode-buildbot-arm-hw() { |
| 432 FAIL_FAST=false | 437 FAIL_FAST=false |
| 433 local hwflags="-j2 -k naclsdk_validate=0 built_elsewhere=1" | 438 local hwflags="-j2 -k naclsdk_validate=0 built_elsewhere=1" |
| 434 | 439 |
| 435 scons-stage-noirt "arm" "${hwflags}" "${SCONS_S_M}" | 440 scons-stage-noirt "arm" "${hwflags}" "${SCONS_S_M}" |
| 436 # Large tests cannot be run in parallel | 441 # Large tests cannot be run in parallel |
| 437 scons-stage-noirt "arm" "${hwflags} -j1" "large_tests" | 442 scons-stage-noirt "arm" "${hwflags} -j1" "large_tests" |
| 438 | 443 |
| 439 # also run some tests with the irt | 444 # also run some tests with the irt |
| 440 scons-stage-irt "arm" "${hwflags}" "${SCONS_S_M_IRT}" | 445 scons-stage-irt "arm" "${hwflags}" "${SCONS_S_M_IRT}" |
| 441 | 446 |
| 442 scons-stage-noirt "arm" "${hwflags} pnacl_generate_pexe=0" "nonpexe_tests" | 447 scons-stage-noirt "arm" "${hwflags} pnacl_generate_pexe=0" "nonpexe_tests" |
| 443 scons-stage-irt "arm" \ | 448 scons-stage-irt "arm" \ |
| 444 "${hwflags} use_sandboxed_translator=1 translate_in_build_step=0" \ | 449 "${hwflags} use_sandboxed_translator=1 translate_in_build_step=0" \ |
| 445 "toolchain_tests" | 450 "toolchain_tests" |
| 446 scons-stage-irt "arm" \ | 451 scons-stage-irt "arm" \ |
| 447 "${hwflags} use_sandboxed_translator=1 translate_fast=1 \ | 452 "${hwflags} use_sandboxed_translator=1 translate_fast=1 \ |
| 448 translate_in_build_step=0" \ | 453 translate_in_build_step=0" \ |
| 449 "toolchain_tests" | 454 "toolchain_tests" |
| 455 | |
| 456 # Test Non-SFI Mode. | |
| 457 scons-stage-irt "arm" "${hwflags}" "${SCONS_NONSFI}" | |
| 450 } | 458 } |
| 451 | 459 |
| 452 mode-trybot-qemu() { | 460 mode-trybot-qemu() { |
| 453 # Build and actually run the arm tests under qemu, except | 461 # Build and actually run the arm tests under qemu, except |
| 454 # sandboxed translation. Hopefully that's a good tradeoff between | 462 # sandboxed translation. Hopefully that's a good tradeoff between |
| 455 # flakiness and cycle time. | 463 # flakiness and cycle time. |
| 456 FAIL_FAST=false | 464 FAIL_FAST=false |
| 457 local qemuflags="-j4 -k" | 465 local qemuflags="-j4 -k" |
| 458 clobber | 466 clobber |
| 459 gyp-arm-build | 467 gyp-arm-build |
| 460 | 468 |
| 461 scons-stage-noirt "arm" "${qemuflags}" "${SCONS_EVERYTHING}" | 469 scons-stage-noirt "arm" "${qemuflags}" "${SCONS_EVERYTHING}" |
| 462 # Large tests cannot be run in parallel | 470 # Large tests cannot be run in parallel |
| 463 scons-stage-noirt "arm" "${qemuflags} -j1" "${SCONS_S_M} large_tests" | 471 scons-stage-noirt "arm" "${qemuflags} -j1" "${SCONS_S_M} large_tests" |
| 464 | 472 |
| 465 # also run some tests with the irt | 473 # also run some tests with the irt |
| 466 scons-stage-irt "arm" "${qemuflags}" "${SCONS_S_M_IRT}" | 474 scons-stage-irt "arm" "${qemuflags}" "${SCONS_S_M_IRT}" |
| 467 | 475 |
| 468 # non-pexe tests | 476 # non-pexe tests |
| 469 scons-stage-noirt "arm" "${qemuflags} pnacl_generate_pexe=0" "nonpexe_tests" | 477 scons-stage-noirt "arm" "${qemuflags} pnacl_generate_pexe=0" "nonpexe_tests" |
| 478 | |
| 479 # Test Non-SFI Mode. | |
| 480 scons-stage-irt "arm" "${qemuflags}" "${SCONS_NONSFI}" | |
| 470 } | 481 } |
| 471 | 482 |
| 472 mode-buildbot-arm-dbg() { | 483 mode-buildbot-arm-dbg() { |
| 473 BUILD_MODE_HOST=DEDUG | 484 BUILD_MODE_HOST=DEDUG |
| 474 mode-buildbot-arm | 485 mode-buildbot-arm |
| 475 archive-for-hw-bots $(NAME_ARM_UPLOAD) regular | 486 archive-for-hw-bots $(NAME_ARM_UPLOAD) regular |
| 476 } | 487 } |
| 477 | 488 |
| 478 mode-buildbot-arm-opt() { | 489 mode-buildbot-arm-opt() { |
| 479 mode-buildbot-arm | 490 mode-buildbot-arm |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 582 | 593 |
| 583 test-nonsfi-mode() { | 594 test-nonsfi-mode() { |
| 584 echo "@@@BUILD_STEP test translating for nonsfi mode@@@" | 595 echo "@@@BUILD_STEP test translating for nonsfi mode@@@" |
| 585 # Test that translation produces an executable without giving an | 596 # Test that translation produces an executable without giving an |
| 586 # error. We can't run the resulting Non-SFI Mode nexe yet because | 597 # error. We can't run the resulting Non-SFI Mode nexe yet because |
| 587 # there is no standalone loader for such nexes that is available in | 598 # there is no standalone loader for such nexes that is available in |
| 588 # the NaCl build. | 599 # the NaCl build. |
| 589 # TODO(mseaborn): Move some of Chromium's | 600 # TODO(mseaborn): Move some of Chromium's |
| 590 # components/nacl/loader/nonsfi/ to the NaCl repo so that we can | 601 # components/nacl/loader/nonsfi/ to the NaCl repo so that we can |
| 591 # test this here. | 602 # test this here. |
| 592 local out_dir=scons-out/nacl_irt_test-x86-32-pnacl-pexe-clang | 603 local out_dir=scons-out/nacl_irt_test-x86-32-pnacl-pexe-clang |
|
jvoung (off chromium)
2014/05/02 19:35:40
Should this use the new scons mode? (when running
Mark Seaborn
2014/05/02 19:42:37
Yes, but I was going to update this in a follow-on
| |
| 593 local pexe_path=${out_dir}/obj/tests/hello_world/hello_world.final.pexe | 604 local pexe_path=${out_dir}/obj/tests/hello_world/hello_world.final.pexe |
| 594 ./scons -j8 bitcode=1 --mode=nacl,nacl_irt_test ${pexe_path} | 605 ./scons -j8 bitcode=1 --mode=nacl,nacl_irt_test ${pexe_path} |
| 595 for arch in x86-32 arm; do | 606 for arch in x86-32 arm; do |
| 596 toolchain/linux_x86/pnacl_newlib/bin/pnacl-translate -arch ${arch}-nonsfi \ | 607 toolchain/linux_x86/pnacl_newlib/bin/pnacl-translate -arch ${arch}-nonsfi \ |
| 597 ${pexe_path} -o /tmp/hellow.nexe | 608 ${pexe_path} -o /tmp/hellow.nexe |
| 598 rm /tmp/hellow.nexe | 609 rm /tmp/hellow.nexe |
| 599 done | 610 done |
| 600 } | 611 } |
| 601 | 612 |
| 602 mode-buildbot-tc-x8632-linux() { | 613 mode-buildbot-tc-x8632-linux() { |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 746 exit 1 | 757 exit 1 |
| 747 fi | 758 fi |
| 748 | 759 |
| 749 "$@" | 760 "$@" |
| 750 | 761 |
| 751 if [[ ${RETCODE} != 0 ]]; then | 762 if [[ ${RETCODE} != 0 ]]; then |
| 752 echo "@@@BUILD_STEP summary@@@" | 763 echo "@@@BUILD_STEP summary@@@" |
| 753 echo There were failed stages. | 764 echo There were failed stages. |
| 754 exit ${RETCODE} | 765 exit ${RETCODE} |
| 755 fi | 766 fi |
| OLD | NEW |