Changeset 254359 in webkit
- Timestamp:
- Jan 10, 2020 11:36:25 AM (4 years ago)
- Location:
- trunk/Tools
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/BuildSlaveSupport/ews-build/steps.py
r254242 r254359 168 168 def __init__(self, **kwargs): 169 169 super(CleanWorkingDirectory, self).__init__(logEnviron=False, **kwargs) 170 171 def start(self): 172 platform = self.getProperty('platform') 173 if platform in ('gtk', 'wpe'): 174 self.setCommand(self.command + ['--keep-jhbuild-directory']) 175 return shell.ShellCommand.start(self) 170 176 171 177 -
trunk/Tools/ChangeLog
r254357 r254359 1 2020-01-10 Carlos Alberto Lopez Perez <clopez@igalia.com> 2 3 [GTK][WPE] EWS should not wipe the JHBuild in the unapply patch step 4 https://bugs.webkit.org/show_bug.cgi?id=206061 5 6 Reviewed by Aakash Jain. 7 8 The current unapply patch step on the EWS calls the script clean-webkit, which wipes everything. 9 Rebuilding the JHBuild takes around 30 minutes, even with ccache. 10 And its not needed to wipe the JHBuild directories on the clean-webkit step, because the WebKit 11 tooling for building the JHBuild (update-webkitgtk-libs) already detects when the moduleset has 12 been modified and wipes it when necessary. 13 14 This patch adds the optional argument --keep-jhbuild-directory to the script clean-webkit, 15 that the EWS will pass when doing the unapply patch step for platform GTK or WPE. 16 17 * BuildSlaveSupport/ews-build/steps.py: 18 (CleanWorkingDirectory.start): 19 * Scripts/clean-webkit: 20 (main): 21 * Scripts/webkitpy/common/checkout/scm/scm.py: 22 (SCM.discard_untracked_files): 23 * Scripts/webkitpy/common/checkout/scm/scm_unittest.py: 24 1 25 2020-01-10 Alex Christensen <achristensen@webkit.org> 2 26 -
trunk/Tools/Scripts/clean-webkit
r194696 r254359 29 29 30 30 import sys 31 import argparse 31 32 32 33 from webkitpy.common.checkout.scm.detection import SCMDetector … … 35 36 36 37 37 def main( ):38 def main(args): 38 39 fs = FileSystem() 39 40 host = Host() 40 41 scm = SCMDetector(fs, host.executive).detect_scm_system(fs.getcwd()) 41 42 42 43 scm.discard_working_directory_changes() 43 scm.discard_untracked_files(discard_ignored_files=True) 44 45 if args.keep_jhbuild_directory: 46 # Clean everything inside WebKitBuild, except the JHBuild directories. 47 scm.discard_untracked_files(discard_ignored_files=True, keep_webkitbuild_directory=True) 48 if fs.isdir("WebKitBuild"): 49 for build_dir in fs.listdir("WebKitBuild"): 50 build_path = fs.join("WebKitBuild", build_dir) 51 if fs.isdir(build_path): 52 if build_dir not in ["DependenciesGTK", "DependenciesWPE"]: 53 fs.rmtree(build_path) 54 else: 55 fs.remove(build_path) 56 else: 57 scm.discard_untracked_files(discard_ignored_files=True) 44 58 45 59 46 sys.exit(main()) 60 if __name__ == "__main__": 61 parser = argparse.ArgumentParser(description="Clean WebKit") 62 parser.add_argument("--keep-jhbuild-directory", action="store_true", 63 help="Don't wipe the JHBuild build directories.") 64 65 args = parser.parse_args() 66 sys.exit(main(args)) -
trunk/Tools/Scripts/webkitpy/common/checkout/scm/scm.py
r251587 r254359 214 214 self._subclass_must_implement() 215 215 216 def discard_untracked_files(self, discard_ignored_files=False ):216 def discard_untracked_files(self, discard_ignored_files=False, keep_webkitbuild_directory=False): 217 217 for filename in self.untracked_files(discard_ignored_files): 218 218 if self._filesystem.isdir(filename): 219 if keep_webkitbuild_directory and filename == "WebKitBuild": 220 continue 219 221 self._filesystem.rmtree(filename) 220 222 else: -
trunk/Tools/Scripts/webkitpy/common/checkout/scm/scm_unittest.py
r251587 r254359 360 360 self.assertEqual(scm.untracked_files(True), []) 361 361 362 os.mkdir("WebKitBuild") 363 self.assertEqual(scm.untracked_files(True), ["WebKitBuild"]) 364 scm.discard_untracked_files(discard_ignored_files=True, keep_webkitbuild_directory=True) 365 self.assertEqual(scm.untracked_files(True), ["WebKitBuild"]) 366 scm.discard_untracked_files(discard_ignored_files=True, keep_webkitbuild_directory=False) 367 self.assertEqual(scm.untracked_files(True), []) 368 362 369 if os.path.isdir("test_dir_new"): 363 370 shutil.rmtree("test_dir_new")
Note: See TracChangeset
for help on using the changeset viewer.