| 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 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 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'), |
| 36 url='trusted_crash_in_startup.html', | 36 url='trusted_crash_in_startup.html', |
| 37 nmfs=['inbrowser_crash_test.nmf'], |
| 37 files=[crash_test_nexe, | 38 files=[crash_test_nexe, |
| 38 env.File('inbrowser_crash_test.nmf'), | |
| 39 env.File('trusted_crash_in_startup.html')], | 39 env.File('trusted_crash_in_startup.html')], |
| 40 osenv='NACL_CRASH_TEST=1', | 40 osenv='NACL_CRASH_TEST=1', |
| 41 args=['--expected_crash_dumps=%i' % expected_crash_dumps]) | 41 args=['--expected_crash_dumps=%i' % expected_crash_dumps]) |
| 42 | 42 |
| 43 env.AddNodeToTestSuite( | 43 env.AddNodeToTestSuite( |
| 44 node, | 44 node, |
| 45 ['chrome_browser_tests'], | 45 ['chrome_browser_tests'], |
| 46 'run_inbrowser_trusted_crash_in_startup_test', | 46 'run_inbrowser_trusted_crash_in_startup_test', |
| 47 is_broken=env.PPAPIBrowserTesterIsBroken()) | 47 is_broken=env.PPAPIBrowserTesterIsBroken()) |
| 48 | 48 |
| 49 # This tests a crash that occurs inside a syscall handler. | 49 # This tests a crash that occurs inside a syscall handler. |
| 50 # Ultimately this should be recognised as a crash caused by untrusted code. | 50 # Ultimately this should be recognised as a crash caused by untrusted code. |
| 51 # See http://code.google.com/p/nativeclient/issues/detail?id=579 | 51 # See http://code.google.com/p/nativeclient/issues/detail?id=579 |
| 52 crash_in_syscall_nexe = make_crash_test_nexe('crash_in_syscall', | 52 crash_in_syscall_nexe = make_crash_test_nexe('crash_in_syscall', |
| 53 ['imc_syscalls']) | 53 ['imc_syscalls']) |
| 54 node = env.PPAPIBrowserTester( | 54 node = env.PPAPIBrowserTester( |
| 55 'inbrowser_crash_in_syscall_test.out', | 55 'inbrowser_crash_in_syscall_test.out', |
| 56 python_tester_script=env.File('crash_dump_tester.py'), | 56 python_tester_script=env.File('crash_dump_tester.py'), |
| 57 url='crash_in_syscall.html', | 57 url='crash_in_syscall.html', |
| 58 nmfs=['inbrowser_crash_in_syscall.nmf'], |
| 58 files=[crash_in_syscall_nexe, | 59 files=[crash_in_syscall_nexe, |
| 59 env.File('inbrowser_crash_in_syscall.nmf'), | |
| 60 env.File('crash_in_syscall.html')], | 60 env.File('crash_in_syscall.html')], |
| 61 args=['--expected_crash_dumps=%i' % expected_crash_dumps]) | 61 args=['--expected_crash_dumps=%i' % expected_crash_dumps]) |
| 62 env.AddNodeToTestSuite( | 62 env.AddNodeToTestSuite( |
| 63 node, ['chrome_browser_tests'], 'run_inbrowser_crash_in_syscall_test', | 63 node, ['chrome_browser_tests'], 'run_inbrowser_crash_in_syscall_test', |
| 64 is_broken=env.PPAPIBrowserTesterIsBroken() or env.Bit('host_linux')) | 64 is_broken=env.PPAPIBrowserTesterIsBroken() or env.Bit('host_linux')) |
| 65 | 65 |
| 66 # Crashes in untrusted code should not produce crash dumps. | 66 # Crashes in untrusted code should not produce crash dumps. |
| 67 node = env.PPAPIBrowserTester( | 67 node = env.PPAPIBrowserTester( |
| 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 nmfs=['inbrowser_crash_test.nmf'], |
| 71 files=[crash_test_nexe, | 72 files=[crash_test_nexe, |
| 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 |