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

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 review comments 2 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
9 # Exception handling support is only implemented for x86-32 Windows.
10 is_broken = (not (env.Bit('host_windows') or env.Bit('host_mac')) or
Mark Seaborn 2012/02/09 22:24:55 You can drop this because we have exception handli
bradn 2012/02/11 01:04:14 Already done in later patch set.
11 not env.Bit('build_x86_32'))
12
13 # Don't build on anything other than x86-32 for now.
14 if not env.Bit('build_x86_32'):
15 Return()
16
17 env.Append(CCFLAGS=['-O0', '-fno-omit-frame-pointer', '-g'])
18
19 untrusted_crash_dump_lib = env.ComponentLibrary(
20 'untrusted_crash_dump_lib',
21 'untrusted_crash_dump_lib.c',
22 EXTRA_LIBS=['${PTHREAD_LIBS}', '${NONIRT_LIBS}'],
23 COMPONENT_STATIC=not env.Bit('nacl_glibc'))
24
25 untrusted_crash_dump_test = env.ComponentProgram(
26 'untrusted_crash_dump_test',
27 ['untrusted_crash_dump.c', 'untrusted_crash_dump_test.c'],
28 EXTRA_LIBS=['untrusted_crash_dump_lib',
29 '${PTHREAD_LIBS}', '${NONIRT_LIBS}'])
30
31 env['ENV']['NACL_UNTRUSTED_EXCEPTION_HANDLING'] = '1'
Mark Seaborn 2012/02/09 22:24:55 env['ENV'] *might* be shared across all the .scons
bradn 2012/02/11 01:04:14 BuildEnvironments clones env deeply. I've also che
32
33 if env.Bit('nacl_glibc'):
34 golden = 'untrusted_crash_dump_test_glibc.golden'
35 else:
36 golden = 'untrusted_crash_dump_test_newlib.golden'
37 golden = '$MAIN_DIR/tests/untrusted_crash_dump/' + golden
38
39 dump_file = env.File('untrusted_crash_dump_test_core.json')
40 processed = env.File('untrusted_crash_dump_test.trace').abspath
41 node = env.CommandSelLdrTestNacl(
42 'untrusted_crash_dump_test_run.out',
43 untrusted_crash_dump_test,
44 exit_status=166,
45 sel_ldr_flags=['-a', '-E', 'NACLCOREFILE=' + dump_file.abspath])
46 env.SideEffect(dump_file, node)
47 env.AddPostAction(
Mark Seaborn 2012/02/09 22:24:55 Can't this be a separate Scons target that depends
bradn 2012/02/11 01:04:14 Done.
48 node, env.UntrustedCrashDumpFilter(
49 processed, dump_file.abspath, untrusted_crash_dump_test.abspath))
50 env.AddPostAction(
51 node, env.GoldenFileCheckAction(processed, golden))
52 env.AddNodeToTestSuite(
53 node, ['small_tests', 'exception_tests'],
54 'run_untrusted_crash_dump_test', is_broken=is_broken)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698