Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / native_client / tests / pnacl_abi / nacl.scons
1 # -*- python -*-
2 # Copyright 2010 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 # Divide ABI check.
9 div_nexe = env.ComponentProgram('divide_by_zero',
10                                 'divide_by_zero.c',
11                                 EXTRA_LIBS=['${NONIRT_LIBS}'])
12
13 # On ARM we insert a trap instruction, whereas x86 faults in hardware.
14 if env.Bit('target_arm'):
15   div_expected_exit_status = 'untrusted_sigill'
16 else:
17   div_expected_exit_status = 'untrusted_sigfpe'
18 div_node = env.CommandSelLdrTestNacl('divide_by_zero.out',
19                                      div_nexe,
20                                      exit_status=div_expected_exit_status)
21
22 env.AddNodeToTestSuite(div_node,
23                        ['pnacl_abi_tests', 'small_tests'],
24                        'run_divide_by_zero_test',
25                        # The bot lucid_64-newlib-dbg-asan demonstrates a
26                        # bug wherein ASan's teardown code causes a crash of
27                        # its own when exiting after the caught crash.
28                        is_broken=env.Bit('asan'))