Index: build/android/pylib/instrumentation/setup.py |
diff --git a/build/android/pylib/instrumentation/setup.py b/build/android/pylib/instrumentation/setup.py |
index 3b24188fbd5253310500d814ee9039732a8a0794..22c234472c3cffa25b32a046558e46d70325a8f7 100644 |
--- a/build/android/pylib/instrumentation/setup.py |
+++ b/build/android/pylib/instrumentation/setup.py |
@@ -5,6 +5,7 @@ |
"""Generates test runner factory and tests for instrumentation tests.""" |
import logging |
+import os |
import test_package |
import test_runner |
@@ -19,6 +20,10 @@ def Setup(test_options): |
Returns: |
A tuple of (TestRunnerFactory, tests). |
""" |
+ if (test_options.coverage_dir and not |
+ os.path.exists(test_options.coverage_dir)): |
+ os.makedirs(test_options.coverage_dir) |
+ |
test_pkg = test_package.TestPackage(test_options.test_apk_path, |
test_options.test_apk_jar_path) |
tests = test_pkg._GetAllMatchingTests( |