diff options
author | Shimeng (Simon) Wang <swang@google.com> | 2010-12-07 17:22:45 -0800 |
---|---|---|
committer | Shimeng (Simon) Wang <swang@google.com> | 2010-12-22 14:15:40 -0800 |
commit | 4576aa36e9a9671459299c7963ac95aa94beaea9 (patch) | |
tree | 3863574e050f168c0126ecb47c83319fab0972d8 /WebKitTools/Scripts/webkitpy/layout_tests/port/base.py | |
parent | 55323ac613cc31553107b68603cb627264d22bb0 (diff) | |
download | external_webkit-4576aa36e9a9671459299c7963ac95aa94beaea9.zip external_webkit-4576aa36e9a9671459299c7963ac95aa94beaea9.tar.gz external_webkit-4576aa36e9a9671459299c7963ac95aa94beaea9.tar.bz2 |
Merge WebKit at r73109: Initial merge by git.
Change-Id: I61f1a66d9642e3d8405d3ac6ccab2a53421c75d8
Diffstat (limited to 'WebKitTools/Scripts/webkitpy/layout_tests/port/base.py')
-rw-r--r-- | WebKitTools/Scripts/webkitpy/layout_tests/port/base.py | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/port/base.py b/WebKitTools/Scripts/webkitpy/layout_tests/port/base.py index 632806f..bc5a9aa 100644 --- a/WebKitTools/Scripts/webkitpy/layout_tests/port/base.py +++ b/WebKitTools/Scripts/webkitpy/layout_tests/port/base.py @@ -384,6 +384,11 @@ class Port(object): # valid test and by printing.py to determine if baselines exist. return self._filesystem.exists(path) + def driver_cmd_line(self): + """Prints the DRT command line that will be used.""" + driver = self.create_driver(0) + return driver.cmd_line() + def update_baseline(self, path, data, encoding): """Updates the baseline for a test. @@ -487,7 +492,7 @@ class Port(object): """Relative unix-style path for a filename under the LayoutTests directory. Filenames outside the LayoutTests directory should raise an error.""" - #assert(filename.startswith(self.layout_tests_dir())) + assert filename.startswith(self.layout_tests_dir()), "%s did not start with %s" % (filename, self.layout_tests_dir()) return filename[len(self.layout_tests_dir()) + 1:] def results_directory(self): @@ -511,7 +516,7 @@ class Port(object): results_filename in a users' browser.""" return self._user.open_url(results_filename) - def create_driver(self, image_path, options): + def create_driver(self, worker_number): """Return a newly created base.Driver subclass for starting/stopping the test driver.""" raise NotImplementedError('Port.create_driver') @@ -741,7 +746,7 @@ class Port(object): def _path_to_driver(self, configuration=None): """Returns the full path to the test driver (DumpRenderTree).""" - raise NotImplementedError('Port.path_to_driver') + raise NotImplementedError('Port._path_to_driver') def _path_to_webcore_library(self): """Returns the full path to a built copy of WebCore.""" @@ -804,33 +809,26 @@ class Port(object): class Driver: """Abstract interface for the DumpRenderTree interface.""" - def __init__(self, port, png_path, options, executive): + def __init__(self, port, worker_number): """Initialize a Driver to subsequently run tests. Typically this routine will spawn DumpRenderTree in a config ready for subsequent input. port - reference back to the port object. - png_path - an absolute path for the driver to write any image - data for a test (as a PNG). If no path is provided, that - indicates that pixel test results will not be checked. - options - command line options argument from optparse - executive - reference to the process-wide Executive object - + worker_number - identifier for a particular worker/driver instance """ raise NotImplementedError('Driver.__init__') - def run_test(self, uri, timeout, checksum): + def run_test(self, test_input): """Run a single test and return the results. Note that it is okay if a test times out or crashes and leaves the driver in an indeterminate state. The upper layers of the program are responsible for cleaning up and ensuring things are okay. - uri - a full URI for the given test - timeout - number of milliseconds to wait before aborting this test. - checksum - if present, the expected checksum for the image for this - test + Args: + test_input: a TestInput object Returns a TestOutput object. """ |