Add module dir to includes for cc_preprocess_no_configuration
This is needed to create the same behavior as other cc modules.
Bug: 372091092
Test: go test
Change-Id: I2c15dbc2c6a2b2ba693ef0f2a732525dd2f72d0f
diff --git a/cc/cc_preprocess_no_configuration_test.go b/cc/cc_preprocess_no_configuration_test.go
index 43e726d..c6eae4c 100644
--- a/cc/cc_preprocess_no_configuration_test.go
+++ b/cc/cc_preprocess_no_configuration_test.go
@@ -20,21 +20,24 @@
)
func TestCcPreprocessNoConfiguration(t *testing.T) {
+ bp := `
+ cc_preprocess_no_configuration {
+ name: "foo",
+ srcs: ["main.cc"],
+ cflags: ["-E", "-DANDROID"],
+ }
+ `
+
fixture := android.GroupFixturePreparers(
android.PrepareForIntegrationTestWithAndroid,
android.FixtureRegisterWithContext(RegisterCCPreprocessNoConfiguration),
+ android.FixtureAddTextFile("foo/bar/Android.bp", bp),
)
- result := fixture.RunTestWithBp(t, `
-cc_preprocess_no_configuration {
- name: "foo",
- srcs: ["main.cc"],
- cflags: ["-E", "-DANDROID"],
-}
-`)
+ result := fixture.RunTest(t)
foo := result.ModuleForTests("foo", "")
actual := foo.Rule("cc").Args["cFlags"]
- expected := "-E -DANDROID"
+ expected := "-E -DANDROID -Ifoo/bar"
android.AssertStringEquals(t, "cflags should be correct", expected, actual)
}