 Chromium Code Reviews
 Chromium Code Reviews Issue 1415533007:
  [Android] Add sharding for AMP instrumentation tests.  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master
    
  
    Issue 1415533007:
  [Android] Add sharding for AMP instrumentation tests.  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master| Index: build/android/devil/utils/tempdir.py | 
| diff --git a/build/android/devil/utils/tempdir.py b/build/android/devil/utils/tempdir.py | 
| new file mode 100644 | 
| index 0000000000000000000000000000000000000000..8f252a79cd0ff38fac2c60cbc6dfb8f70a4ad85f | 
| --- /dev/null | 
| +++ b/build/android/devil/utils/tempdir.py | 
| @@ -0,0 +1,16 @@ | 
| +# Copyright 2015 The Chromium Authors. All rights reserved. | 
| +# Use of this source code is governed by a BSD-style license that can be | 
| +# found in the LICENSE file. | 
| + | 
| +import contextlib | 
| +import tempfile | 
| +import shutil | 
| + | 
| +@contextlib.contextmanager | 
| +def TempDir(suffix='', prefix='', delete=True): | 
| 
jbudorick
2015/12/01 04:07:13
conflicts with your other review at this point, wh
 | 
| + dirname = tempfile.mkdtemp(suffix=suffix, prefix=prefix) | 
| + try: | 
| + yield dirname | 
| + finally: | 
| + if delete: | 
| + shutil.rmtree(dirname) |