summaryrefslogtreecommitdiff
path: root/build/art.go
diff options
context:
space:
mode:
author David Srbecky <dsrbecky@google.com> 2020-07-01 15:04:39 +0100
committer David Srbecky <dsrbecky@google.com> 2020-07-01 17:22:34 +0000
commitb0713ca410b30e50fc68fde2da6836f588967c5d (patch)
treeb990626f67a04c076c3ca165c5b4c351eb659843 /build/art.go
parent58fb5e88e30335abfb59536f5d3c195ef95c1ef3 (diff)
Add binary prebuilt tools needed for host gtests
Bug: 147817558 Test: check testcases directory after "m general-tests" Change-Id: If33dfdc6b3ad4792918383bf1481369735007113
Diffstat (limited to 'build/art.go')
-rw-r--r--build/art.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/build/art.go b/build/art.go
index 8deea23098..af2a5deb54 100644
--- a/build/art.go
+++ b/build/art.go
@@ -291,10 +291,11 @@ func addTestcasesFile(ctx android.InstallHookContext) {
defer artTestMutex.Unlock()
if ctx.Os().Class == android.Host {
- path := ctx.Path().ToMakePath().String()
- parts := strings.Split(path, "/")
- // Keep last two parts of the path (e.g. bin/dex2oat).
- testcasesContent[strings.Join(parts[len(parts)-2:], "/")] = path
+ src := ctx.SrcPath().String()
+ path := strings.Split(ctx.Path().ToMakePath().String(), "/")
+ // Keep last two parts of the install path (e.g. bin/dex2oat).
+ dst := strings.Join(path[len(path)-2:], "/")
+ testcasesContent[dst] = src
}
}