diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2021-04-17 04:35:24 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2021-04-17 04:35:24 +0000 |
commit | aef14db78a8593aa25f7170aa0fe976ae8b6bdbc (patch) | |
tree | a934455e429d6dee1370f95dedc423cfc30eee8e /java/java_test.go | |
parent | 7d9d2405f379dbd6659084dd66577f700a03055a (diff) | |
parent | 246164a055a529e081a7690cc9043b496757a30c (diff) |
Merge changes from topic "tvts-test-host-jni"
* changes:
Add jni_libs property to java tests
Add Target to cc.SharedLibraryInfo
Diffstat (limited to 'java/java_test.go')
-rw-r--r-- | java/java_test.go | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/java/java_test.go b/java/java_test.go index 052345871..4fc35265f 100644 --- a/java/java_test.go +++ b/java/java_test.go @@ -462,6 +462,32 @@ func TestBinary(t *testing.T) { } } +func TestTest(t *testing.T) { + ctx, _ := testJava(t, ` + java_test_host { + name: "foo", + srcs: ["a.java"], + jni_libs: ["libjni"], + } + + cc_library_shared { + name: "libjni", + host_supported: true, + device_supported: false, + stl: "none", + } + `) + + buildOS := android.BuildOs.String() + + foo := ctx.ModuleForTests("foo", buildOS+"_common").Module().(*TestHost) + + fooTestData := foo.data + if len(fooTestData) != 1 || fooTestData[0].Rel() != "lib64/libjni.so" { + t.Errorf(`expected foo test data relative path ["lib64/libjni.so"], got %q`, fooTestData.Strings()) + } +} + func TestHostBinaryNoJavaDebugInfoOverride(t *testing.T) { bp := ` java_library { |