| 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 platform | 6 import platform |
| 7 import os | 7 import os |
| 8 | 8 |
| 9 Import('env') | 9 Import('env') |
| 10 | 10 |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 ['nacl_error_code.c', | 267 ['nacl_error_code.c', |
| 268 ]) | 268 ]) |
| 269 | 269 |
| 270 env.ComponentLibrary('sel_debug_dummy', 'nacl_debug_init_dummy.c') | 270 env.ComponentLibrary('sel_debug_dummy', 'nacl_debug_init_dummy.c') |
| 271 | 271 |
| 272 env.ComponentLibrary('container', | 272 env.ComponentLibrary('container', |
| 273 ['generic_container/container.c', | 273 ['generic_container/container.c', |
| 274 ]) | 274 ]) |
| 275 | 275 |
| 276 | 276 |
| 277 env.ComponentLibrary('nacl_xdr', | |
| 278 ['fs/xdr.c', | |
| 279 'fs/obj_proxy.c', | |
| 280 ]) | |
| 281 | |
| 282 # NOTE(robertm): these extra libs were orignially only added to the | 277 # NOTE(robertm): these extra libs were orignially only added to the |
| 283 # sel_ldr binary | 278 # sel_ldr binary |
| 284 # TODO(robertm): see who really needs them and remove | 279 # TODO(robertm): see who really needs them and remove |
| 285 if env.Bit('windows'): | 280 if env.Bit('windows'): |
| 286 env.Append( | 281 env.Append( |
| 287 LIBS = [ | 282 LIBS = [ |
| 288 'ws2_32', | 283 'ws2_32', |
| 289 'kernel32', | 284 'kernel32', |
| 290 'advapi32', | 285 'advapi32', |
| 291 'winmm', | 286 'winmm', |
| (...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 772 auxv_stdout = env.File(os.path.join(arch_testdata_dir, 'auxv_phdr.stdout')) | 767 auxv_stdout = env.File(os.path.join(arch_testdata_dir, 'auxv_phdr.stdout')) |
| 773 node = env.CommandSelLdrTestNacl('auxv_phdr.out', | 768 node = env.CommandSelLdrTestNacl('auxv_phdr.out', |
| 774 auxv_nexe, stdout_golden=auxv_stdout) | 769 auxv_nexe, stdout_golden=auxv_stdout) |
| 775 # TODO(mcgrathr): Add arm testdata files and remove the is_broken. | 770 # TODO(mcgrathr): Add arm testdata files and remove the is_broken. |
| 776 # Producing a working ARM binary requires debugging untrusted ARM stuff | 771 # Producing a working ARM binary requires debugging untrusted ARM stuff |
| 777 # that the auxv_phdr support enables, so is putting cart before horse. | 772 # that the auxv_phdr support enables, so is putting cart before horse. |
| 778 env.AddNodeToTestSuite(node, ['small_tests'], 'run_auxv_phdr_test', | 773 env.AddNodeToTestSuite(node, ['small_tests'], 'run_auxv_phdr_test', |
| 779 is_broken=not os.path.exists(str(auxv_nexe))) | 774 is_broken=not os.path.exists(str(auxv_nexe))) |
| 780 | 775 |
| 781 # ---------------------------------------------------------- | 776 # ---------------------------------------------------------- |
| 782 # Integration Tests | |
| 783 # ---------------------------------------------------------- | |
| 784 | |
| 785 # Doesn't work on windows under coverage. | |
| 786 # TODO(bradnelson): fix this to work on windows under coverage. | |
| 787 # NOTE: uses validator | |
| 788 if ((not env.Bit('windows') or not env.Bit('coverage_enabled')) and | |
| 789 not env.CrossToolsBuild()): | |
| 790 obj_proxy_test_inputs = [ 'fs/obj_proxy_test.c', ] | |
| 791 obj_proxy_test = env.ComponentProgram( | |
| 792 'obj_proxy_test', | |
| 793 obj_proxy_test_inputs, | |
| 794 EXTRA_LIBS=['sel', | |
| 795 'env_cleanser', | |
| 796 'manifest_proxy', | |
| 797 'simple_service', | |
| 798 'thread_interface', | |
| 799 'gio_wrapped_desc', | |
| 800 'nonnacl_srpc', | |
| 801 'nrd_xfer', | |
| 802 'nacl_perf_counter', | |
| 803 'nacl_base', | |
| 804 'imc', | |
| 805 'nacl_fault_inject', | |
| 806 'nacl_interval', | |
| 807 'platform', | |
| 808 'nacl_xdr', | |
| 809 'container', | |
| 810 ] + DEBUG_LIBS) | |
| 811 | |
| 812 node = env.CommandTest( | |
| 813 'obj_proxy_test.out', | |
| 814 # NOTE: this is run out of obj/ rather than staging/ | |
| 815 [obj_proxy_test, '-n', '2048'], | |
| 816 size='huge') | |
| 817 # TODO(bsy): change this test to use less time -- most of it (on windows) | |
| 818 # is in the RNG, so with this will inherently speed up when the RNG is | |
| 819 # updated. | |
| 820 | |
| 821 env.AddNodeToTestSuite(node, ['small_tests'], 'obj_proxy_tests') | |
| 822 | |
| 823 # ---------------------------------------------------------- | |
| 824 # Integration Tests With Canned x86 Binaries | 777 # Integration Tests With Canned x86 Binaries |
| 825 # ---------------------------------------------------------- | 778 # ---------------------------------------------------------- |
| 826 # To update the canned tests run: | 779 # To update the canned tests run: |
| 827 # ./scons platform=x86-64 | 780 # ./scons platform=x86-64 |
| 828 # cp scons-out/nacl-x86-64/staging/{mandel.nexe,fib_*} \ | 781 # cp scons-out/nacl-x86-64/staging/{mandel.nexe,fib_*} \ |
| 829 # src/trusted/service_runtime/testdata/x86_64/ | 782 # src/trusted/service_runtime/testdata/x86_64/ |
| 830 # ./scons platform=x86-32 | 783 # ./scons platform=x86-32 |
| 831 # cp scons-out/nacl-x86-32/staging/{mandel.nexe,fib_*} \ | 784 # cp scons-out/nacl-x86-32/staging/{mandel.nexe,fib_*} \ |
| 832 # src/trusted/service_runtime/testdata/x86_32/ | 785 # src/trusted/service_runtime/testdata/x86_32/ |
| 833 | 786 |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 974 # TODO(tuduce): Make it work on windows. | 927 # TODO(tuduce): Make it work on windows. |
| 975 env.AddNodeToTestSuite(node, ['medium_tests'], | 928 env.AddNodeToTestSuite(node, ['medium_tests'], |
| 976 'run_sel_ldr_thread_death_test', | 929 'run_sel_ldr_thread_death_test', |
| 977 is_broken=env.Bit('windows')) | 930 is_broken=env.Bit('windows')) |
| 978 | 931 |
| 979 | 932 |
| 980 # This currently tests linking of sel_main_chrome.c *only*. We do not | 933 # This currently tests linking of sel_main_chrome.c *only*. We do not |
| 981 # expect this program to do anything meaningful when run. | 934 # expect this program to do anything meaningful when run. |
| 982 env.ComponentProgram('sel_main_chrome_test', ['sel_main_chrome_test.c'], | 935 env.ComponentProgram('sel_main_chrome_test', ['sel_main_chrome_test.c'], |
| 983 EXTRA_LIBS=sel_ldr_libs) | 936 EXTRA_LIBS=sel_ldr_libs) |
| OLD | NEW |