For test apexes, base_apex_name is the api domain

apex_test do not "override" the source apexes that they test. However,
similar to override_apexes, test apexes have the same path
(/apex/<apex_name>) on device. Instead of creating another property,
reuse the existing base_apex_name property. The use case for this will
be for creating selection statements for stub/impl selection.

Test: go test ./bp2build
Change-Id: I4b7548e0e0fc920e407e1c5e5c00e87efc6e70c9
diff --git a/cc/bp2build.go b/cc/bp2build.go
index 6e91bff..ca8d609 100644
--- a/cc/bp2build.go
+++ b/cc/bp2build.go
@@ -1210,7 +1210,11 @@
 	}
 )
 
-func getApiDomain(apexName string) string {
+// GetApiDomain returns the canonical name of the apex. This is synonymous to the apex_name definition.
+// https://cs.android.com/android/_/android/platform/build/soong/+/e3f0281b8897da1fe23b2f4f3a05f1dc87bcc902:apex/prebuilt.go;l=81-83;drc=2dc7244af985a6ad701b22f1271e606cabba527f;bpv=1;bpt=0
+// For test apexes, it uses a naming convention heuristic to determine the api domain.
+// TODO (b/281548611): Move this build/soong/android
+func GetApiDomain(apexName string) string {
 	if apiDomain, exists := testApexNameToApiDomain[apexName]; exists {
 		return apiDomain
 	}
@@ -1233,7 +1237,7 @@
 	defer apiDomainConfigSettingLock.Unlock()
 
 	// Return if a config_setting has already been created
-	apiDomain := getApiDomain(apexName)
+	apiDomain := GetApiDomain(apexName)
 	acsm := getApiDomainConfigSettingMap(ctx.Config())
 	if _, exists := (*acsm)[apiDomain]; exists {
 		return
@@ -1270,7 +1274,7 @@
 	if apexAvailable == android.AvailableToAnyApex {
 		return bazel.AndroidAndInApex
 	}
-	apiDomain := getApiDomain(apexAvailable)
+	apiDomain := GetApiDomain(apexAvailable)
 	return "//build/bazel/rules/apex:" + apiDomain
 }