Add binary prebuilt tools needed for host gtests
Bug: 147817558
Test: check testcases directory after "m general-tests"
Change-Id: If33dfdc6b3ad4792918383bf1481369735007113
diff --git a/build/art.go b/build/art.go
index 8deea23..af2a5de 100644
--- a/build/art.go
+++ b/build/art.go
@@ -291,10 +291,11 @@
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
}
}