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

Side by Side Diff: build/android/devil/utils/tempdir.py

Issue 1415533007: [Android] Add sharding for AMP instrumentation tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minor change to uirobot SetupTestShards. Created 5 years, 1 month 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
OLDNEW
(Empty)
1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 import contextlib
6 import tempfile
7 import shutil
8
9 @contextlib.contextmanager
10 def TempDir(suffix='', prefix='', delete=True):
jbudorick 2015/12/01 04:07:13 conflicts with your other review at this point, wh
11 dirname = tempfile.mkdtemp(suffix=suffix, prefix=prefix)
12 try:
13 yield dirname
14 finally:
15 if delete:
16 shutil.rmtree(dirname)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698