| Index: tests/untrusted_crash_dump/nacl.scons
|
| diff --git a/tests/untrusted_crash_dump/nacl.scons b/tests/untrusted_crash_dump/nacl.scons
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..b05f5e6e90598348339e9f5e0f9d4ab00ba725a5
|
| --- /dev/null
|
| +++ b/tests/untrusted_crash_dump/nacl.scons
|
| @@ -0,0 +1,50 @@
|
| +# -*- python -*-
|
| +# Copyright (c) 2012 The Native Client Authors. All rights reserved.
|
| +# Use of this source code is governed by a BSD-style license that can be
|
| +# found in the LICENSE file.
|
| +
|
| +Import('env')
|
| +
|
| +
|
| +# Don't build on anything other than x86-32 for now.
|
| +if not env.Bit('build_x86_32'):
|
| + Return()
|
| +
|
| +env.Append(CCFLAGS=['-O0', '-fno-omit-frame-pointer', '-g'])
|
| +
|
| +untrusted_crash_dump_lib = env.ComponentLibrary(
|
| + 'untrusted_crash_dump_lib',
|
| + 'untrusted_crash_dump_lib.c',
|
| + EXTRA_LIBS=['${PTHREAD_LIBS}', '${NONIRT_LIBS}'],
|
| + COMPONENT_STATIC=not env.Bit('nacl_glibc'))
|
| +
|
| +untrusted_crash_dump_test = env.ComponentProgram(
|
| + 'untrusted_crash_dump_test',
|
| + ['untrusted_crash_dump.c', 'untrusted_crash_dump_test.c'],
|
| + EXTRA_LIBS=['untrusted_crash_dump_lib',
|
| + '${PTHREAD_LIBS}', '${NONIRT_LIBS}'])
|
| +
|
| +env['ENV']['NACL_UNTRUSTED_EXCEPTION_HANDLING'] = '1'
|
| +
|
| +if env.Bit('nacl_glibc'):
|
| + golden = 'untrusted_crash_dump_test_glibc.golden'
|
| +else:
|
| + golden = 'untrusted_crash_dump_test_newlib.golden'
|
| +golden = '$MAIN_DIR/tests/untrusted_crash_dump/' + golden
|
| +
|
| +dump_file = env.File('untrusted_crash_dump_test_core.json')
|
| +processed = env.File('untrusted_crash_dump_test.trace').abspath
|
| +node = env.CommandSelLdrTestNacl(
|
| + 'untrusted_crash_dump_test_run.out',
|
| + untrusted_crash_dump_test,
|
| + exit_status=166,
|
| + sel_ldr_flags=['-a', '-E', 'NACLCOREFILE=' + dump_file.abspath])
|
| +env.SideEffect(dump_file, node)
|
| +env.AddPostAction(
|
| + node, env.UntrustedCrashDumpFilter(
|
| + processed, dump_file.abspath, untrusted_crash_dump_test.abspath))
|
| +env.AddPostAction(
|
| + node, env.GoldenFileCheckAction(processed, golden))
|
| +env.AddNodeToTestSuite(
|
| + node, ['small_tests', 'exception_tests'],
|
| + 'run_untrusted_crash_dump_test')
|
|
|