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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 # --no-build (always true) | 124 # --no-build (always true) |
125 # --build-only (always false) | 125 # --build-only (always false) |
126 # --build-system (always 'gyp') | 126 # --build-system (always 'gyp') |
127 # --simulator (always true if arch==arm, always false otherwise) | 127 # --simulator (always true if arch==arm, always false otherwise) |
128 # --shell (automatically chosen depending on arch and mode) | 128 # --shell (automatically chosen depending on arch and mode) |
129 | 129 |
130 return result | 130 return result |
131 | 131 |
132 | 132 |
133 def ProcessOptions(options): | 133 def ProcessOptions(options): |
134 if options.arch_and_mode != None and options.arch_and_mode != "": | 134 if options.arch_and_mode == ".": |
135 tokens = options.arch_and_mode.split(".") | 135 options.arch = [] |
136 options.arch = tokens[0] | 136 options.mode = [] |
137 options.mode = tokens[1] | 137 else: |
138 options.mode = options.mode.split(',') | 138 if options.arch_and_mode != None and options.arch_and_mode != "": |
| 139 tokens = options.arch_and_mode.split(".") |
| 140 options.arch = tokens[0] |
| 141 options.mode = tokens[1] |
| 142 options.mode = options.mode.split(',') |
| 143 options.arch = options.arch.split(',') |
139 for mode in options.mode: | 144 for mode in options.mode: |
140 if not mode in ['debug', 'release']: | 145 if not mode in ['debug', 'release']: |
141 print "Unknown mode %s" % mode | 146 print "Unknown mode %s" % mode |
142 return False | 147 return False |
143 options.arch = options.arch.split(',') | |
144 for arch in options.arch: | 148 for arch in options.arch: |
145 if not arch in ['ia32', 'x64', 'arm']: | 149 if not arch in ['ia32', 'x64', 'arm']: |
146 print "Unknown architecture %s" % arch | 150 print "Unknown architecture %s" % arch |
147 return False | 151 return False |
148 | 152 |
149 return True | 153 return True |
150 | 154 |
151 | 155 |
152 def PassOnOptions(options): | 156 def PassOnOptions(options): |
153 result = [] | 157 result = [] |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 shell = shellpath + "/d8" | 229 shell = shellpath + "/d8" |
226 child = subprocess.Popen(' '.join(args_for_children + | 230 child = subprocess.Popen(' '.join(args_for_children + |
227 ['--arch=' + arch] + | 231 ['--arch=' + arch] + |
228 ['--mode=' + mode] + | 232 ['--mode=' + mode] + |
229 ['--shell=' + shell]), | 233 ['--shell=' + shell]), |
230 shell=True, | 234 shell=True, |
231 cwd=workspace, | 235 cwd=workspace, |
232 env=env) | 236 env=env) |
233 returncodes += child.wait() | 237 returncodes += child.wait() |
234 | 238 |
| 239 if len(options.mode) == 0 and len(options.arch) == 0: |
| 240 print ">>> running tests" |
| 241 shellpath = workspace + '/' + options.outdir |
| 242 env['LD_LIBRARY_PATH'] = shellpath + '/lib.target' |
| 243 shell = shellpath + '/d8' |
| 244 child = subprocess.Popen(' '.join(args_for_children + |
| 245 ['--shell=' + shell]), |
| 246 shell=True, |
| 247 cwd=workspace, |
| 248 env=env) |
| 249 returncodes = child.wait() |
| 250 |
235 return returncodes | 251 return returncodes |
236 | 252 |
237 | 253 |
238 if __name__ == '__main__': | 254 if __name__ == '__main__': |
239 sys.exit(Main()) | 255 sys.exit(Main()) |
OLD | NEW |