| OLD | NEW |
| 1 # -*- python -*- | 1 # -*- python -*- |
| 2 # Copyright (c) 2012 The Native Client Authors. All rights reserved. | 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 | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 Import('env') | 6 Import('env') |
| 7 | 7 |
| 8 if 'TRUSTED_ENV' not in env: | 8 if 'TRUSTED_ENV' not in env: |
| 9 Return() | 9 Return() |
| 10 | 10 |
| 11 # Even if stubout mode is not supported sel_ldr still must run valid .nexes. | 11 # Even if stubout mode is not supported sel_ldr still must run valid .nexes. |
| 12 # TODO(shyamsundarr): consider removing support for stubout mode completely | 12 # TODO(shyamsundarr): consider removing support for stubout mode completely |
| 13 # from code, given that currently only MIPS supports it and it is untested. | 13 # from code, given that currently only MIPS supports it and it is untested. |
| 14 hello_world_nexe = env.File('${STAGING_DIR}/hello_world${PROGSUFFIX}') | 14 hello_world_nexe = env.File('${STAGING_DIR}/hello_world${PROGSUFFIX}') |
| 15 node = env.CommandSelLdrTestNacl( | 15 node = env.CommandSelLdrTestNacl( |
| 16 'hello_world_stub_out_run.out', hello_world_nexe, | 16 'hello_world_stub_out_run.out', hello_world_nexe, |
| 17 sel_ldr_flags=['-s']) | 17 sel_ldr_flags=['-s']) |
| 18 env.AddNodeToTestSuite( | 18 env.AddNodeToTestSuite( |
| 19 node, ['small_tests'], 'run_valid_nexe_with_stubout_test') | 19 node, ['small_tests'], 'run_valid_nexe_with_stubout_test') |
| 20 | 20 |
| 21 # Do not run these tests with pexes, assuming they are portable, since | 21 # Do not run these tests with pexes, assuming they are portable, since |
| 22 # they use inline assembler. | 22 # they use inline assembler. |
| 23 if env.Bit('bitcode') and env.Bit('pnacl_generate_pexe'): | 23 if env.Bit('bitcode') and env.Bit('pnacl_generate_pexe'): |
| 24 Return() | 24 Return() |
| 25 | 25 |
| 26 # nacl-clang currently has trouble with the top-level asm in this file: |
| 27 # https://code.google.com/p/nativeclient/issues/detail?id=3968 |
| 28 if env.Bit('nacl_clang'): |
| 29 Return() |
| 30 |
| 26 # The file partly_invalid.c contains inline assembler | 31 # The file partly_invalid.c contains inline assembler |
| 27 if env.Bit('bitcode'): | 32 if env.Bit('bitcode'): |
| 28 env.AddBiasForPNaCl() | 33 env.AddBiasForPNaCl() |
| 29 env.PNaClForceNative() | 34 env.PNaClForceNative() |
| 30 | 35 |
| 31 # Newlib + PIC doesn't provide native ___tls_get_addr, so gold complains. | 36 # Newlib + PIC doesn't provide native ___tls_get_addr, so gold complains. |
| 32 if env.Bit('bitcode') and env.Bit('nacl_pic'): | 37 if env.Bit('bitcode') and env.Bit('nacl_pic'): |
| 33 Return() | 38 Return() |
| 34 | 39 |
| 35 # TODO(mseaborn): Extend the ARM validator to support this. | 40 # TODO(mseaborn): Extend the ARM validator to support this. |
| (...skipping 29 matching lines...) Expand all Loading... |
| 65 exit_status=validation_failure_status) | 70 exit_status=validation_failure_status) |
| 66 env.AddNodeToTestSuite(node, test_suites, 'run_without_stubout_1_test', | 71 env.AddNodeToTestSuite(node, test_suites, 'run_without_stubout_1_test', |
| 67 is_broken=is_validation_disabled) | 72 is_broken=is_validation_disabled) |
| 68 | 73 |
| 69 # With "-c", the executable runs to completion but is not safe. | 74 # With "-c", the executable runs to completion but is not safe. |
| 70 node = env.CommandSelLdrTestNacl( | 75 node = env.CommandSelLdrTestNacl( |
| 71 'partly_invalid_2.out', partly_invalid_nexe, | 76 'partly_invalid_2.out', partly_invalid_nexe, |
| 72 stdout_golden=env.File('without_stubout.stdout'), | 77 stdout_golden=env.File('without_stubout.stdout'), |
| 73 sel_ldr_flags=['-c']) | 78 sel_ldr_flags=['-c']) |
| 74 env.AddNodeToTestSuite(node, test_suites, 'run_without_stubout_2_test') | 79 env.AddNodeToTestSuite(node, test_suites, 'run_without_stubout_2_test') |
| OLD | NEW |