OLD | NEW |
---|---|
(Empty) | |
1 # -*- python -*- | |
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 | |
4 # found in the LICENSE file. | |
5 | |
6 Import('env') | |
7 | |
8 env.Append(CCFLAGS=['-O0', '-fno-omit-frame-pointer', '-g']) | |
Mark Seaborn
2012/02/16 18:42:50
In general gcc's debugging info is meant to work w
bradn
2012/02/16 20:13:10
Done.
| |
9 env['COMPONENT_STATIC'] = not env.Bit('nacl_glibc') | |
10 | |
11 # TODO(bradnelson): Add x86-64 support when frame point is available there. | |
Mark Seaborn
2012/02/16 18:42:50
'pointer'
bradn
2012/02/16 20:13:10
Done.
| |
12 if not env.Bit('build_x86_32'): | |
13 Return() | |
14 | |
15 # Clone env for inbrowser version. | |
16 env_browser = env.Clone() | |
Mark Seaborn
2012/02/16 18:42:50
Move this to just before it's used?
bradn
2012/02/16 20:13:10
Done.
| |
17 | |
18 untrusted_crash_dump_lib = env.ComponentLibrary( | |
19 'untrusted_crash_dump_lib', | |
20 'untrusted_crash_dump_lib.c', | |
21 EXTRA_LIBS=['${PTHREAD_LIBS}', '${NONIRT_LIBS}']) | |
22 | |
23 untrusted_crash_dump_test = env.ComponentProgram( | |
24 'untrusted_crash_dump_test', | |
25 'untrusted_crash_dump_test.c', | |
26 EXTRA_LIBS=['untrusted_crash_dump_lib', | |
27 'untrusted_crash_dump', | |
28 '${PTHREAD_LIBS}', '${NONIRT_LIBS}']) | |
29 | |
30 env['ENV']['NACL_UNTRUSTED_EXCEPTION_HANDLING'] = '1' | |
31 | |
32 dump_file = env.File('untrusted_crash_dump_test_core.json') | |
33 run_test = env.CommandSelLdrTestNacl( | |
34 'untrusted_crash_dump_test_run.out', | |
35 untrusted_crash_dump_test, | |
36 exit_status=166, | |
37 sel_ldr_flags=['-a', '-E', 'NACLCOREFILE=' + dump_file.abspath]) | |
38 env.AlwaysBuild(run_test) | |
Mark Seaborn
2012/02/16 18:42:50
Isn't this unnecessary, given that the ".out" file
bradn
2012/02/16 20:13:10
Scons in its infinite wisdom touches outputs (so t
| |
39 env.SideEffect(dump_file, run_test) | |
40 node = env.Command('untrusted_crash_dump_test.out', | |
41 ['untrusted_crash_dump_test.py', | |
42 dump_file, untrusted_crash_dump_test], | |
43 '${PYTHON} ${SOURCES} - ${ADDR2LINE} ${NACL_SDK_LIB}') | |
44 env.AddNodeToTestSuite( | |
45 node, ['small_tests'], | |
46 'run_untrusted_crash_dump_test') | |
47 | |
48 # | |
49 # Similar stuff, but in the browser. | |
50 # | |
51 | |
52 untrusted_crash_dump_lib = env_browser.ComponentLibrary( | |
Mark Seaborn
2012/02/16 18:42:50
Does this library need to be built a second time?
bradn
2012/02/16 20:13:10
Done.
| |
53 'inbrowser_untrusted_crash_dump_lib', | |
54 env_browser.ComponentObject('inbrowser_untrusted_crash_dump_lib', | |
55 'untrusted_crash_dump_lib.c', | |
56 ), | |
Mark Seaborn
2012/02/16 18:42:50
Put ')' on previous line
bradn
2012/02/16 20:13:10
Done.
| |
57 EXTRA_LIBS=['srpc', 'platform', 'gio', 'imc', 'imc_syscalls', | |
Mark Seaborn
2012/02/16 18:42:50
'srpc' shouldn't be needed
bradn
2012/02/16 20:13:10
Done.
| |
58 '${PTHREAD_LIBS}', '${NON_PPAPI_BROWSER_LIBS}']) | |
59 | |
60 untrusted_crash_dump_test = env_browser.ComponentProgram( | |
61 'inbrowser_untrusted_crash_dump_test', | |
62 env_browser.ComponentObject( | |
63 'inbrowser_untrusted_crash_dump_test', | |
64 '${MAIN_DIR}/tests/untrusted_crash_dump/untrusted_crash_dump_test.c'), | |
Mark Seaborn
2012/02/16 18:42:50
Just use a relative path?
bradn
2012/02/16 20:13:10
Done.
| |
65 EXTRA_LIBS=['inbrowser_untrusted_crash_dump_lib', | |
66 'untrusted_crash_dump', | |
67 'srpc', 'platform', 'gio', 'imc', 'imc_syscalls', | |
Mark Seaborn
2012/02/16 18:42:50
'srpc' shouldn't be needed
bradn
2012/02/16 20:13:10
Done.
| |
68 '${PTHREAD_LIBS}', '${NON_PPAPI_BROWSER_LIBS}']) | |
69 | |
70 # Make sure .so is in place for decoding. | |
71 if env_browser.Bit('nacl_glibc'): | |
72 env_browser.Depends(untrusted_crash_dump_test, | |
73 '$STAGING_DIR/libinbrowser_untrusted_crash_dump_lib.so') | |
74 | |
75 env_browser['ENV']['NACL_UNTRUSTED_EXCEPTION_HANDLING'] = '1' | |
76 crash_dump = ('${TARGET_ROOT}/test_results/' | |
77 'inbrowser_untrusted_crash_dump_test.stdout') | |
78 run_test = env_browser.PPAPIBrowserTester( | |
79 'inbrowser_untrusted_crash_dump_test_run.out', | |
80 url='untrusted_crash_dump.html', | |
81 nmfs=['untrusted_crash_dump_test.nmf'], | |
82 nacl_exe_stdout={ | |
83 'file': crash_dump, | |
84 }, | |
85 files=[untrusted_crash_dump_test, | |
86 env_browser.File('untrusted_crash_dump.html')]) | |
87 env.AlwaysBuild(run_test) | |
Mark Seaborn
2012/02/16 18:42:50
As above
bradn
2012/02/16 20:13:10
See above.
| |
88 env.SideEffect(crash_dump, run_test) | |
Mark Seaborn
2012/02/16 18:42:50
PPAPIBrowserTester() ought to take care of declari
bradn
2012/02/16 20:13:10
Done.
| |
89 node = env_browser.Command( | |
90 'inbrowser_untrusted_crash_dump_test.out', | |
91 ['untrusted_crash_dump_test.py', | |
92 crash_dump, untrusted_crash_dump_test, | |
Mark Seaborn
2012/02/16 18:42:50
Indent -1
bradn
2012/02/16 20:13:10
Done.
| |
93 '${STAGING_DIR}/untrusted_crash_dump_test.nmf'], | |
94 '${PYTHON} ${SOURCES} ${ADDR2LINE} ${NACL_SDK_LIB}') | |
95 env_browser.AddNodeToTestSuite( | |
96 node, ['chrome_browser_tests'], | |
97 'run_inbrowser_untrusted_crash_dump_test', | |
Mark Seaborn
2012/02/16 18:42:50
Indent -3
bradn
2012/02/16 20:13:10
Done.
| |
98 is_broken=env_browser.PPAPIBrowserTesterIsBroken() or | |
99 env_browser.Bit('running_on_valgrind') or | |
100 env_browser.Bit('disable_dynamic_plugin_loading')) | |
Mark Seaborn
2012/02/16 18:42:50
Comment disable_dynamic_plugin_loading with a TODO
bradn
2012/02/16 20:13:10
Done.
| |
OLD | NEW |