OLD | NEW |
---|---|
1 # -*- python -*- | 1 # -*- python -*- |
2 # Copyright 2010 The Native Client Authors. All rights reserved. | 2 # Copyright 2010 The Native Client Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can | 3 # Use of this source code is governed by a BSD-style license that can |
4 # be found in the LICENSE file. | 4 # be found in the LICENSE file. |
5 | 5 |
6 import os | 6 import os |
7 | 7 |
8 Import('env') | 8 Import('env') |
9 | 9 |
10 env.Replace(EXTRA_LIBS=['pthread']) | 10 env.Replace(EXTRA_LIBS=['pthread']) |
11 | 11 |
12 env.ComponentProgram('egyptian_cotton.nexe', 'egyptian_cotton.c') | 12 egyptian_cotton_nexe = env.ComponentProgram('egyptian_cotton', |
13 'egyptian_cotton.c') | |
13 | 14 |
14 platform_limits_known = False | 15 platform_limits_known = False |
15 | 16 |
16 # this test accepts the number of threads to attempt to create as an | 17 # this test accepts the number of threads to attempt to create as an |
17 # argument. NACL_THREAD_MAX is 8192 for x86-32 and x86-64, and 4096 | 18 # argument. NACL_THREAD_MAX is 8192 for x86-32 and x86-64, and 4096 |
18 # for the Arm. See the header files | 19 # for the Arm. See the header files |
19 # src/trusted/service_runtime/arch/{x86,arm}/sel_ldr_{x86,arm}.h for | 20 # src/trusted/service_runtime/arch/{x86,arm}/sel_ldr_{x86,arm}.h for |
20 # the current values (and update this comment to reflect reality!). | 21 # the current values (and update this comment to reflect reality!). |
21 # On the x86_32, the actual number of threads possible is slightly | 22 # On the x86_32, the actual number of threads possible is slightly |
22 # fewer than 8192, since the service runtime's trusted internal | 23 # fewer than 8192, since the service runtime's trusted internal |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
110 # TODO(bsy): figure out why this fails on atom64 with 1GB RAM. | 111 # TODO(bsy): figure out why this fails on atom64 with 1GB RAM. |
111 # Disable thread_stack_alloc_test on one specific atom64 box. | 112 # Disable thread_stack_alloc_test on one specific atom64 box. |
112 if os.environ.get('COMPUTERNAME') == 'NACL-ATOM1': | 113 if os.environ.get('COMPUTERNAME') == 'NACL-ATOM1': |
113 tests = [t for t in tests if t[0] != 'thread_stack_alloc_test'] | 114 tests = [t for t in tests if t[0] != 'thread_stack_alloc_test'] |
114 | 115 |
115 # This test does not make much sense on Valgrind, and is too slow. | 116 # This test does not make much sense on Valgrind, and is too slow. |
116 if env.IsRunningUnderValgrind(): | 117 if env.IsRunningUnderValgrind(): |
117 tests = [t for t in tests if t[0] != 'thread_stack_alloc_test'] | 118 tests = [t for t in tests if t[0] != 'thread_stack_alloc_test'] |
118 | 119 |
119 def ThreadTestNode(name, args): | 120 def ThreadTestNode(name, args): |
120 cmd = [env.File('egyptian_cotton.nexe')] + args | 121 return env.CommandSelLdrTestNacl(name + '.out', |
121 return env.CommandSelLdrTestNacl(name + '.out', command = cmd) | 122 egyptian_cotton_nexe, |
123 args = args) | |
Nick Bray
2011/06/23 18:32:24
No spaces around keyword args.
args = args -> arg
pdox
2011/06/23 20:42:58
Done.
| |
122 | 124 |
123 nodes = [ ThreadTestNode(name, args) for name, args in tests ] | 125 nodes = [ ThreadTestNode(name, args) for name, args in tests ] |
124 | 126 |
125 is_broken = env.Bit('target_arm') and env.UsingEmulator() | 127 is_broken = env.Bit('target_arm') and env.UsingEmulator() |
126 for p, n in zip(tests, nodes): | 128 for p, n in zip(tests, nodes): |
127 env.AddNodeToTestSuite(n, ['small_tests', 'sel_ldr_tests'], 'run_' + p[0], | 129 env.AddNodeToTestSuite(n, ['small_tests', 'sel_ldr_tests'], 'run_' + p[0], |
128 is_broken=is_broken) | 130 is_broken=is_broken) |
OLD | NEW |