From 0c9f2d4c15b761e3f3b863658b6d5c65bde6db22 Mon Sep 17 00:00:00 2001 From: lberki Date: Thu, 12 Apr 2018 00:13:39 -0700 Subject: Remove WorkerTestStrategy and with it, BuildConfiguration.Fragment#compatibleWithStrategy(). The experiment did not work out. RELNOTES: None. PiperOrigin-RevId: 192567832 --- src/test/shell/bazel/BUILD | 7 - .../shell/bazel/persistent_test_runner_test.sh | 302 --------------------- 2 files changed, 309 deletions(-) delete mode 100755 src/test/shell/bazel/persistent_test_runner_test.sh (limited to 'src/test') diff --git a/src/test/shell/bazel/BUILD b/src/test/shell/bazel/BUILD index 75bc915493..8204c29bfc 100644 --- a/src/test/shell/bazel/BUILD +++ b/src/test/shell/bazel/BUILD @@ -116,13 +116,6 @@ sh_test( data = [":test-deps"], ) -sh_test( - name = "persistent_test_runner_test", - size = "large", - srcs = ["persistent_test_runner_test.sh"], - data = [":test-deps"], -) - sh_test( name = "bazel_build_event_stream_test", size = "medium", diff --git a/src/test/shell/bazel/persistent_test_runner_test.sh b/src/test/shell/bazel/persistent_test_runner_test.sh deleted file mode 100755 index 829377dc38..0000000000 --- a/src/test/shell/bazel/persistent_test_runner_test.sh +++ /dev/null @@ -1,302 +0,0 @@ -#!/bin/bash -# -# Copyright 2016 The Bazel Authors. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Correctness tests for using a Persistent TestRunner. -# - -if is_windows; then - echo "Persistent test runner functionality not ready for windows" >&2 - exit 0 -fi - -# Load the test setup defined in the parent directory -CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -source "${CURRENT_DIR}/../integration_test_setup.sh" \ - || { echo "integration_test_setup.sh not found!" >&2; exit 1; } - -function test_simple_scenario() { - setup_javatest_support - mkdir -p java/testrunners || fail "mkdir failed" - - cat > java/testrunners/TestsPass.java < java/testrunners/TestsFail.java < java/testrunners/BUILD < $TEST_log \ - && fail "Test passes unexpectedly" || true - expect_log "Test is supposed to fail" -} - -#TODO(b/37304748): Re-enable once we fix its flakiness. -function DISABLED_test_reload_modified_classes() { - setup_javatest_support - mkdir -p java/testrunners || fail "mkdir failed" - - # Create a passing test. - cat > java/testrunners/Tests.java < java/testrunners/BUILD < $TEST_log || fail "Test fails unexpectedly" - - # Now get the test to fail. - cat > java/testrunners/Tests.java < $TEST_log \ - && fail "Test passes unexpectedly" || true - expect_log "Test is supposed to fail now" -} - -function test_reload_modified_classpaths() { - setup_javatest_support - mkdir -p java/testrunners || fail "mkdir failed" - - # Create a passing test. - cat > java/testrunners/Tests.java < java/testrunners/BUILD < $TEST_log || fail "Test fails unexpectedly" - - # Create a library to add a dep. - cat > java/testrunners/TrueVal.java < java/testrunners/Tests.java < java/testrunners/BUILD < $TEST_log \ - && fail "Test passes unexpectedly" || true - expect_log "Supposed to fail now." -} - -function test_fail_without_testrunner() { - mkdir -p java/testrunners || fail "mkdir failed" - - cat > java/testrunners/TestWithoutRunner.java < java/testrunners/BUILD <& $TEST_log || fail "Normal test execution should pass." - - bazel test --explicit_java_test_deps --experimental_testrunner --nocache_test_results \ - --test_strategy=experimental_worker >& $TEST_log //java/testrunners:TestWithoutRunner \ - && fail "Test should have failed when running with an experimental runner." || true - - expect_log \ - "Tests that do not use the experimental test runner are incompatible with the persistent worker" -} - -function test_fail_without_experimental_testrunner() { - setup_javatest_support - mkdir -p java/testrunners || fail "mkdir failed" - - cat > java/testrunners/Tests.java < java/testrunners/BUILD <& $TEST_log \ - || fail "Normal test execution should pass." - - bazel test --nocache_test_results --test_strategy=experimental_worker >& $TEST_log \ - //java/testrunners:Tests \ - && fail "Test should have failed when running with an experimental runner." \ - || true - - expect_log "Build configuration not compatible with experimental_worker" -} - -run_suite "Persistent Test Runner tests" -- cgit v1.2.3