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

Unified Diff: utils/compiler/buildbot.py

Issue 10826301: Change clobbering to use the new script inside the dart tools directory. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/compiler/buildbot.py
===================================================================
--- utils/compiler/buildbot.py (revision 10621)
+++ utils/compiler/buildbot.py (working copy)
@@ -217,7 +217,7 @@
if runtime == 'ff' and system == 'win7':
version_query_string += '| more'
elif runtime == 'chrome' and system == 'win7':
- version_query_string = ('''reg query "HKCU\\Software\\Microsoft\\''' +
+ version_query_string = ('''reg query "HKCU\\Software\\Microsoft\\''' +
'''Windows\\CurrentVersion\\Uninstall\\Google Chrome" /v Version''')
p = subprocess.Popen(version_query_string,
stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
@@ -293,26 +293,24 @@
_DeleteFirefoxProfiles('/tmp')
_DeleteFirefoxProfiles('/var/tmp')
-def MaybeClobber(runtime, mode, system):
- """ Clobber the build directory if the clobber flag has been set.
+def ClobberBuilder(mode):
+ """ Clobber the builder before we do the build.
Args:
- - runtime: either 'd8', or one of the browsers, see GetBuildInfo
- mode: either 'debug' or 'release'
- - system: either 'linux', 'mac', or 'win7'
"""
- builder_clobber = os.environ.get(BUILDER_CLOBBER)
- if (builder_clobber != "1"):
- print "Clobber flag not set, not clobbering"
- return
+ cmd = [sys.executable,
+ './tools/clean_output_directory.py',
+ '--mode=' + mode]
+ print 'Clobbering %s' % (' '.join(cmd))
+ return subprocess.call(cmd, env=NO_COLOR_ENV)
- # TODO(ricow): add support for browser bots - sync with Emily
- if (runtime == "d8"):
- delete_path = os.path.join(DART_PATH, "out")
- print "Clobbering %s" % (delete_path)
- shutil.rmtree("", ignore_errors=True);
+def GetShouldClobber():
+ if os.environ.get(BUILDER_CLOBBER) == "1":
ahe 2012/08/14 17:57:20 return os.environ.get(BUILDER_CLOBBER) == "1"
+ return True
+ else:
+ return False
def main():
-
if len(sys.argv) == 0:
print 'Script pathname not known, giving up.'
return 1
@@ -327,8 +325,12 @@
if compiler is None:
return 1
- print '@@@BUILD_STEP Maybe clobber@@@'
- MaybeClobber(runtime, mode, system)
+ if GetShouldClobber():
+ print '@@@BUILD_STEP Clobber@@@'
+ status = ClobberBuilder(mode)
+ if status != 0:
+ print '@@@STEP_FAILURE@@@'
+ return status
print '@@@BUILD_STEP build sdk@@@'
status = BuildSDK(mode, system)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698