| 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 1163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1174 default=False, action="store_true") | 1174 default=False, action="store_true") |
| 1175 result.add_option("-S", dest="scons_flags", help="Flag to pass through to scon
s", | 1175 result.add_option("-S", dest="scons_flags", help="Flag to pass through to scon
s", |
| 1176 default=[], action="append") | 1176 default=[], action="append") |
| 1177 result.add_option("-p", "--progress", | 1177 result.add_option("-p", "--progress", |
| 1178 help="The style of progress indicator (verbose, dots, color, mono)", | 1178 help="The style of progress indicator (verbose, dots, color, mono)", |
| 1179 choices=PROGRESS_INDICATORS.keys(), default="mono") | 1179 choices=PROGRESS_INDICATORS.keys(), default="mono") |
| 1180 result.add_option("--no-build", help="Don't build requirements", | 1180 result.add_option("--no-build", help="Don't build requirements", |
| 1181 default=False, action="store_true") | 1181 default=False, action="store_true") |
| 1182 result.add_option("--build-only", help="Only build requirements, don't run the
tests", | 1182 result.add_option("--build-only", help="Only build requirements, don't run the
tests", |
| 1183 default=False, action="store_true") | 1183 default=False, action="store_true") |
| 1184 result.add_option("--build-system", help="Build system in use (scons or gyp)", | |
| 1185 default='scons') | |
| 1186 result.add_option("--report", help="Print a summary of the tests to be run", | 1184 result.add_option("--report", help="Print a summary of the tests to be run", |
| 1187 default=False, action="store_true") | 1185 default=False, action="store_true") |
| 1188 result.add_option("-s", "--suite", help="A test suite", | 1186 result.add_option("-s", "--suite", help="A test suite", |
| 1189 default=[], action="append") | 1187 default=[], action="append") |
| 1190 result.add_option("-t", "--timeout", help="Timeout in seconds", | 1188 result.add_option("-t", "--timeout", help="Timeout in seconds", |
| 1191 default=60, type="int") | 1189 default=60, type="int") |
| 1192 result.add_option("--arch", help='The architecture to run tests for', | 1190 result.add_option("--arch", help='The architecture to run tests for', |
| 1193 default='none') | 1191 default='none') |
| 1194 result.add_option("--snapshot", help="Run the tests with snapshot turned on", | 1192 result.add_option("--snapshot", help="Run the tests with snapshot turned on", |
| 1195 default=False, action="store_true") | 1193 default=False, action="store_true") |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1275 else: | 1273 else: |
| 1276 options.special_command = "@--crankshaft" | 1274 options.special_command = "@--crankshaft" |
| 1277 if options.shell == "d8": | 1275 if options.shell == "d8": |
| 1278 if options.special_command: | 1276 if options.special_command: |
| 1279 options.special_command += " --test" | 1277 options.special_command += " --test" |
| 1280 else: | 1278 else: |
| 1281 options.special_command = "@--test" | 1279 options.special_command = "@--test" |
| 1282 if options.noprof: | 1280 if options.noprof: |
| 1283 options.scons_flags.append("prof=off") | 1281 options.scons_flags.append("prof=off") |
| 1284 options.scons_flags.append("profilingsupport=off") | 1282 options.scons_flags.append("profilingsupport=off") |
| 1285 if options.build_system == 'gyp': | |
| 1286 if options.build_only: | |
| 1287 print "--build-only not supported for gyp, please build manually." | |
| 1288 options.build_only = False | |
| 1289 return True | 1283 return True |
| 1290 | 1284 |
| 1291 | 1285 |
| 1292 REPORT_TEMPLATE = """\ | 1286 REPORT_TEMPLATE = """\ |
| 1293 Total: %(total)i tests | 1287 Total: %(total)i tests |
| 1294 * %(skipped)4d tests will be skipped | 1288 * %(skipped)4d tests will be skipped |
| 1295 * %(nocrash)4d tests are expected to be flaky but not crash | 1289 * %(nocrash)4d tests are expected to be flaky but not crash |
| 1296 * %(pass)4d tests are expected to pass | 1290 * %(pass)4d tests are expected to pass |
| 1297 * %(fail_ok)4d tests are expected to fail that we won't fix | 1291 * %(fail_ok)4d tests are expected to fail that we won't fix |
| 1298 * %(fail)4d tests are expected to fail that we should fix\ | 1292 * %(fail)4d tests are expected to fail that we should fix\ |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1398 for arg in args: | 1392 for arg in args: |
| 1399 path = SplitPath(arg) | 1393 path = SplitPath(arg) |
| 1400 paths.append(path) | 1394 paths.append(path) |
| 1401 | 1395 |
| 1402 # Check for --valgrind option. If enabled, we overwrite the special | 1396 # Check for --valgrind option. If enabled, we overwrite the special |
| 1403 # command flag with a command that uses the run-valgrind.py script. | 1397 # command flag with a command that uses the run-valgrind.py script. |
| 1404 if options.valgrind: | 1398 if options.valgrind: |
| 1405 run_valgrind = join(workspace, "tools", "run-valgrind.py") | 1399 run_valgrind = join(workspace, "tools", "run-valgrind.py") |
| 1406 options.special_command = "python -u " + run_valgrind + " @" | 1400 options.special_command = "python -u " + run_valgrind + " @" |
| 1407 | 1401 |
| 1408 if options.build_system == 'gyp': | |
| 1409 SUFFIX['debug'] = '' | |
| 1410 | |
| 1411 shell = abspath(options.shell) | 1402 shell = abspath(options.shell) |
| 1412 buildspace = dirname(shell) | 1403 buildspace = dirname(shell) |
| 1413 | 1404 |
| 1414 context = Context(workspace, buildspace, VERBOSE, | 1405 context = Context(workspace, buildspace, VERBOSE, |
| 1415 shell, | 1406 shell, |
| 1416 options.timeout, | 1407 options.timeout, |
| 1417 GetSpecialCommandProcessor(options.special_command), | 1408 GetSpecialCommandProcessor(options.special_command), |
| 1418 options.suppress_dialogs, | 1409 options.suppress_dialogs, |
| 1419 options.store_unexpected_output) | 1410 options.store_unexpected_output) |
| 1420 # First build the required targets | 1411 # First build the required targets |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1516 for entry in timed_tests[:20]: | 1507 for entry in timed_tests[:20]: |
| 1517 t = FormatTime(entry.duration) | 1508 t = FormatTime(entry.duration) |
| 1518 sys.stderr.write("%4i (%s) %s\n" % (index, t, entry.GetLabel())) | 1509 sys.stderr.write("%4i (%s) %s\n" % (index, t, entry.GetLabel())) |
| 1519 index += 1 | 1510 index += 1 |
| 1520 | 1511 |
| 1521 return result | 1512 return result |
| 1522 | 1513 |
| 1523 | 1514 |
| 1524 if __name__ == '__main__': | 1515 if __name__ == '__main__': |
| 1525 sys.exit(Main()) | 1516 sys.exit(Main()) |
| OLD | NEW |