diff options
author | prasadv@chromium.org <prasadv@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-28 23:30:42 +0000 |
---|---|---|
committer | prasadv@chromium.org <prasadv@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-28 23:30:42 +0000 |
commit | 77a08af13887681d73a17df2e64a9c562f3a05ac (patch) | |
tree | ab31b69fb5d769e9d2ee0767b860d3bb7a99ecc5 /tools | |
parent | cf9fc531a83cf05864985f0e2041498e792ebb64 (diff) | |
download | chromium_src-77a08af13887681d73a17df2e64a9c562f3a05ac.zip chromium_src-77a08af13887681d73a17df2e64a9c562f3a05ac.tar.gz chromium_src-77a08af13887681d73a17df2e64a9c562f3a05ac.tar.bz2 |
Remove skia folder before gclient sync to avoid syncing issues caused due to skia changes.
BUG=377951
NOTRY=true
Review URL: https://codereview.chromium.org/298253012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@273396 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/bisect-perf-regression.py | 15 | ||||
-rw-r--r-- | tools/bisect_utils.py | 35 |
2 files changed, 23 insertions, 27 deletions
diff --git a/tools/bisect-perf-regression.py b/tools/bisect-perf-regression.py index 6e7e019..674a782 100755 --- a/tools/bisect-perf-regression.py +++ b/tools/bisect-perf-regression.py @@ -981,8 +981,8 @@ class SourceControl(object): Returns: The return code of the call. """ - return bisect_utils.RunGClient(['sync', '--revision', - revision, '--verbose', '--nohooks', '--reset', '--force']) + return bisect_utils.RunGClient(['sync', '--verbose', '--reset', '--force', + '--delete_unversioned_trees', '--nohooks', '--revision', revision]) def SyncToRevisionWithRepo(self, timestamp): """Uses repo to sync all the underlying git depots to the specified @@ -2277,7 +2277,8 @@ class BisectPerformanceMetrics(object): if self.was_blink != is_blink: self.was_blink = is_blink - return bisect_utils.RemoveThirdPartyWebkitDirectory() + # Removes third_party/Webkit directory. + return bisect_utils.RemoveThirdPartyDirectory('Webkit') return True def PerformCrosChrootCleanup(self): @@ -2313,7 +2314,13 @@ class BisectPerformanceMetrics(object): True if successful. """ if depot == 'chromium': - if not bisect_utils.RemoveThirdPartyLibjingleDirectory(): + # Removes third_party/libjingle. At some point, libjingle was causing + # issues syncing when using the git workflow (crbug.com/266324). + if not bisect_utils.RemoveThirdPartyDirectory('libjingle'): + return False + # Removes third_party/skia. At some point, skia was causing + # issues syncing when using the git workflow (crbug.com/377951). + if not bisect_utils.RemoveThirdPartyDirectory('skia'): return False return self.PerformWebkitDirectoryCleanup(revision) elif depot == 'cros': diff --git a/tools/bisect_utils.py b/tools/bisect_utils.py index fa2b4d2..650288f 100644 --- a/tools/bisect_utils.py +++ b/tools/bisect_utils.py @@ -253,22 +253,6 @@ def IsDepsFileBlink(): return 'blink.git' in locals['vars']['webkit_url'] -def RemoveThirdPartyWebkitDirectory(): - """Removes third_party/WebKit. - - Returns: - True on success. - """ - try: - path_to_dir = os.path.join(os.getcwd(), 'third_party', 'WebKit') - if os.path.exists(path_to_dir): - shutil.rmtree(path_to_dir) - except OSError, e: - if e.errno != errno.ENOENT: - return False - return True - - def OnAccessError(func, path, exc_info): """ Source: http://stackoverflow.com/questions/2656322/python-shutil-rmtree-fails-on-windows-with-access-is-denied @@ -293,14 +277,17 @@ def OnAccessError(func, path, exc_info): raise -def RemoveThirdPartyLibjingleDirectory(): - """Removes third_party/libjingle. At some point, libjingle was causing issues - syncing when using the git workflow (crbug.com/266324). +def RemoveThirdPartyDirectory(dir_name): + """Removes third_party directory from the source. + + At some point, some of the third_parties were causing issues to changes in + the way they are synced. We remove such folder in order to avoid sync errors + while bisecting. Returns: - True on success. + True on success, otherwise False. """ - path_to_dir = os.path.join(os.getcwd(), 'third_party', 'libjingle') + path_to_dir = os.path.join(os.getcwd(), 'third_party', dir_name) try: if os.path.exists(path_to_dir): shutil.rmtree(path_to_dir, onerror=OnAccessError) @@ -361,11 +348,13 @@ def SetupGitDepot(opts, custom_deps): cwd = os.getcwd() os.chdir('src') if not IsDepsFileBlink(): - passed_deps_check = RemoveThirdPartyWebkitDirectory() + passed_deps_check = RemoveThirdPartyDirectory('Webkit') else: passed_deps_check = True if passed_deps_check: - passed_deps_check = RemoveThirdPartyLibjingleDirectory() + passed_deps_check = RemoveThirdPartyDirectory('libjingle') + if passed_deps_check: + passed_deps_check = RemoveThirdPartyDirectory('skia') os.chdir(cwd) if passed_deps_check: |