| 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..1a01808d1bdc357bb3d4c32d5d9ac9e12368bdcc
|
| --- /dev/null
|
| +++ b/tests/untrusted_crash_dump/nacl.scons
|
| @@ -0,0 +1,53 @@
|
| +# -*- 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')
|
| +
|
| +
|
| +# Exception handling support is only implemented for x86-32 Windows.
|
| +is_broken = (not (env.Bit('host_windows') or env.Bit('host_mac')) or
|
| + not env.Bit('build_x86_32'))
|
| +
|
| +# Don't build on anything other than x86-32 for now.
|
| +if not env.Bit('build_x86_32'):
|
| + Return()
|
| +
|
| +env.FilterOut(CCFLAGS=['-O2', '-fomit-frame-pointer'])
|
| +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}'])
|
| +
|
| +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=['-e', '-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', is_broken=is_broken)
|
|
|