Add more Rust vendor image support.
This adds Rust vendor image support for all module types except Rust prebuilts. Bug: 184042776 Test: New Soong tests. Test: Example cc_library vendor module can depend on rust_ffi_shared. Test: Example rust_library vendor-only module compiles. Change-Id: Iaa30ad51fdaedcbf14687da5472581f6af62ff59
This commit is contained in:
@@ -113,6 +113,24 @@ func testRustError(t *testing.T, pattern string, bp string) {
|
||||
RunTestWithBp(t, bp)
|
||||
}
|
||||
|
||||
// testRustVndkError is similar to testRustError, but can be used to test VNDK-related errors.
|
||||
func testRustVndkError(t *testing.T, pattern string, bp string) {
|
||||
skipTestIfOsNotSupported(t)
|
||||
android.GroupFixturePreparers(
|
||||
prepareForRustTest,
|
||||
rustMockedFiles.AddToFixture(),
|
||||
android.FixtureModifyProductVariables(
|
||||
func(variables android.FixtureProductVariables) {
|
||||
variables.DeviceVndkVersion = StringPtr("current")
|
||||
variables.ProductVndkVersion = StringPtr("current")
|
||||
variables.Platform_vndk_version = StringPtr("VER")
|
||||
},
|
||||
),
|
||||
).
|
||||
ExtendWithErrorHandler(android.FixtureExpectsAtLeastOneErrorMatchingPattern(pattern)).
|
||||
RunTestWithBp(t, bp)
|
||||
}
|
||||
|
||||
// testRustCtx is used to build a particular test environment. Unless your
|
||||
// tests requires a specific setup, prefer the wrapping functions: testRust,
|
||||
// testRustCov or testRustError.
|
||||
|
Reference in New Issue
Block a user