| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # | 2 # |
| 3 # Copyright 2012 the V8 project authors. All rights reserved. | 3 # Copyright 2012 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 help="Don't run crankshaft --always-opt --stress-op test", | 116 help="Don't run crankshaft --always-opt --stress-op test", |
| 117 default=False, action="store_true") | 117 default=False, action="store_true") |
| 118 result.add_option("--shard-count", | 118 result.add_option("--shard-count", |
| 119 help="Split testsuites into this number of shards", | 119 help="Split testsuites into this number of shards", |
| 120 default=1, type="int") | 120 default=1, type="int") |
| 121 result.add_option("--shard-run", | 121 result.add_option("--shard-run", |
| 122 help="Run this shard from the split up tests.", | 122 help="Run this shard from the split up tests.", |
| 123 default=1, type="int") | 123 default=1, type="int") |
| 124 result.add_option("--noprof", help="Disable profiling support", | 124 result.add_option("--noprof", help="Disable profiling support", |
| 125 default=False) | 125 default=False) |
| 126 result.add_option("--xmlout", help='File name of the UnitTest output') |
| 126 | 127 |
| 127 # Flags present in the original test.py that are unsupported in this wrapper: | 128 # Flags present in the original test.py that are unsupported in this wrapper: |
| 128 # -S [-> scons_flags] (we build with gyp/make, not scons) | 129 # -S [-> scons_flags] (we build with gyp/make, not scons) |
| 129 # --no-build (always true) | 130 # --no-build (always true) |
| 130 # --build-only (always false) | 131 # --build-only (always false) |
| 131 # --build-system (always 'gyp') | 132 # --build-system (always 'gyp') |
| 132 # --simulator (always true if arch==arm, always false otherwise) | 133 # --simulator (always true if arch==arm, always false otherwise) |
| 133 # --shell (automatically chosen depending on arch and mode) | 134 # --shell (automatically chosen depending on arch and mode) |
| 134 | 135 |
| 135 return result | 136 return result |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 if options.stress_only: | 200 if options.stress_only: |
| 200 result += ['--stress-only'] | 201 result += ['--stress-only'] |
| 201 if options.nostress: | 202 if options.nostress: |
| 202 result += ['--nostress'] | 203 result += ['--nostress'] |
| 203 if options.shard_count != 1: | 204 if options.shard_count != 1: |
| 204 result += ['--shard-count=%s' % options.shard_count] | 205 result += ['--shard-count=%s' % options.shard_count] |
| 205 if options.shard_run != 1: | 206 if options.shard_run != 1: |
| 206 result += ['--shard-run=%s' % options.shard_run] | 207 result += ['--shard-run=%s' % options.shard_run] |
| 207 if options.noprof: | 208 if options.noprof: |
| 208 result += ['--noprof'] | 209 result += ['--noprof'] |
| 210 if options.xmlout: |
| 211 result += ['--xmlout=%s' % options.xmlout] |
| 209 return result | 212 return result |
| 210 | 213 |
| 211 | 214 |
| 212 def Main(): | 215 def Main(): |
| 213 parser = BuildOptions() | 216 parser = BuildOptions() |
| 214 (options, args) = parser.parse_args() | 217 (options, args) = parser.parse_args() |
| 215 if not ProcessOptions(options): | 218 if not ProcessOptions(options): |
| 216 parser.print_help() | 219 parser.print_help() |
| 217 return 1 | 220 return 1 |
| 218 | 221 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 shell=True, | 264 shell=True, |
| 262 cwd=workspace, | 265 cwd=workspace, |
| 263 env=env) | 266 env=env) |
| 264 returncodes = child.wait() | 267 returncodes = child.wait() |
| 265 | 268 |
| 266 return returncodes | 269 return returncodes |
| 267 | 270 |
| 268 | 271 |
| 269 if __name__ == '__main__': | 272 if __name__ == '__main__': |
| 270 sys.exit(Main()) | 273 sys.exit(Main()) |
| OLD | NEW |