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/bp2build/apex_conversion_test.go b/bp2build/apex_conversion_test.go
index 1cc3f22..390cabe 100644
--- a/bp2build/apex_conversion_test.go
+++ b/bp2build/apex_conversion_test.go
@@ -1475,10 +1475,11 @@
`,
ExpectedBazelTargets: []string{
MakeBazelTarget("apex", "test_com.android.apogee", AttrNameToString{
- "file_contexts": `"file_contexts_file"`,
- "manifest": `"apex_manifest.json"`,
- "testonly": `True`,
- "tests": `[":cc_test_1"]`,
+ "file_contexts": `"file_contexts_file"`,
+ "base_apex_name": `"com.android.apogee"`,
+ "manifest": `"apex_manifest.json"`,
+ "testonly": `True`,
+ "tests": `[":cc_test_1"]`,
}),
}})
}