Merge "soong: Add tests for depending on disabled module"

am: a9caf47ea2

Change-Id: I201c11b499650c96c3d52b53eda72f163364681e
This commit is contained in:
Jooyung Han
2019-08-28 17:24:44 -07:00
committed by android-build-merger
4 changed files with 125 additions and 1 deletions

View File

@@ -2264,6 +2264,24 @@ func TestStaticDepsOrderWithStubs(t *testing.T) {
}
}
func TestErrorsIfAModuleDependsOnDisabled(t *testing.T) {
testCcError(t, `module "libA" .* depends on disabled module "libB"`, `
cc_library {
name: "libA",
srcs: ["foo.c"],
shared_libs: ["libB"],
stl: "none",
}
cc_library {
name: "libB",
srcs: ["foo.c"],
enabled: false,
stl: "none",
}
`)
}
// Simple smoke test for the cc_fuzz target that ensures the rule compiles
// correctly.
func TestFuzzTarget(t *testing.T) {