Changeset 90967 in webkit
- Timestamp:
- Jul 13, 2011 6:03:02 PM (13 years ago)
- Location:
- trunk/Tools
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r90965 r90967 1 2011-07-13 Eric Seidel <eric@webkit.org> 2 3 REGRESSION: GitTestWithMock.test_create_patch fails 4 https://bugs.webkit.org/show_bug.cgi?id=62945 5 6 Reviewed by Daniel Bates. 7 8 I was not able to reproduce the exact failure seen in the bug, 9 however this test was failing on my machine for other reasons. 10 11 I went through and did an audit of our run_command usage, it's 12 entirely in scm classes after this change. (Not surprising given 13 that scm.py was the second file ever created in webkit.py.) 14 15 The real bug I'm fixing here is that we were setting executive.should_log 16 when the value had changed to executive._should_log. Now we set the right one 17 and the test works again. 18 19 * Scripts/webkitpy/common/checkout/checkout.py: 20 * Scripts/webkitpy/common/checkout/scm/git.py: 21 * Scripts/webkitpy/common/checkout/scm/scm.py: 22 * Scripts/webkitpy/common/checkout/scm/scm_unittest.py: 23 * Scripts/webkitpy/common/checkout/scm/svn.py: 24 1 25 2011-07-13 Ilya Sherman <isherman@chromium.org> 2 26 -
trunk/Tools/Scripts/webkitpy/common/checkout/checkout.py
r90584 r90967 153 153 if force: 154 154 args.append('--force') 155 run_command(args, input=patch.contents())155 self._scm._executive.run_command(args, input=patch.contents()) 156 156 157 157 def apply_reverse_diff(self, revision): -
trunk/Tools/Scripts/webkitpy/common/checkout/scm/git.py
r89963 r90967 89 89 @classmethod 90 90 def in_working_directory(cls, path): 91 # FIXME: This should use an Executive. 91 92 return run_command(['git', 'rev-parse', '--is-inside-work-tree'], cwd=path, error_handler=Executive.ignore_error).rstrip() == "true" 92 93 … … 110 111 # Pass --get-all for cases where the config has multiple values 111 112 # Pass the cwd if provided so that we can handle the case of running webkit-patch outside of the working directory. 113 # FIXME: This should use an Executive. 112 114 return run_command(["git", "config", "--get-all", key], error_handler=Executive.ignore_error, cwd=cwd).rstrip('\n') 113 115 -
trunk/Tools/Scripts/webkitpy/common/checkout/scm/scm.py
r85449 r90967 37 37 38 38 from webkitpy.common.system.deprecated_logging import error, log 39 from webkitpy.common.system.executive import Executive, run_command,ScriptError39 from webkitpy.common.system.executive import Executive, ScriptError 40 40 from webkitpy.common.system import ospath 41 41 -
trunk/Tools/Scripts/webkitpy/common/checkout/scm/scm_unittest.py
r90480 r90967 108 108 # We use this wrapper to disable output decoding. diffs should be treated as 109 109 # binary files since they may include text files of multiple differnet encodings. 110 # FIXME: This should use an Executive. 110 111 return run_command([command, "diff"] + list(args), decode_output=False) 111 112 … … 1485 1486 # This class is the first part of that. 1486 1487 class GitTestWithMock(unittest.TestCase): 1487 def setUp(self): 1488 executive = MockExecutive(should_log=False) 1488 def make_scm(self, logging_executive=False): 1489 1489 # We do this should_log dance to avoid logging when Git.__init__ runs sysctl on mac to check for 64-bit support. 1490 self.scm = Git(None, executive=executive) 1491 executive.should_log = True 1490 scm = Git(cwd=None, executive=MockExecutive()) 1491 scm._executive._should_log = logging_executive 1492 return scm 1492 1493 1493 1494 def test_create_patch(self): 1495 scm = self.make_scm(logging_executive=True) 1494 1496 expected_stderr = "MOCK run_command: ['git', 'merge-base', u'refs/remotes/origin/master', 'HEAD']\nMOCK run_command: ['git', 'diff', '--binary', '--no-ext-diff', '--full-index', '-M', 'MOCK output of child process', '--']\nMOCK run_command: ['git', 'log', '-25']\n" 1495 OutputCapture().assert_outputs(self, s elf.scm.create_patch, kwargs={'changed_files': None}, expected_stderr=expected_stderr)1497 OutputCapture().assert_outputs(self, scm.create_patch, expected_stderr=expected_stderr) 1496 1498 1497 1499 def test_push_local_commits_to_server_with_username_and_password(self): 1498 self.assertEquals(self. scm.push_local_commits_to_server(username='dbates@webkit.org', password='blah'), "MOCK output of child process")1500 self.assertEquals(self.make_scm().push_local_commits_to_server(username='dbates@webkit.org', password='blah'), "MOCK output of child process") 1499 1501 1500 1502 def test_push_local_commits_to_server_without_username_and_password(self): 1501 self.assertRaises(AuthenticationError, self. scm.push_local_commits_to_server)1503 self.assertRaises(AuthenticationError, self.make_scm().push_local_commits_to_server) 1502 1504 1503 1505 def test_push_local_commits_to_server_with_username_and_without_password(self): 1504 self.assertRaises(AuthenticationError, self. scm.push_local_commits_to_server, {'username': 'dbates@webkit.org'})1506 self.assertRaises(AuthenticationError, self.make_scm().push_local_commits_to_server, {'username': 'dbates@webkit.org'}) 1505 1507 1506 1508 def test_push_local_commits_to_server_without_username_and_with_password(self): 1507 self.assertRaises(AuthenticationError, self. scm.push_local_commits_to_server, {'password': 'blah'})1509 self.assertRaises(AuthenticationError, self.make_scm().push_local_commits_to_server, {'password': 'blah'}) 1508 1510 1509 1511 if __name__ == '__main__': -
trunk/Tools/Scripts/webkitpy/common/checkout/scm/svn.py
r90534 r90967 93 93 def value_from_svn_info(cls, path, field_name): 94 94 svn_info_args = ['svn', 'info', path] 95 # FIXME: This should use an Executive. 95 96 info_output = run_command(svn_info_args).rstrip() 96 97 match = re.search("^%s: (?P<value>.+)$" % field_name, info_output, re.MULTILINE)
Note: See TracChangeset
for help on using the changeset viewer.