Chromium Code Reviews| Index: tests/toolchain/nacl.scons |
| diff --git a/tests/toolchain/nacl.scons b/tests/toolchain/nacl.scons |
| index c332995319294ed3a65e4e9001988f81459eec46..de6b43eb8ec3ceac1abb600a0a0cad38eaa81024 100644 |
| --- a/tests/toolchain/nacl.scons |
| +++ b/tests/toolchain/nacl.scons |
| @@ -41,28 +41,47 @@ env.AddNodeToTestSuite(node, |
| 'run_whole_archive_test') |
| +# Test various intrinsics. |
| + |
| +# Some of the intrinsic tests cover intrinsics that we do not want to |
| +# support. For example, llvm.frameaddress. If that is the case, we will set |
| +# the 'stable_bitcode' field to False in the TESTS_TO_RUN list. |
| +if env.Bit('bitcode'): |
| + nonstable_env = env.Clone() |
| + nonstable_env.Append(LINKFLAGS=['--pnacl-disable-abi-check']) |
| +else: |
| + nonstable_env = env |
| + |
| TESTS_TO_RUN = [ |
| - # (src, exit_status, golden_file, cond), |
| + # (src, exit_status, golden_file, stable_bitcode, cond), |
|
Mark Seaborn
2013/05/09 21:26:37
This is getting hard to read -- too many fields.
jvoung (off chromium)
2013/05/09 23:31:43
Good idea! Done.
|
| # The valus None for golden_file means no golden file, c.f. |
| # SConstruct::CommandTest() |
| - ('setlongjmp.c', '55', None, True), |
| - ('intrinsics.cc', '55', None, True), |
| - ('float2.c', '0', True, True), |
| - ('frame_addresses.c', '0', None, True), |
| - # NOTE: this test uses bitcode asm's |
| - ('llvm_math_intrinsics.c', '0', True, env.Bit('bitcode')), |
| - # NOTE: this test uses bitcode asm's |
| - ('llvm_bitmanip_intrinsics.c', '0', True, env.Bit('bitcode')), |
| - ('llvm_atomic_intrinsics.c', '55', None, True), |
| + ('setlongjmp.c', '55', None, True, True), |
| + ('intrinsics.cc', '55', None, True, True), |
| + ('float2.c', '0', True, True, True), |
| + # Consider llvm.frameaddress and llvm.returnaddress non-stable, |
| + # since we may want to hide return and stack addresses in the future. |
| + ('frame_addresses.c', '0', None, False, True), |
| + ('return_address.c', '55', None, False, True), |
| + # Revisit stability of llvm math intrinsics. |
| + ('llvm_math_intrinsics.c', '0', True, False, env.Bit('bitcode')), |
| + # Revisit stability of llvm bitmanip intrinsics. |
| + ('llvm_bitmanip_intrinsics.c', '0', True, False, env.Bit('bitcode')), |
| + # Revisit stability of llvm atomic intrinsics. |
| + ('llvm_atomic_intrinsics.c', '55', None, False, True), |
| ] |
| -for src, exit_status, golden_file, cond in TESTS_TO_RUN: |
| +for src, exit_status, golden_file, stable_bitcode, cond in TESTS_TO_RUN: |
| if not cond: continue |
| name = src.split('.')[0] |
| if golden_file == True: |
| golden_file = env.File(name + '.stdout') |
| - nexe = env.ComponentProgram(name, src, EXTRA_LIBS=['${NONIRT_LIBS}']) |
| + if stable_bitcode: |
|
Mark Seaborn
2013/05/09 21:26:37
How about this to reduce duplication:
if stable_bi
jvoung (off chromium)
2013/05/09 23:31:43
Reduced duplication.
|
| + nexe = env.ComponentProgram(name, src, EXTRA_LIBS=['${NONIRT_LIBS}']) |
| + else: |
| + nexe = nonstable_env.ComponentProgram(name, |
| + src, EXTRA_LIBS=['${NONIRT_LIBS}']) |
| node = env.CommandSelLdrTestNacl(name + '.out', |
| nexe, |
| exit_status=exit_status, |
| @@ -140,15 +159,6 @@ if env.IsRunningUnderValgrind(): |
| Return() |
| -nexe = env.ComponentProgram('return_address', 'return_address.c', |
| - EXTRA_LIBS=['${NONIRT_LIBS}']) |
| -node = env.CommandSelLdrTestNacl('return_address.out', |
| - nexe, |
| - exit_status='55') |
| -env.AddNodeToTestSuite(node, |
| - ['toolchain_tests', 'small_tests'], |
| - 'run_return_address_test') |
| - |
| # NOTE: we assume that the incoming env contains '-O2', '-fomit-frame-pointer' |
| def MakeEnv(use_opts, use_frames): |
| new_env = env.Clone() |