| 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 multiprocessing | 6 import multiprocessing |
| 7 import os | 7 import os |
| 8 | 8 |
| 9 Import('env') | 9 Import('env') |
| 10 | 10 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 inputs = env.Command(env.File('file_ok_rdwr.txt'), env.File('file_ok.txt'), | 37 inputs = env.Command(env.File('file_ok_rdwr.txt'), env.File('file_ok.txt'), |
| 38 [Copy(env.File('file_ok_rdwr.txt'), env.File('file_ok.txt')), | 38 [Copy(env.File('file_ok_rdwr.txt'), env.File('file_ok.txt')), |
| 39 Chmod(env.File('file_ok_rdwr.txt'), 0644)]) | 39 Chmod(env.File('file_ok_rdwr.txt'), 0644)]) |
| 40 Default(inputs) | 40 Default(inputs) |
| 41 | 41 |
| 42 # syscalls_test exercise open/read/write, so need filesystem access | 42 # syscalls_test exercise open/read/write, so need filesystem access |
| 43 # via the debug flag to sel_ldr | 43 # via the debug flag to sel_ldr |
| 44 node = env.CommandSelLdrTestNacl( | 44 node = env.CommandSelLdrTestNacl( |
| 45 'syscalls_test.out', | 45 'syscalls_test.out', |
| 46 syscalls_nexe, | 46 syscalls_nexe, |
| 47 args=[env.File('file_ok_rdwr.txt')], | 47 # Arg 1) Test file name |
| 48 # arg 2) 'w' if running on windows, else ' '. |
| 49 args=[env.File('file_ok_rdwr.txt'), 'w' if env.Bit('host_windows') else 'p']
, |
| 48 sel_ldr_flags=['-a']) | 50 sel_ldr_flags=['-a']) |
| 49 env.AddNodeToTestSuite(node, ['small_tests'], 'run_syscall_test') | 51 env.AddNodeToTestSuite(node, ['small_tests'], 'run_syscall_test') |
| 50 | 52 |
| 51 # getpid() works with nacl-glibc, but only via the IRT (there is no | 53 # getpid() works with nacl-glibc, but only via the IRT (there is no |
| 52 # direct syscall version). | 54 # direct syscall version). |
| 53 getpid_is_broken = env.Bit('nacl_glibc') and not env.Bit('tests_use_irt') | 55 getpid_is_broken = env.Bit('nacl_glibc') and not env.Bit('tests_use_irt') |
| 54 | 56 |
| 55 getpid_test_nexe = env.ComponentProgram('getpid_test', | 57 getpid_test_nexe = env.ComponentProgram('getpid_test', |
| 56 ['getpid_test.cc'], | 58 ['getpid_test.cc'], |
| 57 EXTRA_LIBS=['syscall_test_framework', | 59 EXTRA_LIBS=['syscall_test_framework', |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 'run_file_access_enabled_test', | 298 'run_file_access_enabled_test', |
| 297 is_broken=fs_disabling_test_is_broken) | 299 is_broken=fs_disabling_test_is_broken) |
| 298 | 300 |
| 299 node = env.CommandSelLdrTestNacl( | 301 node = env.CommandSelLdrTestNacl( |
| 300 'file_access_disabled.out', | 302 'file_access_disabled.out', |
| 301 file_access_disabling_nexe, | 303 file_access_disabling_nexe, |
| 302 ['--disabled', env.MakeTempDir(prefix='tmp_file_access_disabled_test')]) | 304 ['--disabled', env.MakeTempDir(prefix='tmp_file_access_disabled_test')]) |
| 303 env.AddNodeToTestSuite(node, ['small_tests', 'sel_ldr_tests'], | 305 env.AddNodeToTestSuite(node, ['small_tests', 'sel_ldr_tests'], |
| 304 'run_file_access_disabled_test', | 306 'run_file_access_disabled_test', |
| 305 is_broken=fs_disabling_test_is_broken) | 307 is_broken=fs_disabling_test_is_broken) |
| OLD | NEW |