aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/shell
diff options
context:
space:
mode:
authorGravatar Lukacs Berki <lberki@google.com>2015-11-27 14:42:34 +0000
committerGravatar Kristina Chodorow <kchodorow@google.com>2015-11-30 18:30:03 +0000
commit3de523e406a1c91bcf5bdca76d34603e521c93aa (patch)
tree67c7f4159742b26c8d91a796bbb1a15528a12958 /src/test/shell
parenta49fac6361ef2d1a2fc366fed516d1dcdf1004ed (diff)
Add a test that verifies that line number changes in the WORKSPACE file do not cause a refetch.
-- MOS_MIGRATED_REVID=108855645
Diffstat (limited to 'src/test/shell')
-rwxr-xr-xsrc/test/shell/bazel/git_repository_test.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/shell/bazel/git_repository_test.sh b/src/test/shell/bazel/git_repository_test.sh
index 5f0d9c4522..4beda0c47b 100755
--- a/src/test/shell/bazel/git_repository_test.sh
+++ b/src/test/shell/bazel/git_repository_test.sh
@@ -253,6 +253,17 @@ EOF
bazel --batch build @g//:g >& $TEST_log || fail "Build failed"
expect_log "Cloning"
assert_contains "GIT 2" bazel-genfiles/external/g/go
+
+ cat > WORKSPACE <<EOF
+# This comment line is to change the line numbers, which should not cause Bazel
+# to refetch the repository
+git_repository(name='g', remote='$repo_dir', commit='62777acc')
+EOF
+
+ bazel --batch build @g//:g >& $TEST_log || fail "Build failed"
+ expect_not_log "Cloning"
+ assert_contains "GIT 2" bazel-genfiles/external/g/go
+
}