Clobber output directory on linux and mac after landmine.

Xcode uses a different naming scheme for directories within
the xcodebuild directory. But it is safe to just delete
everything withing xcodebuild or out. Keep the soft clobber
for windows' build directory only, where subdirectories
follow the *release* and *debug* naming scheme.

BUG=chromium:403263
LOG=n
TBR=jochen@chromium.org

Review URL: https://codereview.chromium.org/955953002

Cr-Commit-Position: refs/heads/master@{#26852}
This commit is contained in:
machenbach 2015-02-25 06:16:30 -08:00 committed by Commit bot
parent 30a6e46a39
commit b00ff50d52

View File

@ -165,11 +165,18 @@ def clobber_if_necessary(new_landmines):
# checkouts have the build directory mounted.
for f in os.listdir(out_dir):
path = os.path.join(out_dir, f)
# Soft version of chromium's clobber. Only delete directories not files
# as e.g. on windows the output dir is the build dir that shares some
# checked out files.
if os.path.isdir(path) and re.search(r"(?:[Rr]elease)|(?:[Dd]ebug)", f):
delete_build_dir(path)
if os.path.basename(out_dir) == 'build':
# Soft version of chromium's clobber. Only delete build directories not
# files in windows' build dir as the folder shares some checked out
# files and directories.
if (os.path.isdir(path) and
re.search(r'(?:[Rr]elease)|(?:[Dd]ebug)', f)):
delete_build_dir(path)
else:
if os.path.isfile(path):
os.unlink(path)
elif os.path.isdir(path):
delete_build_dir(path)
# Save current set of landmines for next time.
with open(landmines_path, 'w') as f: