@@ -415,6 +415,7 @@ public void testJavaCommonCompileExposesOutputJarProvider() throws Exception {
415
415
" 'sourcepath': attr.label_list(allow_files=['.jar'])," ,
416
416
" '_java_toolchain': attr.label(default = Label('//java/com/google/test:toolchain'))," ,
417
417
" }," ,
418
+ " toolchains = ['" + TestConstants .JAVA_TOOLCHAIN_TYPE + "']," ,
418
419
" fragments = ['java']" ,
419
420
")" );
420
421
@@ -491,6 +492,7 @@ public void javaCommonCompile_setsRuntimeDeps() throws Exception {
491
492
" 'runtime_deps': attr.label_list()," ,
492
493
" '_java_toolchain': attr.label(default = Label('//java/com/google/test:toolchain'))," ,
493
494
" }," ,
495
+ " toolchains = ['" + TestConstants .JAVA_TOOLCHAIN_TYPE + "']," ,
494
496
" fragments = ['java']" ,
495
497
")" );
496
498
@@ -557,6 +559,7 @@ public void testJavaCommonCompileExposesAnnotationProcessingInfo() throws Except
557
559
" 'plugins': attr.label_list()," ,
558
560
" '_java_toolchain': attr.label(default = Label('//java/com/google/test:toolchain'))," ,
559
561
" }," ,
562
+ " toolchains = ['" + TestConstants .JAVA_TOOLCHAIN_TYPE + "']," ,
560
563
" fragments = ['java']" ,
561
564
")" );
562
565
@@ -594,6 +597,7 @@ public void javaCommonCompile_requiresJavaPluginInfo() throws Exception {
594
597
" 'deps': attr.label_list()," ,
595
598
" '_java_toolchain': attr.label(default = Label('//java/com/google/test:toolchain'))," ,
596
599
" }," ,
600
+ " toolchains = ['" + TestConstants .JAVA_TOOLCHAIN_TYPE + "']," ,
597
601
" fragments = ['java']" ,
598
602
")" );
599
603
scratch .file (
@@ -658,6 +662,7 @@ public void testJavaCommonCompileCompilationInfo() throws Exception {
658
662
" 'deps': attr.label_list()," ,
659
663
" '_java_toolchain': attr.label(default = Label('//java/com/google/test:toolchain'))," ,
660
664
" }," ,
665
+ " toolchains = ['" + TestConstants .JAVA_TOOLCHAIN_TYPE + "']," ,
661
666
" fragments = ['java']" ,
662
667
")" );
663
668
@@ -718,6 +723,7 @@ public void testJavaCommonCompileTransitiveSourceJars() throws Exception {
718
723
" 'deps': attr.label_list()," ,
719
724
" '_java_toolchain': attr.label(default = Label('//java/com/google/test:toolchain'))," ,
720
725
" }," ,
726
+ " toolchains = ['" + TestConstants .JAVA_TOOLCHAIN_TYPE + "']," ,
721
727
" fragments = ['java']" ,
722
728
")" );
723
729
@@ -786,6 +792,7 @@ public void testJavaCommonCompileSourceJarName() throws Exception {
786
792
" 'deps': attr.label_list()," ,
787
793
" '_java_toolchain': attr.label(default = Label('//java/com/google/test:toolchain'))," ,
788
794
" }," ,
795
+ " toolchains = ['" + TestConstants .JAVA_TOOLCHAIN_TYPE + "']," ,
789
796
" fragments = ['java']" ,
790
797
")" );
791
798
@@ -835,6 +842,7 @@ public void testJavaCommonCompileWithOnlyOneSourceJar() throws Exception {
835
842
" 'srcs': attr.label_list(allow_files=['.jar'])," ,
836
843
" '_java_toolchain': attr.label(default = Label('//java/com/google/test:toolchain'))," ,
837
844
" }," ,
845
+ " toolchains = ['" + TestConstants .JAVA_TOOLCHAIN_TYPE + "']," ,
838
846
" fragments = ['java']" ,
839
847
")" );
840
848
@@ -884,6 +892,7 @@ public void testJavaCommonCompile_noSources() throws Exception {
884
892
" attrs = {" ,
885
893
" '_java_toolchain': attr.label(default = Label('//java/com/google/test:toolchain'))," ,
886
894
" }," ,
895
+ " toolchains = ['" + TestConstants .JAVA_TOOLCHAIN_TYPE + "']," ,
887
896
" fragments = ['java']" ,
888
897
")" );
889
898
@@ -935,6 +944,7 @@ public void testJavaCommonCompileCustomSourceJar() throws Exception {
935
944
" 'srcs': attr.label_list(allow_files=['.jar'])," ,
936
945
" '_java_toolchain': attr.label(default = Label('//java/com/google/test:toolchain'))," ,
937
946
" }," ,
947
+ " toolchains = ['" + TestConstants .JAVA_TOOLCHAIN_TYPE + "']," ,
938
948
" fragments = ['java']" ,
939
949
")" );
940
950
@@ -986,6 +996,7 @@ public void testJavaCommonCompileAdditionalInputsAndOutputs() throws Exception {
986
996
" 'additional_inputs': attr.label_list(allow_files=['.bin'])," ,
987
997
" '_java_toolchain': attr.label(default = Label('//java/com/google/test:toolchain'))," ,
988
998
" }," ,
999
+ " toolchains = ['" + TestConstants .JAVA_TOOLCHAIN_TYPE + "']," ,
989
1000
" fragments = ['java']" ,
990
1001
")" );
991
1002
@@ -2221,6 +2232,7 @@ public void javaCommonCompileNeverlink() throws Exception {
2221
2232
" 'deps': attr.label_list()," ,
2222
2233
" '_java_toolchain': attr.label(default = Label('//java/com/google/test:toolchain'))," ,
2223
2234
" }," ,
2235
+ " toolchains = ['" + TestConstants .JAVA_TOOLCHAIN_TYPE + "']," ,
2224
2236
" fragments = ['java']" ,
2225
2237
")" );
2226
2238
@@ -2334,6 +2346,7 @@ public void javaCommonCompileWithNeverlink() throws Exception {
2334
2346
" 'srcs': attr.label_list(allow_files=['.java'])," ,
2335
2347
" '_java_toolchain': attr.label(default = Label('//java/com/google/test:toolchain'))," ,
2336
2348
" }," ,
2349
+ " toolchains = ['" + TestConstants .JAVA_TOOLCHAIN_TYPE + "']," ,
2337
2350
" fragments = ['java']," ,
2338
2351
" provides = [JavaInfo]," ,
2339
2352
")" );
@@ -2395,6 +2408,7 @@ public void javaCommonCompile_nativeLibrariesPropagate() throws Exception {
2395
2408
" 'exports': attr.label_list()," ,
2396
2409
" '_java_toolchain': attr.label(default = Label('//java/com/google/test:toolchain'))," ,
2397
2410
" }," ,
2411
+ " toolchains = ['" + TestConstants .JAVA_TOOLCHAIN_TYPE + "']," ,
2398
2412
" fragments = ['java']" ,
2399
2413
")" );
2400
2414
@@ -2452,6 +2466,7 @@ public void javaCommonCompile_directNativeLibraries() throws Exception {
2452
2466
" 'ccdeps': attr.label_list()," ,
2453
2467
" '_java_toolchain': attr.label(default = Label('//java/com/google/test:toolchain'))," ,
2454
2468
" }," ,
2469
+ " toolchains = ['" + TestConstants .JAVA_TOOLCHAIN_TYPE + "']," ,
2455
2470
" fragments = ['java']" ,
2456
2471
")" );
2457
2472
@@ -2780,6 +2795,7 @@ public void testCompileExports() throws Exception {
2780
2795
" 'exports': attr.label_list()," ,
2781
2796
" '_java_toolchain': attr.label(default = Label('//java/com/google/test:toolchain'))," ,
2782
2797
" }," ,
2798
+ " toolchains = ['" + TestConstants .JAVA_TOOLCHAIN_TYPE + "']," ,
2783
2799
" fragments = ['java']" ,
2784
2800
")" );
2785
2801
@@ -2813,6 +2829,7 @@ public void testCompileOutputJarHasManifestProto() throws Exception {
2813
2829
" 'srcs': attr.label_list(allow_files=['.java'])," ,
2814
2830
" '_java_toolchain': attr.label(default = Label('//java/com/google/test:toolchain'))," ,
2815
2831
" }," ,
2832
+ " toolchains = ['" + TestConstants .JAVA_TOOLCHAIN_TYPE + "']," ,
2816
2833
" fragments = ['java']," ,
2817
2834
")" );
2818
2835
scratch .file (
@@ -2851,6 +2868,7 @@ public void testCompileWithNeverlinkDeps() throws Exception {
2851
2868
" 'deps': attr.label_list()," ,
2852
2869
" '_java_toolchain': attr.label(default = Label('//java/com/google/test:toolchain'))," ,
2853
2870
" }," ,
2871
+ " toolchains = ['" + TestConstants .JAVA_TOOLCHAIN_TYPE + "']," ,
2854
2872
" fragments = ['java']," ,
2855
2873
")" );
2856
2874
scratch .file (
@@ -2892,6 +2910,7 @@ public void testCompileOutputJarNotInRuntimePathWithoutAnySourcesDefined() throw
2892
2910
" 'exports': attr.label_list()," ,
2893
2911
" '_java_toolchain': attr.label(default = Label('//java/com/google/test:toolchain'))," ,
2894
2912
" }," ,
2913
+ " toolchains = ['" + TestConstants .JAVA_TOOLCHAIN_TYPE + "']," ,
2895
2914
" fragments = ['java']," ,
2896
2915
")" );
2897
2916
scratch .file (
@@ -2943,6 +2962,7 @@ public void testConfiguredTargetToolchain() throws Exception {
2943
2962
" 'srcs': attr.label_list(allow_files=['.java'])," ,
2944
2963
" '_java_toolchain': attr.label(default = Label('//java/com/google/test:toolchain'))," ,
2945
2964
" }," ,
2965
+ " toolchains = ['" + TestConstants .JAVA_TOOLCHAIN_TYPE + "']," ,
2946
2966
" fragments = ['java'])" );
2947
2967
2948
2968
reporter .removeHandler (failFastHandler );
@@ -3092,6 +3112,7 @@ public void testSkipAnnotationProcessing() throws Exception {
3092
3112
" 'plugins': attr.label_list(providers=[JavaPluginInfo])," ,
3093
3113
" '_java_toolchain': attr.label(default = Label('//java/com/google/test:toolchain'))," ,
3094
3114
" }," ,
3115
+ " toolchains = ['" + TestConstants .JAVA_TOOLCHAIN_TYPE + "']," ,
3095
3116
" fragments = ['java']" ,
3096
3117
")" );
3097
3118
scratch .file (
@@ -3164,6 +3185,7 @@ public void testCompileWithDisablingCompileJarIsPrivateApi() throws Exception {
3164
3185
" 'srcs': attr.label_list()," ,
3165
3186
" '_java_toolchain': attr.label(default = Label('//java/com/google/test:toolchain'))," ,
3166
3187
" }," ,
3188
+ " toolchains = ['" + TestConstants .JAVA_TOOLCHAIN_TYPE + "']," ,
3167
3189
" fragments = ['java']" ,
3168
3190
")" );
3169
3191
scratch .file (
@@ -3198,6 +3220,7 @@ public void testCompileWithClasspathResourcesIsPrivateApi() throws Exception {
3198
3220
" 'classpath_resources': attr.label_list(allow_files = True)," ,
3199
3221
" '_java_toolchain': attr.label(default = Label('//java/com/google/test:toolchain'))," ,
3200
3222
" }," ,
3223
+ " toolchains = ['" + TestConstants .JAVA_TOOLCHAIN_TYPE + "']," ,
3201
3224
" fragments = ['java']" ,
3202
3225
")" );
3203
3226
scratch .file (
@@ -3250,6 +3273,7 @@ public void testInjectingRuleKindIsPrivateApi() throws Exception {
3250
3273
" 'srcs': attr.label_list()," ,
3251
3274
" '_java_toolchain': attr.label(default = Label('//java/com/google/test:toolchain'))," ,
3252
3275
" }," ,
3276
+ " toolchains = ['" + TestConstants .JAVA_TOOLCHAIN_TYPE + "']," ,
3253
3277
" fragments = ['java']" ,
3254
3278
")" );
3255
3279
scratch .file (
@@ -3282,6 +3306,7 @@ public void testEnableJSpecifyIsPrivateApi() throws Exception {
3282
3306
" 'srcs': attr.label_list()," ,
3283
3307
" '_java_toolchain': attr.label(default = Label('//java/com/google/test:toolchain'))," ,
3284
3308
" }," ,
3309
+ " toolchains = ['" + TestConstants .JAVA_TOOLCHAIN_TYPE + "']," ,
3285
3310
" fragments = ['java']" ,
3286
3311
")" );
3287
3312
scratch .file (
@@ -3366,6 +3391,7 @@ public void testCompileIncludeCompilationInfoIsPrivateApi() throws Exception {
3366
3391
" 'srcs': attr.label_list()," ,
3367
3392
" '_java_toolchain': attr.label(default = Label('//java/com/google/test:toolchain'))," ,
3368
3393
" }," ,
3394
+ " toolchains = ['" + TestConstants .JAVA_TOOLCHAIN_TYPE + "']," ,
3369
3395
" fragments = ['java']" ,
3370
3396
")" );
3371
3397
scratch .file (
@@ -3399,6 +3425,7 @@ public void testCompileWithResorceJarsIsPrivateApi() throws Exception {
3399
3425
" 'srcs': attr.label_list()," ,
3400
3426
" '_java_toolchain': attr.label(default = Label('//java/com/google/test:toolchain'))," ,
3401
3427
" }," ,
3428
+ " toolchains = ['" + TestConstants .JAVA_TOOLCHAIN_TYPE + "']," ,
3402
3429
" fragments = ['java']" ,
3403
3430
")" );
3404
3431
scratch .file (
@@ -3451,6 +3478,7 @@ public void testRunIjarIsPrivateApi() throws Exception {
3451
3478
" attrs = {" ,
3452
3479
" '_java_toolchain': attr.label(default = Label('//java/com/google/test:toolchain'))," ,
3453
3480
" }," ,
3481
+ " toolchains = ['" + TestConstants .JAVA_TOOLCHAIN_TYPE + "']," ,
3454
3482
" fragments = ['java']" ,
3455
3483
")" );
3456
3484
scratch .file (
0 commit comments