OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # | 2 # |
3 # Copyright 2008 the V8 project authors. All rights reserved. | 3 # Copyright 2008 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 1066 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1077 default='release') | 1077 default='release') |
1078 result.add_option("-v", "--verbose", help="Verbose output", | 1078 result.add_option("-v", "--verbose", help="Verbose output", |
1079 default=False, action="store_true") | 1079 default=False, action="store_true") |
1080 result.add_option("-S", dest="scons_flags", help="Flag to pass through to scon
s", | 1080 result.add_option("-S", dest="scons_flags", help="Flag to pass through to scon
s", |
1081 default=[], action="append") | 1081 default=[], action="append") |
1082 result.add_option("-p", "--progress", | 1082 result.add_option("-p", "--progress", |
1083 help="The style of progress indicator (verbose, dots, color, mono)", | 1083 help="The style of progress indicator (verbose, dots, color, mono)", |
1084 choices=PROGRESS_INDICATORS.keys(), default="mono") | 1084 choices=PROGRESS_INDICATORS.keys(), default="mono") |
1085 result.add_option("--no-build", help="Don't build requirements", | 1085 result.add_option("--no-build", help="Don't build requirements", |
1086 default=False, action="store_true") | 1086 default=False, action="store_true") |
| 1087 result.add_option("--build-only", help="Only build requirements, don't run the
tests", |
| 1088 default=False, action="store_true") |
1087 result.add_option("--report", help="Print a summary of the tests to be run", | 1089 result.add_option("--report", help="Print a summary of the tests to be run", |
1088 default=False, action="store_true") | 1090 default=False, action="store_true") |
1089 result.add_option("-s", "--suite", help="A test suite", | 1091 result.add_option("-s", "--suite", help="A test suite", |
1090 default=[], action="append") | 1092 default=[], action="append") |
1091 result.add_option("-t", "--timeout", help="Timeout in seconds", | 1093 result.add_option("-t", "--timeout", help="Timeout in seconds", |
1092 default=60, type="int") | 1094 default=60, type="int") |
1093 result.add_option("--arch", help='The architecture to run tests for', | 1095 result.add_option("--arch", help='The architecture to run tests for', |
1094 default='none') | 1096 default='none') |
1095 result.add_option("--simulator", help="Run tests with architecture simulator", | 1097 result.add_option("--simulator", help="Run tests with architecture simulator", |
1096 default='none') | 1098 default='none') |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1254 reqs = [ ] | 1256 reqs = [ ] |
1255 for path in paths: | 1257 for path in paths: |
1256 reqs += root.GetBuildRequirements(path, context) | 1258 reqs += root.GetBuildRequirements(path, context) |
1257 reqs = list(set(reqs)) | 1259 reqs = list(set(reqs)) |
1258 if len(reqs) > 0: | 1260 if len(reqs) > 0: |
1259 if options.j != 1: | 1261 if options.j != 1: |
1260 options.scons_flags += ['-j', str(options.j)] | 1262 options.scons_flags += ['-j', str(options.j)] |
1261 if not BuildRequirements(context, reqs, options.mode, options.scons_flags)
: | 1263 if not BuildRequirements(context, reqs, options.mode, options.scons_flags)
: |
1262 return 1 | 1264 return 1 |
1263 | 1265 |
| 1266 # Just return if we are only building the targets for running the tests. |
| 1267 if options.build_only: |
| 1268 return 0 |
| 1269 |
1264 # Get status for tests | 1270 # Get status for tests |
1265 sections = [ ] | 1271 sections = [ ] |
1266 defs = { } | 1272 defs = { } |
1267 root.GetTestStatus(context, sections, defs) | 1273 root.GetTestStatus(context, sections, defs) |
1268 config = Configuration(sections, defs) | 1274 config = Configuration(sections, defs) |
1269 | 1275 |
1270 # List the tests | 1276 # List the tests |
1271 all_cases = [ ] | 1277 all_cases = [ ] |
1272 all_unused = [ ] | 1278 all_unused = [ ] |
1273 unclassified_tests = [ ] | 1279 unclassified_tests = [ ] |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1340 for entry in timed_tests[:20]: | 1346 for entry in timed_tests[:20]: |
1341 t = FormatTime(entry.duration) | 1347 t = FormatTime(entry.duration) |
1342 sys.stderr.write("%4i (%s) %s\n" % (index, t, entry.GetLabel())) | 1348 sys.stderr.write("%4i (%s) %s\n" % (index, t, entry.GetLabel())) |
1343 index += 1 | 1349 index += 1 |
1344 | 1350 |
1345 return result | 1351 return result |
1346 | 1352 |
1347 | 1353 |
1348 if __name__ == '__main__': | 1354 if __name__ == '__main__': |
1349 sys.exit(Main()) | 1355 sys.exit(Main()) |
OLD | NEW |