| OLD | NEW |
| (Empty) |
| 1 # -*- python -*- | |
| 2 # Copyright (c) 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 os | |
| 7 | |
| 8 Import('env') | |
| 9 | |
| 10 # TODO(robertm): consider adding this to the top level scons files | |
| 11 env.Append(CPPPATH=['${TARGET_ROOT}']) | |
| 12 | |
| 13 env.DualLibrary('gio_wrapped_desc', | |
| 14 ['gio_shm.c', | |
| 15 'gio_shm_unbounded.c', | |
| 16 'gio_nacl_desc.c', | |
| 17 ]) | |
| 18 | |
| 19 # ---------------------------------------------------------- | |
| 20 # Unit Tests | |
| 21 # ---------------------------------------------------------- | |
| 22 | |
| 23 if not env.Bit('coverage_enabled') or not env.Bit('windows'): | |
| 24 gio_shm_test_exe = env.ComponentProgram('gio_shm_test', | |
| 25 ['gio_shm_test.c'], | |
| 26 EXTRA_LIBS=['gio_wrapped_desc', | |
| 27 'nonnacl_srpc', | |
| 28 'nrd_xfer', | |
| 29 'nacl_base', | |
| 30 'imc', | |
| 31 'platform', | |
| 32 'gio', | |
| 33 ]) | |
| 34 if env.Bit('target_arm'): | |
| 35 params = [ '-n', '512', '-m', '2'] | |
| 36 else: | |
| 37 params = [] # default | |
| 38 node = env.CommandTest( | |
| 39 'gio_shm_test.out', | |
| 40 command=[gio_shm_test_exe] + params) | |
| 41 env.AddNodeToTestSuite(node, ['large_tests'], 'run_gio_shm_test') | |
| 42 | |
| 43 gio_shm_unbounded_test_exe = ( | |
| 44 env.ComponentProgram('gio_shm_unbounded_test', | |
| 45 ['gio_shm_unbounded_test.c'], | |
| 46 EXTRA_LIBS=['gio_wrapped_desc', | |
| 47 'nonnacl_srpc', | |
| 48 'nrd_xfer', | |
| 49 'nacl_base', | |
| 50 'imc', | |
| 51 'platform', | |
| 52 'gio', | |
| 53 ])) | |
| 54 node = env.CommandTest( | |
| 55 'gio_shm_unbounded_test.out', | |
| 56 command=[gio_shm_unbounded_test_exe,]) | |
| 57 | |
| 58 env.AddNodeToTestSuite(node, ['small_tests'], 'run_gio_shm_unbounded_test') | |
| 59 | |
| 60 gio_nacl_desc_test_exe = env.ComponentProgram( | |
| 61 'gio_nacl_desc_test', | |
| 62 ['gio_nacl_desc_test.c'], | |
| 63 EXTRA_LIBS=['gio_wrapped_desc', | |
| 64 'nonnacl_srpc', | |
| 65 'nrd_xfer', | |
| 66 'nacl_base', | |
| 67 'imc', | |
| 68 'platform', | |
| 69 'gio', | |
| 70 ]) | |
| 71 | |
| 72 temp_path = env.MakeEmptyFile(prefix='tmp_gio') | |
| 73 | |
| 74 node = env.CommandTest('gio_nacl_desc_test.out', | |
| 75 command = [gio_nacl_desc_test_exe, | |
| 76 # TODO(krasin): use | |
| 77 # testdata/some_binary_file, since | |
| 78 # it's used just as a file with | |
| 79 # bytes, not as a NaCl module. | |
| 80 env.File('../service_runtime/testdata/fib_ar
ray.nexe'), | |
| 81 temp_path]) | |
| 82 | |
| 83 env.AddNodeToTestSuite(node, ['small_tests'], 'run_gio_nacl_desc_test') | |
| OLD | NEW |