Add support of test data to python_host_test
Bug: none
Test: m -j vts_vndk_abi_test
confirm abi_dump.zip found next to test binary
Change-Id: I834dddfc13eb9e7addd234307b085b16124db234
diff --git a/android/androidmk.go b/android/androidmk.go
index fafbfd6..882193b 100644
--- a/android/androidmk.go
+++ b/android/androidmk.go
@@ -634,3 +634,21 @@
// Make does not understand LinuxBionic
module.Os() == LinuxBionic
}
+
+func AndroidMkDataPaths(data []DataPath) []string {
+ var testFiles []string
+ for _, d := range data {
+ rel := d.SrcPath.Rel()
+ path := d.SrcPath.String()
+ if !strings.HasSuffix(path, rel) {
+ panic(fmt.Errorf("path %q does not end with %q", path, rel))
+ }
+ path = strings.TrimSuffix(path, rel)
+ testFileString := path + ":" + rel
+ if len(d.RelativeInstallPath) > 0 {
+ testFileString += ":" + d.RelativeInstallPath
+ }
+ testFiles = append(testFiles, testFileString)
+ }
+ return testFiles
+}