Fix install location for vendor tests

These should be install in /data/nativetest* with the rest of the tests,
but had been moved to /vendor/nativetest* accidentally. Add some tests
so that this doesn't happen again.

Bug: 63393698
Test: m -j blueprint_tools
Test: compare out/soong/Android-aosp_arm64.mk
Test: compare out/soong/build.ninja
Change-Id: Id3b08a7e3908955df18a043a02ea576dc88086c3
diff --git a/android/paths.go b/android/paths.go
index aa06127..b5b4730 100644
--- a/android/paths.go
+++ b/android/paths.go
@@ -39,6 +39,17 @@
 var _ PathContext = blueprint.SingletonContext(nil)
 var _ PathContext = blueprint.ModuleContext(nil)
 
+type ModuleInstallPathContext interface {
+	PathContext
+
+	androidBaseContext
+
+	InstallInData() bool
+	InstallInSanitizerDir() bool
+}
+
+var _ ModuleInstallPathContext = ModuleContext(nil)
+
 // errorfContext is the interface containing the Errorf method matching the
 // Errorf method in blueprint.SingletonContext.
 type errorfContext interface {
@@ -669,14 +680,14 @@
 
 // PathForModuleInstall returns a Path representing the install path for the
 // module appended with paths...
-func PathForModuleInstall(ctx ModuleContext, pathComponents ...string) OutputPath {
+func PathForModuleInstall(ctx ModuleInstallPathContext, pathComponents ...string) OutputPath {
 	var outPaths []string
 	if ctx.Device() {
 		var partition string
-		if ctx.Vendor() {
-			partition = ctx.DeviceConfig().VendorPath()
-		} else if ctx.InstallInData() {
+		if ctx.InstallInData() {
 			partition = "data"
+		} else if ctx.Vendor() {
+			partition = ctx.DeviceConfig().VendorPath()
 		} else {
 			partition = "system"
 		}