Changeset 57466 in webkit
- Timestamp:
- Apr 11, 2010 7:54:37 PM (14 years ago)
- Location:
- trunk/WebKitTools
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKitTools/ChangeLog
r57463 r57466 1 2010-04-11 Adam Barth <abarth@webkit.org> 2 3 Unreviewed. 4 5 Fix new-run-webkit-tests regressions cased by Eric's option parsing patch 6 https://bugs.webkit.org/show_bug.cgi?id=37430 7 8 We need some basic unit testing of this script, or we're going to keep 9 breaking it like this. Added missing namespace qualifiers and 10 propagated renaming of an option. 11 12 * Scripts/webkitpy/common/config/ports.py: 13 * Scripts/webkitpy/layout_tests/driver_test.py: 14 * Scripts/webkitpy/layout_tests/port/base.py: 15 * Scripts/webkitpy/layout_tests/port/mac.py: 16 * Scripts/webkitpy/layout_tests/run_webkit_tests.py: 17 1 18 2010-04-11 Eric Seidel <eric@webkit.org> 2 19 -
trunk/WebKitTools/Scripts/webkitpy/common/config/ports.py
r57427 r57466 31 31 import os 32 32 import platform 33 34 from optparse import make_option35 33 36 34 from webkitpy.common.system.executive import Executive -
trunk/WebKitTools/Scripts/webkitpy/layout_tests/driver_test.py
r57463 r57466 64 64 # FIXME: configuration_options belong in a shared location. 65 65 configuration_options = [ 66 make_option('--debug', action='store_const', const='Debug', dest="configuration", help='Set the configuration to Debug'),67 make_option('--release', action='store_const', const='Release', dest="configuration", help='Set the configuration to Release'),66 optparse.make_option('--debug', action='store_const', const='Debug', dest="configuration", help='Set the configuration to Debug'), 67 optparse.make_option('--release', action='store_const', const='Release', dest="configuration", help='Set the configuration to Release'), 68 68 ] 69 69 misc_options = [ 70 make_option('-p', '--platform', action='store', default='mac', help='Platform to test (e.g., "mac", "chromium-mac", etc.'),71 make_option('--timeout', action='store', default='2000', help='test timeout in milliseconds (2000 by default)'),72 make_option('--wrapper', action='store'),73 make_option('--no-pixel-tests', action='store_true', default=False, help='disable pixel-to-pixel PNG comparisons'),70 optparse.make_option('-p', '--platform', action='store', default='mac', help='Platform to test (e.g., "mac", "chromium-mac", etc.'), 71 optparse.make_option('--timeout', action='store', default='2000', help='test timeout in milliseconds (2000 by default)'), 72 optparse.make_option('--wrapper', action='store'), 73 optparse.make_option('--no-pixel-tests', action='store_true', default=False, help='disable pixel-to-pixel PNG comparisons'), 74 74 ] 75 75 option_list = configuration_options + misc_options -
trunk/WebKitTools/Scripts/webkitpy/layout_tests/port/base.py
r57446 r57466 71 71 self._executive = executive 72 72 73 def default_ num_dump_render_trees(self):73 def default_child_processes(self): 74 74 """Return the number of DumpRenderTree instances to use for this 75 75 port.""" -
trunk/WebKitTools/Scripts/webkitpy/layout_tests/port/mac.py
r57444 r57466 56 56 WebKitPort.__init__(self, port_name, options) 57 57 58 def default_ num_dump_render_trees(self):58 def default_child_processes(self): 59 59 # FIXME: new-run-webkit-tests is unstable on Mac running more than 60 60 # four threads in parallel. 61 61 # See https://bugs.webkit.org/show_bug.cgi?id=36622 62 num_dump_render_trees = WebKitPort.default_num_dump_render_trees(self)63 if num_dump_render_trees > 4:62 child_processes = WebKitPort.default_child_processes(self) 63 if child_processes > 4: 64 64 return 4 65 return num_dump_render_trees65 return child_processes 66 66 67 67 def baseline_search_path(self): -
trunk/WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests.py
r57463 r57466 517 517 # Instantiate TestShellThreads and start them. 518 518 threads = [] 519 for i in xrange(int(self._options. num_dump_render_trees)):519 for i in xrange(int(self._options.child_processes)): 520 520 # Create separate TestTypes instances for each thread. 521 521 test_types = [] … … 543 543 def _is_single_threaded(self): 544 544 """Returns whether we should run all the tests in the main thread.""" 545 return int(self._options. num_dump_render_trees) == 1545 return int(self._options.child_processes) == 1 546 546 547 547 def _run_tests(self, file_list, result_summary): … … 960 960 cuml_time += t['total_time'] 961 961 write(" %6.2f cumulative, %6.2f optimal" % 962 (cuml_time, cuml_time / int(self._options. num_dump_render_trees)))962 (cuml_time, cuml_time / int(self._options.child_processes))) 963 963 write("") 964 964 … … 1425 1425 ignore_errors=True) 1426 1426 1427 if not options. num_dump_render_trees:1427 if not options.child_processes: 1428 1428 # FIXME: Investigate perf/flakiness impact of using cpu_count + 1. 1429 options. num_dump_render_trees = port_obj.default_num_dump_render_trees()1429 options.child_processes = port_obj.default_child_processes() 1430 1430 1431 1431 write = create_logging_writer(options, 'config') 1432 write("Running %s DumpRenderTrees in parallel" % options. num_dump_render_trees)1432 write("Running %s DumpRenderTrees in parallel" % options.child_processes) 1433 1433 1434 1434 if not options.time_out_ms: … … 1530 1530 # FIXME: configuration_options should move to WebKitPort and be shared across all scripts. 1531 1531 configuration_options = [ 1532 make_option("-t", "--target", dest="configuration", help="(DEPRECATED)"),1532 optparse.make_option("-t", "--target", dest="configuration", help="(DEPRECATED)"), 1533 1533 # FIXME: --help should display which configuration is default. 1534 make_option('--debug', action='store_const', const='Debug', dest="configuration", help='Set the configuration to Debug'),1535 make_option('--release', action='store_const', const='Release', dest="configuration", help='Set the configuration to Release'),1534 optparse.make_option('--debug', action='store_const', const='Debug', dest="configuration", help='Set the configuration to Debug'), 1535 optparse.make_option('--release', action='store_const', const='Release', dest="configuration", help='Set the configuration to Release'), 1536 1536 # old-run-webkit-tests also accepts -c, --configuration CONFIGURATION. 1537 1537 ] 1538 1538 1539 1539 logging_options = [ 1540 make_option("--log", action="store", default="detailed-progress,unexpected",1540 optparse.make_option("--log", action="store", default="detailed-progress,unexpected", 1541 1541 help="log various types of data. The param should be a comma-separated list of values from: " 1542 1542 "actual,config," + LOG_DETAILED_PROGRESS + ",expected,timing," + LOG_UNEXPECTED + " " 1543 1543 "(defaults to " + "--log detailed-progress,unexpected)"), 1544 make_option("-v", "--verbose", action="store_true", default=False, help="include debug-level logging"),1545 make_option("--sources", action="store_true", help="show expected result file path for each test (implies --verbose)"),1544 optparse.make_option("-v", "--verbose", action="store_true", default=False, help="include debug-level logging"), 1545 optparse.make_option("--sources", action="store_true", help="show expected result file path for each test (implies --verbose)"), 1546 1546 # old-run-webkit-tests has a --slowest option which just prints the slowest 10. 1547 make_option("--num-slow-tests-to-log", default=50, help="Number of slow tests whose timings to print."),1547 optparse.make_option("--num-slow-tests-to-log", default=50, help="Number of slow tests whose timings to print."), 1548 1548 ] 1549 1549 1550 1550 # FIXME: These options should move onto the ChromiumPort. 1551 1551 chromium_options = [ 1552 make_option("--chromium", action="store_true", default=False, help="use the Chromium port"),1553 make_option("--startup-dialog", action="store_true", default=False, help="create a dialog on DumpRenderTree startup"),1554 make_option("--gp-fault-error-box", action="store_true", default=False, help="enable Windows GP fault error box"),1555 make_option("--nocheck-sys-deps", action="store_true", default=False, help="Don't check the system dependencies (themes)"),1552 optparse.make_option("--chromium", action="store_true", default=False, help="use the Chromium port"), 1553 optparse.make_option("--startup-dialog", action="store_true", default=False, help="create a dialog on DumpRenderTree startup"), 1554 optparse.make_option("--gp-fault-error-box", action="store_true", default=False, help="enable Windows GP fault error box"), 1555 optparse.make_option("--nocheck-sys-deps", action="store_true", default=False, help="Don't check the system dependencies (themes)"), 1556 1556 ] 1557 1557 … … 1563 1563 results_options = [ 1564 1564 # NEED for bots: --use-remote-links-to-tests Link to test files within the SVN repository in the results. 1565 make_option("-p", "--pixel-tests'", action="store_true", dest="pixel_tests", help="Enable pixel-to-pixel PNG comparisons"),1566 make_option("--no-pixel-tests", action="store_false", dest="pixel_tests", help="Disable pixel-to-pixel PNG comparisons"),1567 make_option("--fuzzy-pixel-tests", action="store_true", default=False, help="Also use fuzzy matching to compare pixel test outputs."),1565 optparse.make_option("-p", "--pixel-tests'", action="store_true", dest="pixel_tests", help="Enable pixel-to-pixel PNG comparisons"), 1566 optparse.make_option("--no-pixel-tests", action="store_false", dest="pixel_tests", help="Disable pixel-to-pixel PNG comparisons"), 1567 optparse.make_option("--fuzzy-pixel-tests", action="store_true", default=False, help="Also use fuzzy matching to compare pixel test outputs."), 1568 1568 # old-run-webkit-tests allows a specific tollerance: --tolerance t Ignore image differences less than this percentage (default: 0.1) 1569 make_option("--results-directory", default="layout-test-results", help="Output results directory source dir, relative to Debug or Release"),1570 make_option("--new-baseline", action="store_true", default=False, help="Save all generated results as new baselines into the platform directory, overwriting whatever's already there."),1569 optparse.make_option("--results-directory", default="layout-test-results", help="Output results directory source dir, relative to Debug or Release"), 1570 optparse.make_option("--new-baseline", action="store_true", default=False, help="Save all generated results as new baselines into the platform directory, overwriting whatever's already there."), 1571 1571 # FIXME: --noshow should be --no-show to match the GNU get_opt pattern. 1572 make_option("--noshow-results", action="store_true", default=False, help="Don't launch a browser with results after the tests are done"),1572 optparse.make_option("--noshow-results", action="store_true", default=False, help="Don't launch a browser with results after the tests are done"), 1573 1573 # old-run-webkit-tests: --[no-]launch-safari Launch (or do not launch) Safari to display test results (default: launch) 1574 make_option("--full-results-html", action="store_true", default=False, help="Show all failures in results.html, rather than only regressions"),1575 make_option("--clobber-old-results", action="store_true", default=False, help="Clobbers test results from previous runs."),1576 make_option("--platform", help="Override the platform for expected results"),1574 optparse.make_option("--full-results-html", action="store_true", default=False, help="Show all failures in results.html, rather than only regressions"), 1575 optparse.make_option("--clobber-old-results", action="store_true", default=False, help="Clobbers test results from previous runs."), 1576 optparse.make_option("--platform", help="Override the platform for expected results"), 1577 1577 # old-run-webkit-tests also has HTTP toggle options: 1578 1578 # --[no-]http Run (or do not run) http tests (default: run) … … 1582 1582 test_options = [ 1583 1583 # old-run-webkit-tests has --valgrind instead of wrapper. 1584 make_option("--wrapper", help="wrapper command to insert before invocations of DumpRenderTree; option is split "1584 optparse.make_option("--wrapper", help="wrapper command to insert before invocations of DumpRenderTree; option is split " 1585 1585 "on whitespace before running. (Example: --wrapper='valgrind --smc-check=all')"), 1586 1586 # old-run-webkit-tests: -i|--ignore-tests Comma-separated list of directories or tests to ignore 1587 make_option("--test-list", action="append", help="read list of tests to run from file", metavar="FILE"),1587 optparse.make_option("--test-list", action="append", help="read list of tests to run from file", metavar="FILE"), 1588 1588 # old-run-webkit-tests uses --skipped==[default|ignore|only] instead of --force: 1589 make_option("--force", action="store_true", default=False, help="Run all tests, even those marked SKIP in the test list"),1590 make_option("--use-apache", action="store_true", default=False, help="Whether to use apache instead of lighttpd."),1591 make_option("--time-out-ms", help="Set the timeout for each test"),1589 optparse.make_option("--force", action="store_true", default=False, help="Run all tests, even those marked SKIP in the test list"), 1590 optparse.make_option("--use-apache", action="store_true", default=False, help="Whether to use apache instead of lighttpd."), 1591 optparse.make_option("--time-out-ms", help="Set the timeout for each test"), 1592 1592 # old-run-webkit-tests calls --randomize-order --random: 1593 make_option("--randomize-order", action="store_true", default=False, help=("Run tests in random order (useful for tracking down corruption)")),1594 make_option("--run-chunk", help=("Run a specified chunk (n:l), the nth of len l, of the layout tests")),1595 make_option("--run-part", help=("Run a specified part (n:m), the nth of m parts, of the layout tests")),1593 optparse.make_option("--randomize-order", action="store_true", default=False, help=("Run tests in random order (useful for tracking down corruption)")), 1594 optparse.make_option("--run-chunk", help=("Run a specified chunk (n:l), the nth of len l, of the layout tests")), 1595 optparse.make_option("--run-part", help=("Run a specified part (n:m), the nth of m parts, of the layout tests")), 1596 1596 # old-run-webkit-tests calls --batch-size: --nthly n Restart DumpRenderTree every n tests (default: 1000) 1597 make_option("--batch-size", help=("Run a the tests in batches (n), after every n tests, DumpRenderTree is relaunched.")),1597 optparse.make_option("--batch-size", help=("Run a the tests in batches (n), after every n tests, DumpRenderTree is relaunched.")), 1598 1598 # old-run-webkit-tests calls --run-singly: -1|--singly Isolate each test case run (implies --nthly 1 --verbose) 1599 make_option("--run-singly", action="store_true", default=False, help="run a separate DumpRenderTree for each test"),1600 make_option("--child-processes", help="Number of DumpRenderTrees to run in parallel."),# FIXME: Display default.1601 make_option("--experimental-fully-parallel", action="store_true", default=False, help="run all tests in parallel"),1599 optparse.make_option("--run-singly", action="store_true", default=False, help="run a separate DumpRenderTree for each test"), 1600 optparse.make_option("--child-processes", help="Number of DumpRenderTrees to run in parallel."), # FIXME: Display default. 1601 optparse.make_option("--experimental-fully-parallel", action="store_true", default=False, help="run all tests in parallel"), 1602 1602 # FIXME: Need --exit-after-n-failures N Exit after the first N failures instead of running all tests 1603 1603 # FIXME: consider: --iterations n Number of times to run the set of tests (e.g. ABCABCABC) … … 1605 1605 1606 1606 misc_options = [ 1607 make_option("--lint-test-files", action="store_true", default=False, help="Makes sure the test files parse for all configurations. Does not run any tests."),1607 optparse.make_option("--lint-test-files", action="store_true", default=False, help="Makes sure the test files parse for all configurations. Does not run any tests."), 1608 1608 ] 1609 1609 1610 1610 # FIXME: Move these into json_results_generator.py 1611 1611 results_json_options = [ 1612 make_option("--builder-name", default="DUMMY_BUILDER_NAME", help=("The name of the builder shown on the waterfall running this script e.g. WebKit.")),1613 make_option("--build-name", default="DUMMY_BUILD_NAME", help=("The name of the builder used in its path, e.g. webkit-rel.")),1614 make_option("--build-number", default="DUMMY_BUILD_NUMBER", help=("The build number of the builder running this script.")),1612 optparse.make_option("--builder-name", default="DUMMY_BUILDER_NAME", help=("The name of the builder shown on the waterfall running this script e.g. WebKit.")), 1613 optparse.make_option("--build-name", default="DUMMY_BUILD_NAME", help=("The name of the builder used in its path, e.g. webkit-rel.")), 1614 optparse.make_option("--build-number", default="DUMMY_BUILD_NUMBER", help=("The build number of the builder running this script.")), 1615 1615 ] 1616 1616 1617 option s_list = configuration_options + logging_options + chromium_options + results_options + test_options + misc_options + results_json_options1617 option_list = configuration_options + logging_options + chromium_options + results_options + test_options + misc_options + results_json_options 1618 1618 option_parser = optparse.OptionParser(option_list=option_list) 1619 1619 return option_parser.parse_args(args)
Note: See TracChangeset
for help on using the changeset viewer.