| OLD | NEW |
| 1 # -*- python -*- | 1 # -*- python -*- |
| 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 Import('env') | 6 Import('env') |
| 7 | 7 |
| 8 if 'TRUSTED_ENV' not in env: | 8 if 'TRUSTED_ENV' not in env: |
| 9 Return() | 9 Return() |
| 10 | 10 |
| 11 if env.Bit('target_arm'): | 11 if env.Bit('target_arm') or env.Bit('target_mips32'): |
| 12 if env.UsingEmulator(): | 12 if env.UsingEmulator(): |
| 13 # These tests do not work under qemu-arm. | 13 # These tests do not work under qemu. |
| 14 Return() | 14 Return() |
| 15 # Use the system's ARM GDB because the NaCl toolchain does not | 15 # Use the system's ARM/MIPS GDB because the NaCl toolchain does not |
| 16 # include a copy of GDB built to run on ARM. | 16 # include a copy of GDB built to run on ARM/MIPS. |
| 17 env.Replace(GDB='gdb') | 17 env.Replace(GDB='gdb') |
| 18 # Unlike nacl-gdb, the system version of GDB does not support the | 18 # Unlike nacl-gdb, the system version of GDB does not support the |
| 19 # "nacl-irt" command. | 19 # "nacl-irt" command. |
| 20 if env.Bit('tests_use_irt'): | 20 if env.Bit('tests_use_irt'): |
| 21 Return() | 21 Return() |
| 22 | 22 |
| 23 # We need -O0 to make stepping predictable and read local variables/function | 23 # We need -O0 to make stepping predictable and read local variables/function |
| 24 # arguments that may otherwise be optimized out. | 24 # arguments that may otherwise be optimized out. |
| 25 env.Append(CCFLAGS=['-O0', '-g', '-fno-omit-frame-pointer']) | 25 env.Append(CCFLAGS=['-O0', '-g', '-fno-omit-frame-pointer']) |
| 26 # We need to disable PNaCl's link time optimizations so that functions | 26 # We need to disable PNaCl's link time optimizations so that functions |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 extra_deps=extra_deps, | 88 extra_deps=extra_deps, |
| 89 command=['${PYTHON}', env.File('stack_trace.py'), | 89 command=['${PYTHON}', env.File('stack_trace.py'), |
| 90 '--nexe', gdb_test_guest] + test_args) | 90 '--nexe', gdb_test_guest] + test_args) |
| 91 | 91 |
| 92 # This fails on ARM+PNaCl because it gets an | 92 # This fails on ARM+PNaCl because it gets an |
| 93 # unexpected value for a function argument from | 93 # unexpected value for a function argument from |
| 94 # the stack backtrace. | 94 # the stack backtrace. |
| 95 # TODO(mseaborn): Investigate and enable this test. | 95 # TODO(mseaborn): Investigate and enable this test. |
| 96 # http://code.google.com/p/nativeclient/issues/detail?id=3252 | 96 # http://code.google.com/p/nativeclient/issues/detail?id=3252 |
| 97 env.AddNodeToTestSuite(node, test_suites, 'run_gdb_stack_trace_test', | 97 env.AddNodeToTestSuite(node, test_suites, 'run_gdb_stack_trace_test', |
| 98 is_broken=env.Bit('bitcode') and env.Bit('target_arm')) | 98 is_broken=env.Bit('bitcode')) |
| 99 env.TestBindsFixedTcpPort(node) | 99 env.TestBindsFixedTcpPort(node) |
| 100 | 100 |
| 101 node = env.CommandTest( | 101 node = env.CommandTest( |
| 102 'gdb_step_from_func_start.out', | 102 'gdb_step_from_func_start.out', |
| 103 extra_deps=extra_deps, | 103 extra_deps=extra_deps, |
| 104 command=['${PYTHON}', env.File('step_from_func_start.py'), | 104 command=['${PYTHON}', env.File('step_from_func_start.py'), |
| 105 '--nexe', gdb_test_guest] + test_args) | 105 '--nexe', gdb_test_guest] + test_args) |
| 106 | 106 |
| 107 env.AddNodeToTestSuite(node, test_suites, 'run_gdb_step_from_func_start_test') | 107 env.AddNodeToTestSuite(node, test_suites, 'run_gdb_step_from_func_start_test') |
| 108 env.TestBindsFixedTcpPort(node) | 108 env.TestBindsFixedTcpPort(node) |
| (...skipping 11 matching lines...) Expand all Loading... |
| 120 'gdb_change_variable.out', | 120 'gdb_change_variable.out', |
| 121 extra_deps=extra_deps, | 121 extra_deps=extra_deps, |
| 122 command=['${PYTHON}', env.File('change_variable.py'), | 122 command=['${PYTHON}', env.File('change_variable.py'), |
| 123 '--nexe', gdb_test_guest] + test_args) | 123 '--nexe', gdb_test_guest] + test_args) |
| 124 | 124 |
| 125 # This fails on ARM+PNaCl because it is reading | 125 # This fails on ARM+PNaCl because it is reading |
| 126 # local_var before it has been initialised. | 126 # local_var before it has been initialised. |
| 127 # TODO(mseaborn): Investigate and enable this test. | 127 # TODO(mseaborn): Investigate and enable this test. |
| 128 # http://code.google.com/p/nativeclient/issues/detail?id=3252 | 128 # http://code.google.com/p/nativeclient/issues/detail?id=3252 |
| 129 env.AddNodeToTestSuite(node, test_suites, 'run_gdb_change_variable_test', | 129 env.AddNodeToTestSuite(node, test_suites, 'run_gdb_change_variable_test', |
| 130 is_broken=env.Bit('bitcode') and env.Bit('target_arm')) | 130 is_broken=env.Bit('bitcode')) |
| 131 env.TestBindsFixedTcpPort(node) | 131 env.TestBindsFixedTcpPort(node) |
| 132 | 132 |
| 133 if not env.Bit('nacl_static_link'): | 133 if not env.Bit('nacl_static_link'): |
| 134 node = env.CommandTest( | 134 node = env.CommandTest( |
| 135 'gdb_execute_nacl_manifest_twice.out', | 135 'gdb_execute_nacl_manifest_twice.out', |
| 136 extra_deps=extra_deps, | 136 extra_deps=extra_deps, |
| 137 command=['${PYTHON}', env.File('execute_nacl_manifest_twice.py'), | 137 command=['${PYTHON}', env.File('execute_nacl_manifest_twice.py'), |
| 138 '--nexe', gdb_test_guest] + test_args) | 138 '--nexe', gdb_test_guest] + test_args) |
| 139 | 139 |
| 140 env.AddNodeToTestSuite(node, test_suites, | 140 env.AddNodeToTestSuite(node, test_suites, |
| (...skipping 18 matching lines...) Expand all Loading... |
| 159 env.TestBindsFixedTcpPort(node) | 159 env.TestBindsFixedTcpPort(node) |
| 160 | 160 |
| 161 node = env.CommandTest( | 161 node = env.CommandTest( |
| 162 'gdb_syscall_thread.out', | 162 'gdb_syscall_thread.out', |
| 163 extra_deps=extra_deps, | 163 extra_deps=extra_deps, |
| 164 command=['${PYTHON}', env.File('syscall_thread.py'), | 164 command=['${PYTHON}', env.File('syscall_thread.py'), |
| 165 '--nexe', gdb_test_guest_thread] + test_args) | 165 '--nexe', gdb_test_guest_thread] + test_args) |
| 166 | 166 |
| 167 env.AddNodeToTestSuite(node, test_suites, 'run_gdb_syscall_thread_test') | 167 env.AddNodeToTestSuite(node, test_suites, 'run_gdb_syscall_thread_test') |
| 168 env.TestBindsFixedTcpPort(node) | 168 env.TestBindsFixedTcpPort(node) |
| OLD | NEW |