aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test
diff options
context:
space:
mode:
authorGravatar Yun Peng <pcloudy@google.com>2017-02-10 15:43:41 +0000
committerGravatar Kristina Chodorow <kchodorow@google.com>2017-02-10 18:19:14 +0000
commitbcff52f6ce1ceb7b263cf3b3c508fa9610d1253f (patch)
treeca1b32a161e53ca8551930abc25aaf64a7055e11 /src/test
parent89512a7cbc4ff5d25415fc87b5d5d050452fa195 (diff)
Fixed java_stub_template substitution: %runfiles_manifest_only% was not substituted when runfiles is enabled.
This caused wrong rlocation function being defined on Linux and Mac. -- PiperOrigin-RevId: 147154028 MOS_MIGRATED_REVID=147154028
Diffstat (limited to 'src/test')
-rwxr-xr-xsrc/test/shell/bazel/bazel_java_test.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/test/shell/bazel/bazel_java_test.sh b/src/test/shell/bazel/bazel_java_test.sh
index df84b7f21f..48af5a90b4 100755
--- a/src/test/shell/bazel/bazel_java_test.sh
+++ b/src/test/shell/bazel/bazel_java_test.sh
@@ -105,6 +105,15 @@ function test_build_hello_world() {
bazel build //java/main:main &> $TEST_log || fail "build failed"
}
+# Runfiles is disabled by default on Windows, but we can test it on Unix by
+# adding flag --experimental_enable_runfiles=0
+function test_build_and_run_hello_world_without_runfiles() {
+ write_hello_library_files
+
+ bazel run --experimental_enable_runfiles=0 //java/main:main &> $TEST_log || fail "build failed"
+ expect_log "Hello, Library!;Hello, World!"
+}
+
function test_errorprone_error_fails_build_by_default() {
write_hello_library_files
# Trigger an error-prone error by comparing two arrays via #equals().