Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(231)

Side by Side Diff: tests/gdb/nacl.scons

Issue 12594036: Add a scons pnacl finalize step for pnacl_generate_pexe tests. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Use StripSuffix Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tests/custom_desc/nacl.scons ('k') | tests/minnacl/nacl.scons » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
(...skipping 11 matching lines...) Expand all
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
27 # do not get inlined, so that we can set breakpoints on these 27 # do not get inlined, so that we can set breakpoints on these
28 # functions. Also make translation optimizaton level -O0. 28 # functions. Also make translation optimizaton level -O0.
29 if env.Bit('bitcode'): 29 if env.Bit('bitcode'):
30 env.Append(LINKFLAGS=['-O0']) 30 env.Append(LINKFLAGS=['-O0'])
31 env.Append(TRANSLATEFLAGS=['-O0']) 31 env.Append(TRANSLATEFLAGS=['-O0'])
32 # This requires preserving nonstable bitcode debug metadata.
33 env.SetBits('nonstable_bitcode')
34
35 if env.Bit('skip_nonstable_bitcode'):
36 Return()
32 37
33 test_args = ['--gdb', env['GDB'], 38 test_args = ['--gdb', env['GDB'],
34 '--output_dir', env.subst('${TARGET_ROOT}/test_results')] 39 '--output_dir', env.subst('${TARGET_ROOT}/test_results')]
35 if env.Bit('tests_use_irt'): 40 if env.Bit('tests_use_irt'):
36 test_args += ['--irt', env.GetIrtNexe()] 41 test_args += ['--irt', env.GetIrtNexe()]
37 if not env.Bit('nacl_static_link'): 42 if not env.Bit('nacl_static_link'):
38 test_args += ['--ld_so', env.File('${NACL_SDK_LIB}/runnable-ld.so'), 43 test_args += ['--ld_so', env.File('${NACL_SDK_LIB}/runnable-ld.so'),
39 '--library_path', env['NACL_SDK_LIB']] 44 '--library_path', env['NACL_SDK_LIB']]
40 test_args += ['--'] + env.AddBootstrap(env.GetSelLdr(), ['-v']) 45 test_args += ['--'] + env.AddBootstrap(env.GetSelLdr(), ['-v'])
41 46
42 extra_deps = [env.File('gdb_test.py')] 47 extra_deps = [env.File('gdb_test.py')]
43 48
44 test_suites = ['medium_tests', 'gdb_tests'] 49 test_suites = ['medium_tests', 'gdb_tests']
45 50
46 51
47 gdb_test_guest = env.ComponentProgram( 52 gdb_test_guest = env.ComponentProgram(
48 'gdb_test_guest', 'gdb_test_guest.c', 53 'gdb_test_guest', 'gdb_test_guest.c',
49 EXTRA_LIBS=['${NONIRT_LIBS}']) 54 EXTRA_LIBS=['${NONIRT_LIBS}'])
50 if env.ShouldTranslateToNexe(gdb_test_guest): 55 gdb_test_guest = env.GetTranslatedNexe(gdb_test_guest)
51 gdb_test_guest = env.GetTranslatedNexe(gdb_test_guest)
52 56
53 node = env.CommandTest( 57 node = env.CommandTest(
54 'gdb_stepi_after_break.out', 58 'gdb_stepi_after_break.out',
55 extra_deps=extra_deps, 59 extra_deps=extra_deps,
56 command=['${PYTHON}', env.File('stepi_after_break.py'), 60 command=['${PYTHON}', env.File('stepi_after_break.py'),
57 '--nexe', gdb_test_guest] + test_args) 61 '--nexe', gdb_test_guest] + test_args)
58 62
59 env.AddNodeToTestSuite(node, test_suites, 'run_gdb_stepi_after_break_test') 63 env.AddNodeToTestSuite(node, test_suites, 'run_gdb_stepi_after_break_test')
60 env.TestBindsFixedTcpPort(node) 64 env.TestBindsFixedTcpPort(node)
61 65
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 143
140 env.AddNodeToTestSuite(node, test_suites, 144 env.AddNodeToTestSuite(node, test_suites,
141 'run_gdb_execute_nacl_manifest_twice_test') 145 'run_gdb_execute_nacl_manifest_twice_test')
142 env.TestBindsFixedTcpPort(node) 146 env.TestBindsFixedTcpPort(node)
143 147
144 # GDB treats multithreaded programs specially. Provide distinct nexe for 148 # GDB treats multithreaded programs specially. Provide distinct nexe for
145 # multithreaded tests to isolate multiple threads-specific issues. 149 # multithreaded tests to isolate multiple threads-specific issues.
146 gdb_test_guest_thread = env.ComponentProgram( 150 gdb_test_guest_thread = env.ComponentProgram(
147 'gdb_test_guest_thread', 'gdb_test_guest_thread.c', 151 'gdb_test_guest_thread', 'gdb_test_guest_thread.c',
148 EXTRA_LIBS=['${PTHREAD_LIBS}', '${NONIRT_LIBS}']) 152 EXTRA_LIBS=['${PTHREAD_LIBS}', '${NONIRT_LIBS}'])
149 if env.ShouldTranslateToNexe(gdb_test_guest_thread): 153 gdb_test_guest_thread = env.GetTranslatedNexe(gdb_test_guest_thread)
150 gdb_test_guest_thread = env.GetTranslatedNexe(gdb_test_guest_thread)
151 154
152 node = env.CommandTest( 155 node = env.CommandTest(
153 'gdb_break_continue_thread.out', 156 'gdb_break_continue_thread.out',
154 extra_deps=extra_deps, 157 extra_deps=extra_deps,
155 command=['${PYTHON}', env.File('break_continue_thread.py'), 158 command=['${PYTHON}', env.File('break_continue_thread.py'),
156 '--nexe', gdb_test_guest_thread] + test_args) 159 '--nexe', gdb_test_guest_thread] + test_args)
157 160
158 env.AddNodeToTestSuite(node, test_suites, 'run_gdb_break_continue_thread_test') 161 env.AddNodeToTestSuite(node, test_suites, 'run_gdb_break_continue_thread_test')
159 env.TestBindsFixedTcpPort(node) 162 env.TestBindsFixedTcpPort(node)
160 163
161 node = env.CommandTest( 164 node = env.CommandTest(
162 'gdb_syscall_thread.out', 165 'gdb_syscall_thread.out',
163 extra_deps=extra_deps, 166 extra_deps=extra_deps,
164 command=['${PYTHON}', env.File('syscall_thread.py'), 167 command=['${PYTHON}', env.File('syscall_thread.py'),
165 '--nexe', gdb_test_guest_thread] + test_args) 168 '--nexe', gdb_test_guest_thread] + test_args)
166 169
167 env.AddNodeToTestSuite(node, test_suites, 'run_gdb_syscall_thread_test') 170 env.AddNodeToTestSuite(node, test_suites, 'run_gdb_syscall_thread_test')
168 env.TestBindsFixedTcpPort(node) 171 env.TestBindsFixedTcpPort(node)
OLDNEW
« no previous file with comments | « tests/custom_desc/nacl.scons ('k') | tests/minnacl/nacl.scons » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698