Changeset 194696 in webkit
- Timestamp:
- Jan 7, 2016 6:00:00 AM (8 years ago)
- Location:
- trunk/Tools
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/BuildSlaveSupport/clean-build
r190212 r194696 54 54 "--" + platform, "--" + options.configuration, '--top-level'], stdout=subprocess.PIPE).communicate()[0].strip() 55 55 56 shutil.rmtree(webkit_build_directory) 56 if (os.path.isdir(webkit_build_directory)): 57 shutil.rmtree(webkit_build_directory) 58 59 subprocess.Popen(['python', os.path.join(os.path.dirname(__file__), "..", "Scripts", "clean-webkit")]) 57 60 58 61 if __name__ == '__main__': -
trunk/Tools/ChangeLog
r194683 r194696 1 2016-01-07 Youenn Fablet <youenn.fablet@crf.canon.fr> 2 3 [buildbot] clean-build script should remove untracked files and revert local changes too 4 https://bugs.webkit.org/show_bug.cgi?id=142400 5 6 Reviewed by Ryosuke Niwa. 7 8 This patch cleans the WebKit folder by reverting tracked files changes and deleting SCM untracked files, including SCM ignored files. 9 A helper routine SCM.discard_untracked_files is added for that purpose. 10 11 * BuildSlaveSupport/clean-build: 12 (main): Making call to Scripts/clean-webkit 13 * Scripts/clean-webkit: Added. 14 (main): Revert changes and delete untracked files. 15 * Scripts/webkitpy/common/checkout/scm/scm.py: 16 (SCM.discard_untracked_files): Helper function to discard untracked files or folders found by SCM. 17 * Scripts/webkitpy/common/checkout/scm/scm_unittest.py: 18 (SCMTest._shared_test_discard_untracked_files): 19 (test_discard_untracked_files): Tests that untracked file and untracked folder get discarded correctly. 20 1 21 2016-01-06 Simon Fraser <simon.fraser@apple.com> 2 22 -
trunk/Tools/Scripts/webkitpy/common/checkout/scm/scm.py
r194415 r194696 208 208 self._subclass_must_implement() 209 209 210 def discard_untracked_files(self, discard_ignored_files=False): 211 for filename in self.untracked_files(discard_ignored_files): 212 if self._filesystem.isdir(filename): 213 self._filesystem.rmtree(filename) 214 else: 215 self._filesystem.remove(filename) 216 210 217 def discard_working_directory_changes(self): 211 218 self._subclass_must_implement() -
trunk/Tools/Scripts/webkitpy/common/checkout/scm/scm_unittest.py
r194634 r194696 333 333 os.remove("test_file_new.pyc") 334 334 335 def _shared_test_discard_untracked_files(self, scm): 336 write_into_file_at_path("test_file_new", "new content") 337 os.mkdir("test_dir_new") 338 write_into_file_at_path("test_dir_new/test_file_new", "new stuff") 339 self.assertItemsEqual(scm.untracked_files(), ["test_dir_new", "test_file_new"]) 340 scm.discard_untracked_files() 341 self.assertItemsEqual(scm.untracked_files(), []) 342 343 write_into_file_at_path("test_file_new.pyc", "new content") 344 self.assertItemsEqual(scm.untracked_files(True), ["test_file_new.pyc"]) 345 scm.discard_untracked_files(discard_ignored_files=False) 346 self.assertItemsEqual(scm.untracked_files(True), ["test_file_new.pyc"]) 347 scm.discard_untracked_files(discard_ignored_files=True) 348 self.assertItemsEqual(scm.untracked_files(True), []) 349 350 if os.path.isdir("test_dir_new"): 351 shutil.rmtree("test_dir_new") 352 if os.path.isfile("test_file_new"): 353 os.remove("test_file_new") 354 if os.path.isfile("test_file_new.pyc"): 355 os.remove("test_file_new.pyc") 356 335 357 def _shared_test_added_files(self): 336 358 write_into_file_at_path("test_file", "changed content") … … 833 855 self._shared_test_untracked_files(self.scm) 834 856 857 def test_discard_untracked_files(self): 858 self._shared_test_discard_untracked_files(self.scm) 859 835 860 def test_changed_files_for_revision(self): 836 861 self._shared_test_changed_files_for_revision()
Note: See TracChangeset
for help on using the changeset viewer.