@@ -10,7 +10,6 @@ load("@rules_testing//lib:util.bzl", "util")
1010load ("//java:java_binary.bzl" , "java_binary" )
1111load ("//java:java_library.bzl" , "java_library" )
1212load ("//java:java_test.bzl" , "java_test" )
13- load ("//java/common:java_info.bzl" , "JavaInfo" )
1413load ("//java/common:java_semantics.bzl" , "semantics" )
1514load ("//java/common/rules:java_helper.bzl" , "helper" )
1615load ("//test/java/testutil:helper.bzl" , "always_passes" )
@@ -210,43 +209,6 @@ def _test_stamp_values_impl(env, targets):
210209 env .expect .that_target (targets .defaultstamp ).attr ("stamp" , factory = subjects .int ).equals (0 )
211210 env .expect .that_target (targets .autostamp ).attr ("stamp" , factory = subjects .int ).equals (- 1 )
212211
213- def _test_add_test_support_to_compile_time_deps_flag (name ):
214- if not bazel_features .rules .analysis_tests_can_transition_on_experimental_incompatible_flags :
215- always_passes (name )
216- return
217- util .helper_target (
218- rule = java_test ,
219- name = name + "/test" ,
220- srcs = [name + "/Test.java" ],
221- )
222-
223- analysis_test (
224- name = name ,
225- targets = {
226- "add_support" : name + "/test" ,
227- "no_add_support" : name + "/test" ,
228- },
229- attrs = {
230- "test_runner" : attr .label (default = semantics .JAVA_TEST_RUNNER_LABEL ),
231- "add_support" : {
232- "@config_settings" : {
233- "//command_line_option:experimental_add_test_support_to_compile_time_deps" : True ,
234- },
235- },
236- "no_add_support" : {
237- "@config_settings" : {
238- "//command_line_option:experimental_add_test_support_to_compile_time_deps" : False ,
239- },
240- },
241- },
242- impl = _test_add_test_support_to_compile_time_deps_flag_impl ,
243- )
244-
245- def _test_add_test_support_to_compile_time_deps_flag_impl (env , targets ):
246- compile_jars = env .ctx .attr .test_runner [JavaInfo ].compile_jars
247- env .expect .that_target (targets .add_support ).action_named ("Javac" ).inputs ().contains_at_least (compile_jars .to_list ())
248- env .expect .that_target (targets .no_add_support ).action_named ("Javac" ).inputs ().contains_none_of (compile_jars .to_list ())
249-
250212def _test_mac_requires_darwin_for_execution (name ):
251213 util .helper_target (
252214 rule = native .platform ,
@@ -443,7 +405,6 @@ def java_test_tests(name):
443405 _test_java_test_propagates_direct_native_libraries ,
444406 _test_coverage_uses_coverage_runner_for_main ,
445407 _test_stamp_values ,
446- _test_add_test_support_to_compile_time_deps_flag ,
447408 _test_mac_requires_darwin_for_execution ,
448409 _test_java_test_sets_securiry_manager_property_jdk17 ,
449410 _test_one_version_check_java_test ,
0 commit comments