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

Unified Diff: tools/bots/editor.py

Issue 12729029: Use temporary eclipse workspace directories for DartEditor tests (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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: tools/bots/editor.py
diff --git a/tools/bots/editor.py b/tools/bots/editor.py
index 4e4e02e96ec9e0740cf97759f7cb2eaab7d9796a..80d85d4b02cb4c16a87f5961dc74a987bce9d17d 100755
--- a/tools/bots/editor.py
+++ b/tools/bots/editor.py
@@ -4,10 +4,20 @@
# BSD-style license that can be found in the LICENSE file.
import os
+import shutil
import sys
+import tempfile
import bot
+class TempDir(object):
+ def __enter__(self):
+ self._temp_dir = tempfile.mkdtemp('eclipse-workspace')
+ return self._temp_dir
+
+ def __exit__(self, *_):
+ shutil.rmtree(self._temp_dir, ignore_errors = True)
+
def GetEditorExecutable(mode, arch):
configuration_dir = mode + arch.upper()
linux_path = os.path.join('out', configuration_dir, 'editor')
@@ -50,10 +60,11 @@ def main():
for arch in test_architectures:
editor_executable = GetEditorExecutable('Release', arch)
with bot.BuildStep('Test Editor %s' % arch):
- args = [editor_executable, '--test', '--auto-exit']
- print 'Running: %s' % (' '.join(args))
- sys.stdout.flush()
- bot.RunProcess(args)
+ with TempDir() as temp_dir:
+ args = [editor_executable, '--test', '--auto-exit', '-data', temp_dir]
+ print 'Running: %s' % (' '.join(args))
+ sys.stdout.flush()
+ bot.RunProcess(args)
return 0
if __name__ == '__main__':
« 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