Implement a feature that installs a cc_test's dependencies into a standalone folder.
This is the implementation of go/standalone-native-device-tests
This feature is disabled by default. To enable it, the `standalone_test` option needs to be added in the Android.bp file.
Example:
```
cc_test {
...
standalone_test: true,
...
}
```
Change-Id: I3bf1b0313e50d1018088123c40c7fd23dcb69553
Test: m bionic-unit-tests
Test: m libunwindstack_unit_test
diff --git a/cc/installer.go b/cc/installer.go
index 30f9612..d7d8c6d 100644
--- a/cc/installer.go
+++ b/cc/installer.go
@@ -107,6 +107,10 @@
installer.installDeps = append(installer.installDeps, installedData...)
}
+func (installer *baseInstaller) installStandaloneTestDep(ctx ModuleContext, standaloneTestDep android.PackagingSpec) {
+ installer.installTestData(ctx, []android.DataPath{{SrcPath: standaloneTestDep.ToGob().SrcPath, RelativeInstallPath: "standalone-libs"}})
+}
+
func (installer *baseInstaller) everInstallable() bool {
// Most cc modules are installable.
return true