Install data_libs using relative_install_path property
Test: Added to data_libs tests
Test: Manually verified with bionic-unit-tests
Test: Treehugger
Change-Id: I28a8e08e3409f1e7c7bb72f4351310b57f35f513
diff --git a/android/paths.go b/android/paths.go
index 20ff55e..65f129c 100644
--- a/android/paths.go
+++ b/android/paths.go
@@ -1555,3 +1555,15 @@
}
return filepath.Join(absSrcDir, path)
}
+
+// A DataPath represents the path of a file to be used as data, for example
+// a test library to be installed alongside a test.
+// The data file should be installed (copied from `<SrcPath>`) to
+// `<install_root>/<RelativeInstallPath>/<filename>`, or
+// `<install_root>/<filename>` if RelativeInstallPath is empty.
+type DataPath struct {
+ // The path of the data file that should be copied into the data directory
+ SrcPath Path
+ // The install path of the data file, relative to the install root.
+ RelativeInstallPath string
+}