aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/shell
diff options
context:
space:
mode:
authorGravatar Dmitry Lomov <dslomov@google.com>2018-01-16 02:43:25 -0800
committerGravatar Copybara-Service <copybara-piper@google.com>2018-01-16 02:45:25 -0800
commitdafe71390340224e06eab0ac7afcebb2f5219f5a (patch)
tree2fe57d053d659f9febc8bf1e27ba2fc415f6a7b6 /src/test/shell
parent5bd53cb609480ca896ca2d011f415b424c63ce63 (diff)
Report unsuccessful error code if bazel fetch fails in "keep going" mode.
Fixes #3234. Change-Id: I1bfbe856d35b98995f5a0684fe47c7566b8dd093 PiperOrigin-RevId: 182029085
Diffstat (limited to 'src/test/shell')
-rwxr-xr-xsrc/test/shell/bazel/external_integration_test.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/shell/bazel/external_integration_test.sh b/src/test/shell/bazel/external_integration_test.sh
index a899c1183d..83af8fe41f 100755
--- a/src/test/shell/bazel/external_integration_test.sh
+++ b/src/test/shell/bazel/external_integration_test.sh
@@ -948,4 +948,20 @@ EOF
|| fail 'Expected @ext//:foo and //:foo not to conflict'
}
+function test_failing_fetch_with_keep_going() {
+ touch WORKSPACE
+ cat > BUILD <<'EOF'
+package(default_visibility = ["//visibility:public"])
+
+cc_binary(
+ name = "hello-world",
+ srcs = ["hello-world.cc"],
+ deps = ["@fake//:fake"],
+)
+EOF
+ touch hello-world.cc
+
+ bazel fetch --keep_going //... >& $TEST_log && fail "Expected to fail" || true
+}
+
run_suite "external tests"