aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/shell/integration/execution_phase_tests.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/shell/integration/execution_phase_tests.sh')
-rwxr-xr-xsrc/test/shell/integration/execution_phase_tests.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/test/shell/integration/execution_phase_tests.sh b/src/test/shell/integration/execution_phase_tests.sh
index 3f25c5df09..7266060b50 100755
--- a/src/test/shell/integration/execution_phase_tests.sh
+++ b/src/test/shell/integration/execution_phase_tests.sh
@@ -268,4 +268,28 @@ function test_jobs_default_auto() {
"--jobs was not set to auto by default"
}
+function test_analysis_warning_cached() {
+ mkdir -p "foo" "bar" || fail "Could not create directories"
+ cat > foo/BUILD <<'EOF' || fail "foo/BUILD"
+cc_library(
+ name = 'foo',
+ deprecation = 'foo warning',
+ srcs = ['foo.cc'],
+ visibility = ['//visibility:public']
+)
+EOF
+ cat > bar/BUILD <<'EOF' || fail "bar/BUILD"
+cc_library(name = 'bar', srcs = ['bar.cc'], deps = ['//foo:foo'])
+EOF
+ touch foo/foo.cc bar/bar.cc || fail "Couldn't touch"
+ bazel build --nobuild //bar:bar >& "$TEST_log" || fail "Expected success"
+ expect_log "WARNING: .*: foo warning"
+ bazel build //bar:bar >& "$TEST_log" || fail "Expected success"
+ expect_log "WARNING: .*: foo warning"
+ echo "// comment" >> bar/bar.cc || fail "Couldn't change contents"
+ bazel build //bar:bar >& "$TEST_log" || fail "Expected success"
+ expect_log "WARNING: .*: foo warning"
+}
+
+
run_suite "Integration tests of ${PRODUCT_NAME} using the execution phase."