Changeset 92641 in webkit


Ignore:
Timestamp:
Aug 8, 2011 3:04:34 PM (13 years ago)
Author:
abarth@webkit.org
Message:

bulk-optimize-baselines should take directories on the command line
https://bugs.webkit.org/show_bug.cgi?id=65879

Reviewed by Dimitri Glazkov.

Passing lists of tests via stdin is a pain. It's easier if the command
takes a list of tests on the command line, like run-webkit-tests.

  • Scripts/webkitpy/tool/commands/rebaseline.py:
Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r92637 r92641  
     12011-08-08  Adam Barth  <abarth@webkit.org>
     2
     3        bulk-optimize-baselines should take directories on the command line
     4        https://bugs.webkit.org/show_bug.cgi?id=65879
     5
     6        Reviewed by Dimitri Glazkov.
     7
     8        Passing lists of tests via stdin is a pain.  It's easier if the command
     9        takes a list of tests on the command line, like run-webkit-tests.
     10
     11        * Scripts/webkitpy/tool/commands/rebaseline.py:
     12
    1132011-08-08  Adam Barth  <abarth@webkit.org>
    214
  • trunk/Tools/Scripts/webkitpy/tool/commands/rebaseline.py

    r92624 r92641  
    3131import shutil
    3232import urllib
    33 import fileinput
    3433
    3534import webkitpy.common.config.urls as config_urls
     
    4342from webkitpy.layout_tests.models.test_expectations import TestExpectations
    4443from webkitpy.layout_tests.port import factory, builders
     44from webkitpy.layout_tests.port import test_files
    4545from webkitpy.tool.grammar import pluralize
    4646from webkitpy.tool.multicommandtool import AbstractDeclarativeCommand
     
    121121class BulkOptimizeBaselines(OptimizeBaselines):
    122122    name = "bulk-optimize-baselines"
    123     help_text = """Reshuffles the baselines for tests to use as litte space on disk as possible.
    124 Please provide the list of tests (separated by new lines) via stdin."""
    125     argument_names = None
     123    help_text = """Reshuffles the baselines for tests to use as litte space on disk as possible."""
     124    argument_names = "TEST_NAMES"
     125
     126    def _to_test_name(self, file_name):
     127        return self._tool.filesystem.relpath(file_name, self._port.layout_tests_dir())
    126128
    127129    def execute(self, options, args, tool):
    128130        self._baseline_optimizer = BaselineOptimizer(tool.scm(), tool.filesystem)
    129         for test_name in fileinput.input(['-']):
    130             test_name = test_name.strip()
     131        self._port = factory.get("chromium-win-win7")  # FIXME: This should be selectable.
     132
     133        for test_name in map(self._to_test_name, test_files.find(self._port, args)):
    131134            print "Optimizing %s." % test_name
    132135            self._optimize_baseline(test_name)
Note: See TracChangeset for help on using the changeset viewer.