Skip to content

Commit

Permalink
Add -Djava.security.manager=allow to JVM flags.
Browse files Browse the repository at this point in the history
Due to a bug in Junit this needs to be disabled.

Linux will warn on this error but not crash, however, Darwin will crash.

See bazelbuild/bazel#16421.

PiperOrigin-RevId: 611117548
  • Loading branch information
jwhpryor authored and copybara-github committed Feb 28, 2024
1 parent 555ae93 commit 966717a
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions javatests/com/jnibind/test/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ java_test(
testonly = True,
srcs = ["ArrayTestFieldRank1.java"],
data = [":libarray_test_field_rank_1_jni.so"],
jvm_flags = ["-Djava.library.path=./javatests/com/jnibind/test"],
jvm_flags = ["-Djava.security.manager=allow"],
runtime_deps = [
":array_test_helpers",
],
Expand Down Expand Up @@ -67,7 +67,7 @@ java_test(
testonly = True,
srcs = ["ArrayTestFieldRank2.java"],
data = [":libarray_test_field_rank_2_jni.so"],
jvm_flags = ["-Djava.library.path=./javatests/com/jnibind/test"],
jvm_flags = ["-Djava.security.manager=allow"],
runtime_deps = [
":array_test_helpers",
],
Expand Down Expand Up @@ -129,7 +129,7 @@ java_test(
testonly = True,
srcs = ["ArrayTestMethodRank1.java"],
data = [":libarray_test_method_rank_1_jni.so"],
jvm_flags = ["-Djava.library.path=./javatests/com/jnibind/test"],
jvm_flags = ["-Djava.security.manager=allow"],
runtime_deps = [
":array_test_helpers",
],
Expand Down Expand Up @@ -168,7 +168,7 @@ java_test(
testonly = True,
srcs = ["ArrayTestMethodRank2.java"],
data = [":libarray_test_method_rank_2_jni.so"],
jvm_flags = ["-Djava.library.path=./javatests/com/jnibind/test"],
jvm_flags = ["-Djava.security.manager=allow"],
runtime_deps = [
":array_test_helpers",
],
Expand Down Expand Up @@ -205,7 +205,7 @@ java_test(
testonly = True,
srcs = ["BuilderTest.java"],
data = [":libbuilder_jni.so"],
jvm_flags = ["-Djava.library.path=./javatests/com/jnibind/test"],
jvm_flags = ["-Djava.security.manager=allow"],
deps = [
":object_test_helper",
"@maven//:com_google_truth_truth_1_1",
Expand Down Expand Up @@ -255,7 +255,7 @@ java_test(
"ClassLoaderHelperClass_deploy.jar",
":libclass_loader_test_jni.so",
],
jvm_flags = ["-Djava.library.path=./javatests/com/jnibind/test"],
jvm_flags = ["-Djava.security.manager=allow"],
deps = ["@maven//:com_google_truth_truth_1_1"],
)

Expand Down Expand Up @@ -283,7 +283,7 @@ java_test(
testonly = True,
srcs = ["ContextTest.java"],
data = [":libcontext_test_jni.so"],
jvm_flags = ["-Djava.library.path=./javatests/com/jnibind/test"],
jvm_flags = ["-Djava.security.manager=allow"],
deps = [
":object_test_helper",
"@maven//:com_google_truth_truth_1_1",
Expand Down Expand Up @@ -320,7 +320,7 @@ java_test(
"FieldTestHelper.java",
],
data = [":libfield_test_jni.so"],
jvm_flags = ["-Djava.library.path=./javatests/com/jnibind/test"],
jvm_flags = ["-Djava.security.manager=allow"],
deps = [
"@maven//:com_google_truth_truth_1_1",
"@maven//:junit_junit_4_13_1",
Expand Down Expand Up @@ -353,7 +353,7 @@ java_test(
testonly = True,
srcs = ["GlobalObjectTest.java"],
data = [":libglobal_object_test_jni.so"],
jvm_flags = ["-Djava.library.path=./javatests/com/jnibind/test"],
jvm_flags = ["-Djava.security.manager=allow"],
deps = [
":object_test_helper",
"@maven//:com_google_truth_truth_1_1",
Expand Down Expand Up @@ -387,7 +387,7 @@ java_test(
testonly = True,
srcs = ["LocalObjectTest.java"],
data = [":liblocal_object_test_jni.so"],
jvm_flags = ["-Djava.library.path=./javatests/com/jnibind/test"],
jvm_flags = ["-Djava.security.manager=allow"],
deps = [
":object_test_helper",
"@maven//:com_google_truth_truth_1_1",
Expand Down Expand Up @@ -424,7 +424,7 @@ java_test(
"MethodTestHelper.java",
],
data = [":libmethod_test_jni.so"],
jvm_flags = ["-Djava.library.path=./javatests/com/jnibind/test"],
jvm_flags = ["-Djava.security.manager=allow"],
deps = [
"@maven//:com_google_truth_truth_1_1",
"@maven//:junit_junit_4_13_1",
Expand Down Expand Up @@ -493,7 +493,7 @@ java_test(
"StaticTestHelper.java",
],
data = [":libstatic_test_jni.so"],
jvm_flags = ["-Djava.library.path=./javatests/com/jnibind/test"],
jvm_flags = ["-Djava.security.manager=allow"],
deps = [
":object_test_helper",
"@maven//:com_google_truth_truth_1_1",
Expand Down Expand Up @@ -530,7 +530,7 @@ java_test(
"StringTestHelper.java",
],
data = [":libstring_test_jni.so"],
jvm_flags = ["-Djava.library.path=./javatests/com/jnibind/test"],
jvm_flags = ["-Djava.security.manager=allow"],
deps = [
"@maven//:com_google_truth_truth_1_1",
"@maven//:junit_junit_4_13_1",
Expand Down Expand Up @@ -562,7 +562,7 @@ java_test(
testonly = True,
srcs = ["ThreadTest.java"],
data = [":libthread_test_jni.so"],
jvm_flags = ["-Djava.library.path=./javatests/com/jnibind/test"],
jvm_flags = ["-Djava.security.manager=allow"],
deps = [
":object_test_helper",
"@maven//:com_google_truth_truth_1_1",
Expand Down

0 comments on commit 966717a

Please sign in to comment.