diff options
| author | 2020-02-01 08:42:27 +0000 | |
|---|---|---|
| committer | 2020-02-01 08:42:27 +0000 | |
| commit | b708108b601bc5dfe26b14a69d647a9f72f8efaa (patch) | |
| tree | 3e6ce09d9831d913bebeb0deb7404ddb30bc34b5 /java/java_test.go | |
| parent | 4136c9b9ead9eb70ab666dcf0bc08dfa81f9dec4 (diff) | |
| parent | 726d23c26a763cdbded84cab92a2842122635420 (diff) | |
Merge "Improve java_sdk_library handling of test_current"
Diffstat (limited to 'java/java_test.go')
| -rw-r--r-- | java/java_test.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/java/java_test.go b/java/java_test.go index a2788cb8e..c4ab13d05 100644 --- a/java/java_test.go +++ b/java/java_test.go @@ -1043,6 +1043,12 @@ func TestJavaSdkLibrary(t *testing.T) { libs: ["baz"], sdk_version: "system_current", } + java_library { + name: "baz-test", + srcs: ["c.java"], + libs: ["foo"], + sdk_version: "test_current", + } `) // check the existence of the internal modules @@ -1075,6 +1081,13 @@ func TestJavaSdkLibrary(t *testing.T) { "foo.stubs.jar") } + bazTestJavac := ctx.ModuleForTests("baz-test", "android_common").Rule("javac") + // tests if baz-test is actually linked to the test stubs lib + if !strings.Contains(bazTestJavac.Args["classpath"], "foo.stubs.test.jar") { + t.Errorf("baz-test javac classpath %v does not contain %q", bazTestJavac.Args["classpath"], + "foo.stubs.test.jar") + } + // test if baz has exported SDK lib names foo and bar to qux qux := ctx.ModuleForTests("qux", "android_common") if quxLib, ok := qux.Module().(*Library); ok { |