OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # | 2 # |
3 # Copyright 2011 the V8 project authors. All rights reserved. | 3 # Copyright 2011 the V8 project authors. All rights reserved. |
4 # Redistribution and use in source and binary forms, with or without | 4 # Redistribution and use in source and binary forms, with or without |
5 # modification, are permitted provided that the following conditions are | 5 # modification, are permitted provided that the following conditions are |
6 # met: | 6 # met: |
7 # | 7 # |
8 # * Redistributions of source code must retain the above copyright | 8 # * Redistributions of source code must retain the above copyright |
9 # notice, this list of conditions and the following disclaimer. | 9 # notice, this list of conditions and the following disclaimer. |
10 # * Redistributions in binary form must reproduce the above | 10 # * Redistributions in binary form must reproduce the above |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 if not ProcessOptions(options): | 200 if not ProcessOptions(options): |
201 parser.print_help() | 201 parser.print_help() |
202 return 1 | 202 return 1 |
203 | 203 |
204 workspace = abspath(join(dirname(sys.argv[0]), '..')) | 204 workspace = abspath(join(dirname(sys.argv[0]), '..')) |
205 args_for_children = [workspace + '/tools/test.py'] + PassOnOptions(options) | 205 args_for_children = [workspace + '/tools/test.py'] + PassOnOptions(options) |
206 args_for_children += ['--no-build', '--build-system=gyp'] | 206 args_for_children += ['--no-build', '--build-system=gyp'] |
207 for arg in args: | 207 for arg in args: |
208 args_for_children += [arg] | 208 args_for_children += [arg] |
209 returncodes = 0 | 209 returncodes = 0 |
| 210 env = os.environ |
210 | 211 |
211 for mode in options.mode: | 212 for mode in options.mode: |
212 for arch in options.arch: | 213 for arch in options.arch: |
213 print ">>> running tests for %s.%s" % (arch, mode) | 214 print ">>> running tests for %s.%s" % (arch, mode) |
214 shell = workspace + '/' + options.outdir + '/' + arch + '.' + mode + "/d8" | 215 shellpath = workspace + '/' + options.outdir + '/' + arch + '.' + mode |
| 216 env['LD_LIBRARY_PATH'] = shellpath + '/lib.target' |
| 217 shell = shellpath + "/d8" |
215 child = subprocess.Popen(' '.join(args_for_children + | 218 child = subprocess.Popen(' '.join(args_for_children + |
216 ['--arch=' + arch] + | 219 ['--arch=' + arch] + |
217 ['--mode=' + mode] + | 220 ['--mode=' + mode] + |
218 ['--shell=' + shell]), | 221 ['--shell=' + shell]), |
219 shell=True, | 222 shell=True, |
220 cwd=workspace) | 223 cwd=workspace, |
| 224 env=env) |
221 returncodes += child.wait() | 225 returncodes += child.wait() |
222 | 226 |
223 return returncodes | 227 return returncodes |
224 | 228 |
225 | 229 |
226 if __name__ == '__main__': | 230 if __name__ == '__main__': |
227 sys.exit(Main()) | 231 sys.exit(Main()) |
OLD | NEW |