OLD | NEW |
1 # -*- python -*- | 1 # -*- python -*- |
2 # Copyright (c) 2011 The Native Client Authors. All rights reserved. | 2 # Copyright (c) 2011 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 # Breakpad crash reporting only works when NaCl is built into Chromium. | 8 # Breakpad crash reporting only works when NaCl is built into Chromium. |
9 if (env.Bit('disable_dynamic_plugin_loading') and | 9 if (env.Bit('disable_dynamic_plugin_loading') and |
10 env.Bit('host_windows') and | 10 env.Bit('host_windows') and |
11 env.Bit('build_x86_32')): | 11 env.Bit('build_x86_32')): |
12 expected_crash_dumps = 1 | 12 expected_crash_dumps = 1 |
13 else: | 13 else: |
14 # We are also checking that crash dumping does not work | 14 # We are also checking that crash dumping does not work |
15 # unexpectedly, since that might indicate that Breakpad was enabled | 15 # unexpectedly, since that might indicate that Breakpad was enabled |
16 # without checking that it works securely. | 16 # without checking that it works securely. |
17 expected_crash_dumps = 0 | 17 expected_crash_dumps = 0 |
18 | 18 |
19 def make_crash_test_nexe(name, libs=[]): | 19 def make_crash_test_nexe(name, libs=[]): |
20 obj = env.ComponentObject('inbrowser_%s' % name, | 20 obj = env.ComponentObject('inbrowser_%s' % name, |
21 '${MAIN_DIR}/tests/signal_handler/%s.c' % name) | 21 '${MAIN_DIR}/tests/signal_handler/%s.c' % name) |
22 nexe = env.ComponentProgram( | 22 nexe = env.ComponentProgram( |
23 'inbrowser_%s_${TARGET_FULLARCH}' % name, obj, | 23 'inbrowser_%s_${TARGET_FULLARCH}' % name, obj, |
24 EXTRA_LIBS=libs + [ | 24 EXTRA_LIBS=libs + [ |
25 'srpc', 'platform', 'gio', 'imc', 'imc_syscalls', 'pthread', | 25 'srpc', 'platform', 'gio', 'imc', 'imc_syscalls', '${PTHREAD_LIBS}', |
26 '${NON_PPAPI_BROWSER_LIBS}']) | 26 '${NON_PPAPI_BROWSER_LIBS}']) |
27 return nexe | 27 return nexe |
28 | 28 |
29 env.Append(CPPDEFINES = ['IN_BROWSER']) | 29 env.Append(CPPDEFINES = ['IN_BROWSER']) |
30 | 30 |
31 # This crash in trusted code should produce a crash dump. | 31 # This crash in trusted code should produce a crash dump. |
32 crash_test_nexe = make_crash_test_nexe('crash_test') | 32 crash_test_nexe = make_crash_test_nexe('crash_test') |
33 node = env.PPAPIBrowserTester( | 33 node = env.PPAPIBrowserTester( |
34 'inbrowser_trusted_crash_in_startup_test.out', | 34 'inbrowser_trusted_crash_in_startup_test.out', |
35 python_tester_script=env.File('crash_dump_tester.py'), | 35 python_tester_script=env.File('crash_dump_tester.py'), |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 'inbrowser_untrusted_crash_test.out', | 68 'inbrowser_untrusted_crash_test.out', |
69 python_tester_script=env.File('crash_dump_tester.py'), | 69 python_tester_script=env.File('crash_dump_tester.py'), |
70 url='untrusted_crash.html', | 70 url='untrusted_crash.html', |
71 files=[crash_test_nexe, | 71 files=[crash_test_nexe, |
72 env.File('inbrowser_crash_test.nmf'), | 72 env.File('inbrowser_crash_test.nmf'), |
73 env.File('untrusted_crash.html')], | 73 env.File('untrusted_crash.html')], |
74 args=['--expected_crash_dumps=0']) | 74 args=['--expected_crash_dumps=0']) |
75 env.AddNodeToTestSuite( | 75 env.AddNodeToTestSuite( |
76 node, ['chrome_browser_tests'], 'run_inbrowser_untrusted_crash_test', | 76 node, ['chrome_browser_tests'], 'run_inbrowser_untrusted_crash_test', |
77 is_broken=env.PPAPIBrowserTesterIsBroken()) | 77 is_broken=env.PPAPIBrowserTesterIsBroken()) |
OLD | NEW |