diff options
author | Philipp Wollermann <philwo@google.com> | 2016-10-19 09:56:43 +0000 |
---|---|---|
committer | Philipp Wollermann <philwo@google.com> | 2016-10-19 10:53:07 +0000 |
commit | e6191f7209ebf3f67480bc7aa9db5ac58beb2156 (patch) | |
tree | 2cfbec84aeb326362061af66e6beba7f578ab9e5 /src/test/shell | |
parent | 47fc5b3406c6106b3025534af18c122d7321b861 (diff) |
Rollback of commit a9f20b0d6459d395444c45cf5e94a899f3443633.
*** Reason for rollback ***
Broke Bazel CI:
ERROR: /home/ci/workspace/Bazel/JAVA_VERSION/1.8/PLATFORM_NAME/linux-x86_64/src/BUILD:284:1: in filegroup rule //src:srcs: non-test target '//src:srcs' depends on testonly target '//src/java_tools/junitrunner/java/com/google/testing/junit/junit4:srcs' and doesn't have testonly attribute set.
ERROR: Analysis of target '//scripts/packages:packages' failed; build aborted.
http://ci.bazel.io/view/Bazel%20bootstrap%20and%20maintenance/job/Bazel/JAVA_VERSION=1.8,PLATFORM_NAME=linux-x86_64/923/console
*** Original change description ***
Enforce that non test-only targets cannot depends on test-only targets
This behavior was not enforced since we open-sourced Bazel even though this was
documented and the attributed existed.
Also removed the incorrect part from the documentations: we do not enforce
restrictions on javatests package.
Fixes #1923.
RELNOTES[INC]: Non test-only targets can no longer depends on test-only targets.
--
MOS_MIGRATED_REVID=136574806
Diffstat (limited to 'src/test/shell')
-rwxr-xr-x | src/test/shell/bazel/bazel_test_test.sh | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/src/test/shell/bazel/bazel_test_test.sh b/src/test/shell/bazel/bazel_test_test.sh index d62fa2c084..a313a045b6 100755 --- a/src/test/shell/bazel/bazel_test_test.sh +++ b/src/test/shell/bazel/bazel_test_test.sh @@ -294,29 +294,6 @@ EOF [ -s $xml_log ] || fail "$xml_log was not present after test" } -# Simple test that we actually enforce testonly, see #1923. -function test_testonly_is_enforced() { - mkdir -p testonly - cat <<'EOF' >testonly/BUILD -genrule( - name = "testonly", - srcs = [], - cmd = "echo testonly | tee $@", - outs = ["testonly.txt"], - testonly = 1, -) -genrule( - name = "not-testonly", - srcs = [":testonly"], - cmd = "echo should fail | tee $@", - outs = ["not-testonly.txt"], -) -EOF - bazel build //testonly &>$TEST_log || fail "Building //testonly failed" - bazel build //testonly:not-testonly &>$TEST_log && fail "Should have failed" || true - expect_log "'//testonly:not-testonly' depends on testonly target '//testonly:testonly'" -} - function test_always_xml_output() { mkdir -p dir |