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

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

Issue 9316125: Adding untrusted crash dump / stack trace tests. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Fixing - thing. Created 8 years, 10 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
OLDNEW
(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 # Keep frame pointers so we get a nice stack trace.
9 # Set -O0 as otherwise some of the layers in the test case get optimized away.
10 env.Append(CCFLAGS=['-O0', '-fno-omit-frame-pointer', '-g'])
11 env['COMPONENT_STATIC'] = not env.Bit('nacl_glibc')
12 env['ENV']['NACL_UNTRUSTED_EXCEPTION_HANDLING'] = '1'
13
14 # TODO(bradnelson): Support x86-64 when the frame pointer is available there.
15 if not env.Bit('build_x86_32'):
16 Return()
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
31 dump_file = env.File('untrusted_crash_dump_test_core.json')
32 run_test = env.CommandSelLdrTestNacl(
33 'untrusted_crash_dump_test_run.out',
34 untrusted_crash_dump_test,
35 exit_status=166,
36 sel_ldr_flags=['-a', '-E', 'NACLCOREFILE=' + dump_file.abspath])
37 env.AlwaysBuild(run_test)
38 env.SideEffect(dump_file, run_test)
39 node = env.Command('untrusted_crash_dump_test.out',
40 ['untrusted_crash_dump_test.py',
41 dump_file, untrusted_crash_dump_test],
42 '${PYTHON} ${SOURCES} - ${ADDR2LINE} ${NACL_SDK_LIB}')
43 env.AddNodeToTestSuite(
44 node, ['small_tests'],
45 'run_untrusted_crash_dump_test')
46
47 #
48 # Similar stuff, but in the browser.
49 #
50
51 untrusted_crash_dump_test = env.ComponentProgram(
52 'inbrowser_untrusted_crash_dump_test',
53 env.ComponentObject(
54 'inbrowser_untrusted_crash_dump_test',
55 'untrusted_crash_dump_test.c'),
56 EXTRA_LIBS=['untrusted_crash_dump_lib',
57 'untrusted_crash_dump',
58 'platform', 'gio', 'imc', 'imc_syscalls',
59 '${PTHREAD_LIBS}', '${NON_PPAPI_BROWSER_LIBS}'])
60
61 # Make sure .so is in place for decoding.
62 if env.Bit('nacl_glibc'):
63 env.Depends(untrusted_crash_dump_test,
64 '$STAGING_DIR/libuntrusted_crash_dump_lib.so')
65
66 crash_dump = ('${TARGET_ROOT}/test_results/'
67 'inbrowser_untrusted_crash_dump_test.stdout')
68 run_test = env.PPAPIBrowserTester(
69 'inbrowser_untrusted_crash_dump_test_run.out',
70 url='untrusted_crash_dump.html',
71 nmfs=['untrusted_crash_dump_test.nmf'],
72 nacl_exe_stdout={
73 'file': crash_dump,
74 },
75 files=[untrusted_crash_dump_test,
76 env.File('untrusted_crash_dump.html')])
77 env.AlwaysBuild(run_test)
78 node = env.Command(
79 'inbrowser_untrusted_crash_dump_test.out',
80 ['untrusted_crash_dump_test.py',
81 crash_dump, untrusted_crash_dump_test,
82 '${STAGING_DIR}/untrusted_crash_dump_test.nmf'],
83 '${PYTHON} ${SOURCES} ${ADDR2LINE} ${NACL_SDK_LIB}')
84 env.AddNodeToTestSuite(
85 node, ['chrome_browser_tests'],
86 'run_inbrowser_untrusted_crash_dump_test',
87 is_broken=env.PPAPIBrowserTesterIsBroken() or
88 env.Bit('running_on_valgrind') or
89 # TODO(bradnelson): Once we have proper support for running
90 # in Chrome, remove this limitation.
91 env.Bit('disable_dynamic_plugin_loading'))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698