| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # Copyright (c) 2013 The Native Client Authors. All rights reserved. | 2 # Copyright (c) 2013 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 import os | 6 import os |
| 7 | 7 |
| 8 from buildbot_lib import ( | 8 from buildbot_lib import ( |
| 9 BuildContext, BuildStatus, ParseStandardCommandLine, | 9 BuildContext, BuildStatus, ParseStandardCommandLine, |
| 10 RemoveSconsBuildDirectories, RemoveGypBuildDirectories, RunBuild, | 10 RemoveSconsBuildDirectories, RemoveGypBuildDirectories, RunBuild, |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 args=flags_run + ['use_sandboxed_translator=1', 'large_code']) | 77 args=flags_run + ['use_sandboxed_translator=1', 'large_code']) |
| 78 | 78 |
| 79 # Test Non-SFI Mode. | 79 # Test Non-SFI Mode. |
| 80 # The only architectures that the PNaCl toolchain supports Non-SFI | 80 # The only architectures that the PNaCl toolchain supports Non-SFI |
| 81 # versions of are currently x86-32 and ARM, and ARM testing is covered | 81 # versions of are currently x86-32 and ARM, and ARM testing is covered |
| 82 # by buildbot_pnacl.sh rather than this Python script. | 82 # by buildbot_pnacl.sh rather than this Python script. |
| 83 # The x86-64 toolchain bot currently also runs these tests from | 83 # The x86-64 toolchain bot currently also runs these tests from |
| 84 # buildbot_pnacl.sh | 84 # buildbot_pnacl.sh |
| 85 if context.Linux() and context['default_scons_platform'] == 'x86-32': | 85 if context.Linux() and context['default_scons_platform'] == 'x86-32': |
| 86 with Step('nonsfi_tests', status, halt_on_fail=False): | 86 with Step('nonsfi_tests', status, halt_on_fail=False): |
| 87 # TODO(mseaborn): Enable more tests here when they pass. | |
| 88 tests = ['run_' + test + '_test_irt' for test in | |
| 89 ['float', | |
| 90 'hello_world', | |
| 91 'irt_futex', | |
| 92 'malloc_realloc_calloc_free', | |
| 93 'mmap', | |
| 94 'stack_alignment', | |
| 95 'syscall', | |
| 96 'thread']] | |
| 97 # Extra non-IRT-using test to run for x86-32 | |
| 98 tests.extend(['run_clock_get_test', | |
| 99 'run_dup_test', | |
| 100 'run_fcntl_test', | |
| 101 'run_fork_test', | |
| 102 'run_hello_world_test', | |
| 103 'run_mmap_test', | |
| 104 'run_nanosleep_test', | |
| 105 'run_prctl_test', | |
| 106 'run_printf_test', | |
| 107 'run_pwrite_test', | |
| 108 'run_sigaction_test', | |
| 109 'run_signal_test', | |
| 110 'run_socket_test', | |
| 111 'run_stack_alignment_test', | |
| 112 'run_syscall_test', | |
| 113 'run_thread_test']) | |
| 114 SCons(context, parallel=True, mode=irt_mode, | 87 SCons(context, parallel=True, mode=irt_mode, |
| 115 args=flags_run + ['nonsfi_nacl=1'] + tests) | 88 args=flags_run + |
| 89 ['nonsfi_nacl=1', |
| 90 'nonsfi_tests', |
| 91 'nonsfi_tests_irt']) |
| 116 | 92 |
| 117 # Test nonsfi_loader linked against host's libc. | 93 # Test nonsfi_loader linked against host's libc. |
| 118 with Step('nonsfi_tests_host_libc', status, halt_on_fail=False): | 94 with Step('nonsfi_tests_host_libc', status, halt_on_fail=False): |
| 119 tests = ['run_' + test + '_test_irt' for test in | |
| 120 ['dup', | |
| 121 'float', | |
| 122 'getpid', | |
| 123 'hello_world', | |
| 124 'irt_futex', | |
| 125 'malloc_realloc_calloc_free', | |
| 126 'syscall', | |
| 127 'thread']] | |
| 128 # Using skip_nonstable_bitcode=1 here disables the tests for | 95 # Using skip_nonstable_bitcode=1 here disables the tests for |
| 129 # zero-cost C++ exception handling, which don't pass for Non-SFI | 96 # zero-cost C++ exception handling, which don't pass for Non-SFI |
| 130 # mode yet because we don't build libgcc_eh for Non-SFI mode. | 97 # mode yet because we don't build libgcc_eh for Non-SFI mode. |
| 131 tests.extend(['toolchain_tests_irt', | |
| 132 'skip_nonstable_bitcode=1']) | |
| 133 SCons(context, parallel=True, mode=irt_mode, | 98 SCons(context, parallel=True, mode=irt_mode, |
| 134 args=(flags_run + ['nonsfi_nacl=1', 'use_newlib_nonsfi_loader=0'] + | 99 args=flags_run + |
| 135 tests)) | 100 ['nonsfi_nacl=1', 'use_newlib_nonsfi_loader=0', |
| 101 'nonsfi_tests_irt', |
| 102 'toolchain_tests_irt', 'skip_nonstable_bitcode=1']) |
| 136 | 103 |
| 137 # Test unsandboxed mode. | 104 # Test unsandboxed mode. |
| 138 if ((context.Linux() or context.Mac()) and | 105 if ((context.Linux() or context.Mac()) and |
| 139 context['default_scons_platform'] == 'x86-32'): | 106 context['default_scons_platform'] == 'x86-32'): |
| 140 if context.Linux(): | 107 if context.Linux(): |
| 141 tests = ['run_' + test + '_test_irt' for test in | 108 tests = ['run_' + test + '_test_irt' for test in |
| 142 ['hello_world', 'irt_futex', 'thread', 'float', | 109 ['hello_world', 'irt_futex', 'thread', 'float', |
| 143 'malloc_realloc_calloc_free', 'dup', 'cond_timedwait', | 110 'malloc_realloc_calloc_free', 'dup', 'cond_timedwait', |
| 144 'getpid']] | 111 'getpid']] |
| 145 else: | 112 else: |
| (...skipping 16 matching lines...) Expand all Loading... |
| 162 SetupWindowsEnvironment(context) | 129 SetupWindowsEnvironment(context) |
| 163 elif context.Mac(): | 130 elif context.Mac(): |
| 164 SetupMacEnvironment(context) | 131 SetupMacEnvironment(context) |
| 165 else: | 132 else: |
| 166 raise Exception('Unsupported platform') | 133 raise Exception('Unsupported platform') |
| 167 | 134 |
| 168 RunBuild(BuildScriptX86, status) | 135 RunBuild(BuildScriptX86, status) |
| 169 | 136 |
| 170 if __name__ == '__main__': | 137 if __name__ == '__main__': |
| 171 Main() | 138 Main() |
| OLD | NEW |