Merge "Disallow non-existent paths in sdk package" am: 863ecfb7ba
am: a48aed59ee
am: 146b43cc63
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1647171 Change-Id: Ic3aa5af880a293457d5303b362c38421591f55e2
This commit is contained in:
@@ -166,6 +166,15 @@ const (
|
||||
recoveryVariant = "android_recovery_arm64_armv8-a_shared"
|
||||
)
|
||||
|
||||
// Test that the PrepareForTestWithCcDefaultModules provides all the files that it uses by
|
||||
// running it in a fixture that requires all source files to exist.
|
||||
func TestPrepareForTestWithCcDefaultModules(t *testing.T) {
|
||||
android.GroupFixturePreparers(
|
||||
PrepareForTestWithCcDefaultModules,
|
||||
android.PrepareForTestDisallowNonExistentPaths,
|
||||
).RunTest(t)
|
||||
}
|
||||
|
||||
func TestFuchsiaDeps(t *testing.T) {
|
||||
t.Helper()
|
||||
|
||||
|
@@ -619,11 +619,26 @@ var PrepareForTestWithCcBuildComponents = android.GroupFixturePreparers(
|
||||
|
||||
RegisterVndkLibraryTxtTypes(ctx)
|
||||
}),
|
||||
|
||||
// Additional files needed in tests that disallow non-existent source files.
|
||||
// This includes files that are needed by all, or at least most, instances of a cc module type.
|
||||
android.MockFS{
|
||||
// Needed for ndk_prebuilt_(shared|static)_stl.
|
||||
"prebuilts/ndk/current/sources/cxx-stl/llvm-libc++/libs": nil,
|
||||
}.AddToFixture(),
|
||||
)
|
||||
|
||||
// Preparer that will define default cc modules, e.g. standard prebuilt modules.
|
||||
var PrepareForTestWithCcDefaultModules = android.GroupFixturePreparers(
|
||||
PrepareForTestWithCcBuildComponents,
|
||||
|
||||
// Additional files needed in tests that disallow non-existent source.
|
||||
android.MockFS{
|
||||
"defaults/cc/common/libc.map.txt": nil,
|
||||
"defaults/cc/common/libdl.map.txt": nil,
|
||||
"defaults/cc/common/libm.map.txt": nil,
|
||||
}.AddToFixture(),
|
||||
|
||||
// Place the default cc test modules that are common to all platforms in a location that will not
|
||||
// conflict with default test modules defined by other packages.
|
||||
android.FixtureAddTextFile(DefaultCcCommonTestModulesDir+"Android.bp", commonDefaultModules()),
|
||||
|
Reference in New Issue
Block a user