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

Unified Diff: utils/compiler/buildbot.py

Issue 10831304: Enable clobber functionality for the dart2js buildbots (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 10620)
+++ utils/compiler/buildbot.py (working copy)
@@ -18,7 +18,9 @@
import sys
BUILDER_NAME = 'BUILDBOT_BUILDERNAME'
+BUILDER_CLOBBER = 'BUILDBOT_CLOBBER'
+
DART_PATH = os.path.dirname(
os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
@@ -291,8 +293,25 @@
_DeleteFirefoxProfiles('/tmp')
_DeleteFirefoxProfiles('/var/tmp')
+def MaybeClobber(runtime, mode, system):
+ """ Clobber the build directory if the clobber flag has been set.
+ Args:
+ - runtime: either 'd8', or one of the browsers, see GetBuildInfo
+ - mode: either 'debug' or 'release'
+ - system: either 'linux', 'mac', or 'win7'
ricow1 2012/08/14 08:22:58 we don't use all these arguments for clobbering th
+ """
+ builder_clobber = os.environ.get(BUILDER_CLOBBER)
+ if (builder_clobber != "1"):
+ print "Clobber flag not set, not clobbering"
+ return
+
+ # 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 main():
- print '@@@BUILD_STEP build sdk@@@'
if len(sys.argv) == 0:
print 'Script pathname not known, giving up.'
@@ -308,6 +327,10 @@
if compiler is None:
return 1
+ print '@@@BUILD_STEP Maybe clobber@@@'
+ MaybeClobber(runtime, mode, system)
+
+ print '@@@BUILD_STEP build sdk@@@'
status = BuildSDK(mode, system)
if status != 0:
print '@@@STEP_FAILURE@@@'
« 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