Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(576)

Issue 1996833002: Fix clobber.py to restore args.gn on failure (Closed)

Created:
4 years, 7 months ago by brucedawson
Modified:
4 years, 7 months ago
Reviewers:
Ilya Kulshin, stanisc
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix clobber.py to restore args.gn on failure If delete_dir or os.mkdir throw an exception then the code to restore args.gn, build.ninja, and build.ninja.d will not run. This breaks a design goal of gn which is that the args.gn files should not be deleted. The fix is to catch the exception and raise it after the files have been restored. To test the code leave chrome.exe or base_unittests.exe running in one window and run this in another: python build\clobber.py d:\src\chromium\src\out Note that if you do this without the patch applied then all args.gn files may be deleted, so consider backing them up. Also note that args.gn files won't be restored unless build.ninja and build.ninja.d files are also present, so back them up. Just apply the patch first - it's easier. BUG=612940 Committed: https://crrev.com/562df4f33e0a29669b83d451d33c81648a9e023e Cr-Commit-Position: refs/heads/master@{#395177}

Patch Set 1 #

Total comments: 1

Patch Set 2 : Tweak comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+12 lines, -2 lines) Patch
M build/clobber.py View 1 2 chunks +12 lines, -2 lines 0 comments Download

Messages

Total messages: 15 (7 generated)
brucedawson
Code review practice!
4 years, 7 months ago (2016-05-20 00:51:23 UTC) #3
Ilya Kulshin
lgtm https://codereview.chromium.org/1996833002/diff/1/build/clobber.py File build/clobber.py (right): https://codereview.chromium.org/1996833002/diff/1/build/clobber.py#newcode72 build/clobber.py:72: # and we still want to restore args.gn ...
4 years, 7 months ago (2016-05-20 20:04:26 UTC) #4
brucedawson
Comment fixed - stanisc@, can you review and give committer stamp of approval?
4 years, 7 months ago (2016-05-20 20:15:18 UTC) #6
stanisc
lgtm The only question I have is whether the code that catches exception should use ...
4 years, 7 months ago (2016-05-20 21:10:14 UTC) #7
brucedawson
On 2016/05/20 21:10:14, stanisc wrote: > lgtm > > The only question I have is ...
4 years, 7 months ago (2016-05-20 21:13:51 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1996833002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1996833002/20001
4 years, 7 months ago (2016-05-20 21:14:22 UTC) #11
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 7 months ago (2016-05-20 22:00:57 UTC) #13
commit-bot: I haz the power
4 years, 7 months ago (2016-05-20 22:02:42 UTC) #15
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/562df4f33e0a29669b83d451d33c81648a9e023e
Cr-Commit-Position: refs/heads/master@{#395177}

Powered by Google App Engine
This is Rietveld 408576698