diff options
| author | 2020-03-25 09:55:12 +0000 | |
|---|---|---|
| committer | 2020-03-25 09:55:12 +0000 | |
| commit | 5e9cf02ab545072ec68b593a3ea1589055fdd319 (patch) | |
| tree | b773f18a1f0102516b0abda4c060ca6292562e7f /java/java_test.go | |
| parent | eb4d9f2d68f85b380d74f7a0e870aaa45197ef44 (diff) | |
| parent | 19604de13e1a531dc0b3695932c6689ac629c0d4 (diff) | |
Merge "add aidl.export_include_dirs to java_import module type"
Diffstat (limited to 'java/java_test.go')
| -rw-r--r-- | java/java_test.go | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/java/java_test.go b/java/java_test.go index 6d972bebd..e8a1a7c83 100644 --- a/java/java_test.go +++ b/java/java_test.go @@ -1491,3 +1491,27 @@ func checkBootClasspathForSystemModule(t *testing.T, ctx *android.TestContext, m t.Errorf("bootclasspath of %q must start with --system and end with %q, but was %#v.", moduleName, expectedSuffix, bootClasspath) } } + +func TestAidlExportIncludeDirsFromImports(t *testing.T) { + ctx, _ := testJava(t, ` + java_library { + name: "foo", + srcs: ["aidl/foo/IFoo.aidl"], + libs: ["bar"], + } + + java_import { + name: "bar", + jars: ["a.jar"], + aidl: { + export_include_dirs: ["aidl/bar"], + }, + } + `) + + aidlCommand := ctx.ModuleForTests("foo", "android_common").Rule("aidl").RuleParams.Command + expectedAidlFlag := "-Iaidl/bar" + if !strings.Contains(aidlCommand, expectedAidlFlag) { + t.Errorf("aidl command %q does not contain %q", aidlCommand, expectedAidlFlag) + } +} |