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

Side by Side Diff: utils/compiler/buildbot.py

Issue 11186012: Delete temporary files on Opera bot. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 2
3 # Copyright (c) 2011 The Chromium Authors. All rights reserved. 3 # Copyright (c) 2011 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 """Dart2js buildbot steps 7 """Dart2js buildbot steps
8 8
9 Runs tests for the dart2js compiler. 9 Runs tests for the dart2js compiler.
10 """ 10 """
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 extras = ['dart2js_extra', 'dart2js_native', 'dart2js_foreign'] 293 extras = ['dart2js_extra', 'dart2js_native', 'dart2js_foreign']
294 TestStep("dart2js_extra", mode, system, 'dart2js', runtime, extras, 294 TestStep("dart2js_extra", mode, system, 'dart2js', runtime, extras,
295 flags) 295 flags)
296 296
297 return 0 297 return 0
298 298
299 def _DeleteTempWebdriverProfiles(directory): 299 def _DeleteTempWebdriverProfiles(directory):
300 """Find all the firefox profiles in a particular directory and delete them.""" 300 """Find all the firefox profiles in a particular directory and delete them."""
301 for f in os.listdir(directory): 301 for f in os.listdir(directory):
302 item = os.path.join(directory, f) 302 item = os.path.join(directory, f)
303 if os.path.isdir(item) and f.startswith('tmp'): 303 if os.path.isdir(item) and (f.startswith('tmp') or f.startswith('opera')):
304 subprocess.Popen('rm -rf %s' % item, shell=True) 304 subprocess.Popen('rm -rf %s' % item, shell=True)
305 305
306 def CleanUpTemporaryFiles(system, browser): 306 def CleanUpTemporaryFiles(system, browser):
307 """For some browser (selenium) tests, the browser creates a temporary profile 307 """For some browser (selenium) tests, the browser creates a temporary profile
308 on each browser session start. On Windows, generally these files are 308 on each browser session start. On Windows, generally these files are
309 automatically deleted when all python processes complete. However, since our 309 automatically deleted when all python processes complete. However, since our
310 buildbot slave script also runs on python, we never get the opportunity to 310 buildbot slave script also runs on python, we never get the opportunity to
311 clear out the temp files, so we do so explicitly here. Our batch browser 311 clear out the temp files, so we do so explicitly here. Our batch browser
312 testing will make this problem occur much less frequently, but will still 312 testing will make this problem occur much less frequently, but will still
313 happen eventually unless we do this. 313 happen eventually unless we do this.
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 build_info.is_buildbot, 404 build_info.is_buildbot,
405 build_info.test_set) 405 build_info.test_set)
406 406
407 if build_info.runtime != 'd8': CleanUpTemporaryFiles(build_info.system, 407 if build_info.runtime != 'd8': CleanUpTemporaryFiles(build_info.system,
408 build_info.runtime) 408 build_info.runtime)
409 if status != 0: print '@@@STEP_FAILURE@@@' 409 if status != 0: print '@@@STEP_FAILURE@@@'
410 return status 410 return status
411 411
412 if __name__ == '__main__': 412 if __name__ == '__main__':
413 sys.exit(main()) 413 sys.exit(main())
OLDNEW
« 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