Refactor bp2build tests

Moves to specifying attributes as a map, such at it is possible to add
additional attributes conditionally. This is in particular useful once
supporting the `enabled` property which will add
`target_compatible_with`

Test: go test soong tests
Change-Id: Iade8eed1ce3acb1d1712a9ee3119d9ae59675624
This commit is contained in:
Liz Kammer
2021-11-08 12:56:31 -05:00
parent c0d9f8bd5e
commit 78cfdaa597
19 changed files with 1443 additions and 1751 deletions

View File

@@ -42,8 +42,9 @@ android_app_certificate {
certificate: "chamber_of_secrets_dir",
}
`,
expectedBazelTargets: []string{`android_app_certificate(
name = "com.android.apogee.cert",
certificate = "chamber_of_secrets_dir",
)`}})
expectedBazelTargets: []string{
makeBazelTarget("android_app_certificate", "com.android.apogee.cert", attrNameToString{
"certificate": `"chamber_of_secrets_dir"`,
}),
}})
}