summaryrefslogtreecommitdiff
path: root/testrunner/coverage/coverage.py
diff options
context:
space:
mode:
authorJP Abgrall <jpa@google.com>2013-07-11 17:39:16 -0700
committerJP Abgrall <jpa@google.com>2013-07-11 17:39:16 -0700
commitf38107c03f73157e0b7b7cd516627732d733d3a4 (patch)
tree54a0f443ef68801117f1be75b58f5e679bdae405 /testrunner/coverage/coverage.py
parent918d5a1a844e1ad645fe1536496cea0e4f987191 (diff)
testrunner: don't hardcode "out"
"out" can actually be $OUT_DIR. "out/host/arch" is actually $ANDROID_HOST_OUT. Bug: 7183057 Change-Id: I91ed7fdd57da92288f0529ba60cef1520b6d31d3
Diffstat (limited to 'testrunner/coverage/coverage.py')
-rwxr-xr-xtestrunner/coverage/coverage.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/testrunner/coverage/coverage.py b/testrunner/coverage/coverage.py
index 570527d56..824f5c5f0 100755
--- a/testrunner/coverage/coverage.py
+++ b/testrunner/coverage/coverage.py
@@ -43,7 +43,7 @@ class CoverageGenerator(object):
_EMMA_JAR = os.path.join("external", "emma", "lib", "emma.jar")
_TEST_COVERAGE_EXT = "ec"
# root path of generated coverage report files, relative to Android build root
- _COVERAGE_REPORT_PATH = os.path.join("out", "emma")
+ _COVERAGE_REPORT_PATH = "emma"
_TARGET_DEF_FILE = "coverage_targets.xml"
_CORE_TARGET_PATH = os.path.join("development", "testrunner",
_TARGET_DEF_FILE)
@@ -53,12 +53,13 @@ class CoverageGenerator(object):
_TARGET_DEF_FILE)
# path to root of target build intermediates
- _TARGET_INTERMEDIATES_BASE_PATH = os.path.join("out", "target", "common",
+ _TARGET_INTERMEDIATES_BASE_PATH = os.path.join("target", "common",
"obj")
def __init__(self, adb_interface):
self._root_path = android_build.GetTop()
- self._output_root_path = os.path.join(self._root_path,
+ self._out_path = android_build.GetOut()
+ self._output_root_path = os.path.join(self._out_path,
self._COVERAGE_REPORT_PATH)
self._emma_jar_path = os.path.join(self._root_path, self._EMMA_JAR)
self._adb = adb_interface
@@ -78,7 +79,7 @@ class CoverageGenerator(object):
target: the CoverageTarget to use as basis for coverage calculation
device_coverage_path: location of coverage file on device
output_path: path to place output files in. If None will use
- <android_root_path>/<_COVERAGE_REPORT_PATH>/<target>/<test[-qualifier]>
+ <android_out_path>/<_COVERAGE_REPORT_PATH>/<target>/<test[-qualifier]>
test_qualifier: designates mode test was run with. e.g size=small.
If not None, this will be used to customize output_path as shown above.
@@ -89,7 +90,7 @@ class CoverageGenerator(object):
report_name = test_suite_name
if test_qualifier:
report_name = report_name + "-" + test_qualifier
- output_path = os.path.join(self._root_path,
+ output_path = os.path.join(self._out_path,
self._COVERAGE_REPORT_PATH,
target.GetName(),
report_name)
@@ -153,7 +154,7 @@ class CoverageGenerator(object):
def _GetBuildIntermediatePath(self, target):
return os.path.join(
- self._root_path, self._TARGET_INTERMEDIATES_BASE_PATH, target.GetType(),
+ self._out_path, self._TARGET_INTERMEDIATES_BASE_PATH, target.GetType(),
"%s_intermediates" % target.GetName())
def _GatherSrcs(self, targets):