| 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 30 matching lines...) Expand all Loading... |
| 41 run_stack_alignment_test_irt \ | 41 run_stack_alignment_test_irt \ |
| 42 run_syscall_test_irt" | 42 run_syscall_test_irt" |
| 43 # This uses the host-libc-based nonsfi_loader, for which only a subset of | 43 # This uses the host-libc-based nonsfi_loader, for which only a subset of |
| 44 # the tests works so far. | 44 # the tests works so far. |
| 45 # Using skip_nonstable_bitcode=1 here disables the tests for zero-cost C++ | 45 # Using skip_nonstable_bitcode=1 here disables the tests for zero-cost C++ |
| 46 # exception handling, which don't pass for Non-SFI mode yet because we | 46 # exception handling, which don't pass for Non-SFI mode yet because we |
| 47 # don't build libgcc_eh for Non-SFI mode. | 47 # don't build libgcc_eh for Non-SFI mode. |
| 48 # TODO(mseaborn): Run small_tests_irt with nonsfi_nacl=1 when it passes, | 48 # TODO(mseaborn): Run small_tests_irt with nonsfi_nacl=1 when it passes, |
| 49 # instead of the following whitelist of tests. | 49 # instead of the following whitelist of tests. |
| 50 readonly SCONS_NONSFI_TESTS="\ | 50 readonly SCONS_NONSFI_TESTS="\ |
| 51 run_hello_world_test_irt \ | |
| 52 run_float_test_irt \ | |
| 53 run_malloc_realloc_calloc_free_test_irt \ | |
| 54 run_dup_test_irt \ | |
| 55 run_syscall_test_irt \ | |
| 56 run_getpid_test_irt \ | |
| 57 toolchain_tests_irt \ | |
| 58 skip_nonstable_bitcode=1 \ | |
| 59 use_newlib_nonsfi_loader=0" | |
| 60 readonly SCONS_NONSFI_NEWLIB="nonsfi_nacl=1 ${SCONS_NONSFI_NEWLIB_TESTS}" | |
| 61 readonly SCONS_NONSFI="nonsfi_nacl=1 ${SCONS_NONSFI_TESTS}" | |
| 62 # Extra non-IRT-using test to run for x86-32 and ARM on toolchain bots. | |
| 63 # TODO(mseaborn): Run this on the main bots after the toolchain revision is | |
| 64 # updated. | |
| 65 readonly SCONS_NONSFI_TC="\ | |
| 66 ${SCONS_NONSFI} \ | |
| 67 run_clock_get_test \ | 51 run_clock_get_test \ |
| 68 run_dup_test \ | 52 run_dup_test \ |
| 69 run_fcntl_test \ | 53 run_fcntl_test \ |
| 70 run_fork_test \ | 54 run_fork_test \ |
| 71 run_hello_world_test \ | 55 run_hello_world_test \ |
| 72 run_mmap_test \ | 56 run_mmap_test \ |
| 73 run_nanosleep_test \ | 57 run_nanosleep_test \ |
| 74 run_prctl_test \ | 58 run_prctl_test \ |
| 75 run_printf_test \ | 59 run_printf_test \ |
| 76 run_pwrite_test \ | 60 run_pwrite_test \ |
| 77 run_socket_test \ | 61 run_socket_test \ |
| 78 run_stack_alignment_test \ | 62 run_stack_alignment_test \ |
| 79 run_syscall_test" | 63 run_syscall_test \ |
| 64 run_hello_world_test_irt \ |
| 65 run_float_test_irt \ |
| 66 run_malloc_realloc_calloc_free_test_irt \ |
| 67 run_dup_test_irt \ |
| 68 run_syscall_test_irt \ |
| 69 run_getpid_test_irt \ |
| 70 toolchain_tests_irt \ |
| 71 skip_nonstable_bitcode=1 \ |
| 72 use_newlib_nonsfi_loader=0" |
| 73 readonly SCONS_NONSFI_NEWLIB="nonsfi_nacl=1 ${SCONS_NONSFI_NEWLIB_TESTS}" |
| 74 readonly SCONS_NONSFI="nonsfi_nacl=1 ${SCONS_NONSFI_TESTS}" |
| 80 | 75 |
| 81 # subset of tests used on toolchain builders | 76 # subset of tests used on toolchain builders |
| 82 readonly SCONS_TC_TESTS="small_tests medium_tests" | 77 readonly SCONS_TC_TESTS="small_tests medium_tests" |
| 83 | 78 |
| 84 readonly SCONS_COMMON="./scons --verbose bitcode=1" | 79 readonly SCONS_COMMON="./scons --verbose bitcode=1" |
| 85 readonly UP_DOWN_LOAD="buildbot/file_up_down_load.sh" | 80 readonly UP_DOWN_LOAD="buildbot/file_up_down_load.sh" |
| 86 # 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) |
| 87 readonly PNACL_BUILD="pnacl/build.sh" | 82 readonly PNACL_BUILD="pnacl/build.sh" |
| 88 readonly DRIVER_TESTS="pnacl/driver/tests/driver_tests.py" | 83 readonly DRIVER_TESTS="pnacl/driver/tests/driver_tests.py" |
| 89 | 84 |
| (...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 469 "${scons_flags} use_sandboxed_translator=1 translate_fast=1" \ | 464 "${scons_flags} use_sandboxed_translator=1 translate_fast=1" \ |
| 470 "toolchain_tests" | 465 "toolchain_tests" |
| 471 # Smaller set of sbtc tests for ARM because qemu is flaky. | 466 # Smaller set of sbtc tests for ARM because qemu is flaky. |
| 472 scons-stage-irt "arm" "${scons_flags} use_sandboxed_translator=1" \ | 467 scons-stage-irt "arm" "${scons_flags} use_sandboxed_translator=1" \ |
| 473 "run_hello_world_test" | 468 "run_hello_world_test" |
| 474 scons-stage-irt "arm" \ | 469 scons-stage-irt "arm" \ |
| 475 "${scons_flags} use_sandboxed_translator=1 translate_fast=1" \ | 470 "${scons_flags} use_sandboxed_translator=1 translate_fast=1" \ |
| 476 "run_hello_world_test" | 471 "run_hello_world_test" |
| 477 | 472 |
| 478 # Test Non-SFI Mode. | 473 # Test Non-SFI Mode. |
| 479 scons-stage-irt "x86-32" "${scons_flags}" "${SCONS_NONSFI_TC}" | 474 scons-stage-irt "x86-32" "${scons_flags}" "${SCONS_NONSFI}" |
| 480 scons-stage-irt "arm" "${scons_flags}" "${SCONS_NONSFI_TC}" | 475 scons-stage-irt "arm" "${scons_flags}" "${SCONS_NONSFI}" |
| 481 | 476 |
| 482 # Test unsandboxed mode. | 477 # Test unsandboxed mode. |
| 483 scons-stage-irt "x86-32" "${scons_flags}" "pnacl_unsandboxed=1" \ | 478 scons-stage-irt "x86-32" "${scons_flags}" "pnacl_unsandboxed=1" \ |
| 484 "run_hello_world_test_irt" | 479 "run_hello_world_test_irt" |
| 485 | 480 |
| 486 # Run the GCC torture tests just for x86-32. Testing a single | 481 # Run the GCC torture tests just for x86-32. Testing a single |
| 487 # architecture gives good coverage without taking too long. We | 482 # architecture gives good coverage without taking too long. We |
| 488 # don't test x86-64 here because some of the torture tests fail on | 483 # don't test x86-64 here because some of the torture tests fail on |
| 489 # the x86-64 toolchain trybot (though not the buildbots, apparently | 484 # the x86-64 toolchain trybot (though not the buildbots, apparently |
| 490 # due to a hardware difference: | 485 # due to a hardware difference: |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 559 exit 1 | 554 exit 1 |
| 560 fi | 555 fi |
| 561 | 556 |
| 562 "$@" | 557 "$@" |
| 563 | 558 |
| 564 if [[ ${RETCODE} != 0 ]]; then | 559 if [[ ${RETCODE} != 0 ]]; then |
| 565 echo "@@@BUILD_STEP summary@@@" | 560 echo "@@@BUILD_STEP summary@@@" |
| 566 echo There were failed stages. | 561 echo There were failed stages. |
| 567 exit ${RETCODE} | 562 exit ${RETCODE} |
| 568 fi | 563 fi |
| OLD | NEW |