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

Unified Diff: frog/scripts/buildbot_annotated_steps.py

Issue 9600033: Clean up temporary directories in buildbot script. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 10 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 | tools/testing/run_selenium.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: frog/scripts/buildbot_annotated_steps.py
===================================================================
--- frog/scripts/buildbot_annotated_steps.py (revision 4909)
+++ frog/scripts/buildbot_annotated_steps.py (working copy)
@@ -160,7 +160,34 @@
return 0
+def CleanUpTemporaryFiles(system, browser):
+ """For some browser (selenium) tests, the browser creates a temporary profile
+ on each browser session start. On Windows, generally these files are
+ automatically deleted when all python processes complete. However, since our
+ buildbot slave script also runs on python, we never get the opportunity to
+ clear out the temp files, so we do so explicitly here. Our batch browser
+ testing will make this problem occur much less frequently, but will still
+ happen eventually unless we do this.
+ This problem also occurs with batch tests in Firefox. For some reason selenium
+ automatically deletes the temporary profiles for Firefox for one browser,
+ but not multiple ones when we have many open batch tasks running. This
+ behavior has not been able to be reproduced outside of the buildbots.
Siggi Cherem (dart-lang) 2012/03/05 21:22:25 has not been able to be reproduced => has not been
Emily Fortuna 2012/03/05 21:50:18 Done.
+
+ Args:
+ - system: either 'linux', 'mac', or 'win7'
+ - browser: one of the browsers, see GetBuildInfo
+ """
+ if system == 'win7':
+ subprocess.Popen(['rmdir', '/S', '/Q',
+ 'C:\\Users\\chrome-bot\\AppData\\Local\\Temp'], shell=True)
+ elif browser == 'ff':
+ # Note: the buildbots run as root, so we can do this without requiring a
+ # password. The command won't actually work on regular machines without
+ # root permissions.
+ p = subprocess.Popen('rm -rf /tmp/*', shell=True)
Siggi Cherem (dart-lang) 2012/03/05 21:22:25 This might be overly agressive - there might be te
Emily Fortuna 2012/03/05 21:50:18 The firefox profiles all seem to have a particular
+ p = subprocess.Popen('rm -rf /var/tmp/*', shell=True)
+
def main():
print 'main'
if len(sys.argv) == 0:
@@ -188,6 +215,8 @@
if status != 0:
print '@@@STEP_FAILURE@@@'
+ if arch == 'frogium':
Siggi Cherem (dart-lang) 2012/03/05 21:22:25 arch == webdriver?
Emily Fortuna 2012/03/05 21:50:18 See line 51. Webdriver is not the *architecture*,
+ CleanUpTemporaryFiles(system, browser)
return status
« no previous file with comments | « no previous file | tools/testing/run_selenium.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698