diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-09-10 19:10:20 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-09-10 19:10:20 +0200 |
commit | 284837daa07b29d6a63a748544a90b1f5842ac5c (patch) | |
tree | ecd258180bde91fe741e0cfd2638beb3c6da7e8e /Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py | |
parent | 2e2ba8ff45915f40ed3e014101269c175f2a89a0 (diff) | |
download | qtwebkit-284837daa07b29d6a63a748544a90b1f5842ac5c.tar.gz |
Imported WebKit commit 68645295d2e3e09af2c942f092556f06aa5f8b0d (http://svn.webkit.org/repository/webkit/trunk@128073)
New snapshot
Diffstat (limited to 'Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py')
-rw-r--r-- | Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py b/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py index cea6e2e99..cae01e813 100644 --- a/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py +++ b/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py @@ -312,6 +312,27 @@ MOCK run_command: ['qmake', '-v'], cwd=None command._tests_to_rebaseline = lambda port: {'userscripts/another-test.html': set(['txt']), 'userscripts/images.svg': set(['png'])} OutputCapture().assert_outputs(self, command.execute, [MockOptions(optimize=True), [], tool], expected_logs=expected_logs, expected_stdout=expected_stdout, expected_stderr=expected_stderr_with_optimize) + def _assert_command(self, command, options=None, args=None, expected_stdout='', expected_stderr='', expected_logs=''): + # FIXME: generalize so more tests use this to get rid of boilerplate. + options = options or MockOptions(optimize=True, builders=None, suffixes=['txt'], verbose=False) + args = args or [] + + tool = MockTool() + command.bind_to_tool(tool) + + port = tool.port_factory.get('chromium-mac-lion') + tool.filesystem.write_text_file(port.path_from_chromium_base('skia', 'skia_test_expectations.txt'), '') + + for port_name in tool.port_factory.all_port_names(): + port = tool.port_factory.get(port_name) + for path in port.expectations_files(): + tool.filesystem.write_text_file(path, '') + + OutputCapture().assert_outputs(self, command.execute, [options, args, tool], expected_stdout=expected_stdout, expected_stderr=expected_stderr, expected_logs=expected_logs) + + def test_rebaseline_expectations_noop(self): + self._assert_command(RebaselineExpectations(), expected_logs='Did not find any tests marked REBASELINE.\n') + def test_overrides_are_included_correctly(self): command = RebaselineExpectations() tool = MockTool() |