|
27 | 27 | import com.google.devtools.build.lib.buildtool.util.BuildIntegrationTestCase; |
28 | 28 | import com.google.devtools.build.lib.skyframe.ActionTemplateExpansionValue; |
29 | 29 | import com.google.devtools.build.lib.skyframe.ActionTemplateExpansionValue.ActionTemplateExpansionKey; |
| 30 | +import com.google.devtools.build.lib.testutil.SkyframeExecutorTestHelper; |
30 | 31 | import com.google.devtools.build.lib.testutil.TestConstants; |
31 | 32 | import com.google.devtools.build.lib.util.io.RecordingOutErr; |
32 | 33 | import com.google.devtools.build.lib.vfs.FileSystemUtils; |
@@ -171,6 +172,7 @@ def split_directory_impl( |
171 | 172 |
|
172 | 173 | @Test |
173 | 174 | public void doSimpleMappingWithAdditionalInputsAndParams() throws Exception { |
| 175 | + SkyframeExecutorTestHelper.process(getSkyframeExecutor()); |
174 | 176 | write( |
175 | 177 | "test/rule_def.bzl", |
176 | 178 | """ |
@@ -208,6 +210,7 @@ def rule_impl(ctx): |
208 | 210 |
|
209 | 211 | @Test |
210 | 212 | public void multipleInputDirectories() throws Exception { |
| 213 | + SkyframeExecutorTestHelper.process(getSkyframeExecutor()); |
211 | 214 | write( |
212 | 215 | "test/rule_def.bzl", |
213 | 216 | """ |
@@ -241,6 +244,7 @@ def rule_impl(ctx): |
241 | 244 |
|
242 | 245 | @Test |
243 | 246 | public void multipleOutputDirectories() throws Exception { |
| 247 | + SkyframeExecutorTestHelper.process(getSkyframeExecutor()); |
244 | 248 | write( |
245 | 249 | "test/rule_def.bzl", |
246 | 250 | """ |
@@ -276,6 +280,7 @@ def rule_impl(ctx): |
276 | 280 |
|
277 | 281 | @Test |
278 | 282 | public void outputDirectoriesCanBeChainedToSubsequentMapDirectoryCalls() throws Exception { |
| 283 | + SkyframeExecutorTestHelper.process(getSkyframeExecutor()); |
279 | 284 | write( |
280 | 285 | "test/rule_def.bzl", |
281 | 286 | """ |
@@ -337,6 +342,7 @@ def rule_impl(ctx): |
337 | 342 |
|
338 | 343 | @Test |
339 | 344 | public void executionRequirementsPropagatedToExpandedActions() throws Exception { |
| 345 | + SkyframeExecutorTestHelper.process(getSkyframeExecutor()); |
340 | 346 | write( |
341 | 347 | "test/rule_def.bzl", |
342 | 348 | """ |
@@ -377,6 +383,7 @@ def rule_impl(ctx): |
377 | 383 |
|
378 | 384 | @Test |
379 | 385 | public void actionEnvironmentPropagatedToExpandedActions() throws Exception { |
| 386 | + SkyframeExecutorTestHelper.process(getSkyframeExecutor()); |
380 | 387 | write( |
381 | 388 | "test/rule_def.bzl", |
382 | 389 | """ |
@@ -462,6 +469,7 @@ def rule_impl(ctx): |
462 | 469 | @TestParameters("{value: 'set()', errorType: 'set'}") |
463 | 470 | // Only boolean integer and strings are allowed in additional_params. |
464 | 471 | public void disallowedAdditionalParams(String value, String errorType) throws Exception { |
| 472 | + SkyframeExecutorTestHelper.process(getSkyframeExecutor()); |
465 | 473 | write( |
466 | 474 | "test/rule_def.bzl", |
467 | 475 | String.format( |
@@ -504,6 +512,7 @@ def rule_impl(ctx): |
504 | 512 | @TestParameters("{inputs: '{}', outputs: '{\"output_dir\": output_dir}', errorType: 'input'}") |
505 | 513 | public void emptyInputOrOutputDirectoriesNotAllowed( |
506 | 514 | String inputs, String outputs, String errorType) throws Exception { |
| 515 | + SkyframeExecutorTestHelper.process(getSkyframeExecutor()); |
507 | 516 | write( |
508 | 517 | "test/rule_def.bzl", |
509 | 518 | String.format( |
@@ -533,6 +542,7 @@ def rule_impl(ctx): |
533 | 542 |
|
534 | 543 | @Test |
535 | 544 | public void failingImplementation() throws Exception { |
| 545 | + SkyframeExecutorTestHelper.process(getSkyframeExecutor()); |
536 | 546 | write( |
537 | 547 | "test/rule_def.bzl", |
538 | 548 | """ |
@@ -566,6 +576,7 @@ def rule_impl(ctx): |
566 | 576 |
|
567 | 577 | @Test |
568 | 578 | public void cannotDeclareFileInNonOutputDirectory() throws Exception { |
| 579 | + SkyframeExecutorTestHelper.process(getSkyframeExecutor()); |
569 | 580 | write( |
570 | 581 | "test/rule_def.bzl", |
571 | 582 | """ |
@@ -601,6 +612,8 @@ def rule_impl(ctx): |
601 | 612 |
|
602 | 613 | @Test |
603 | 614 | public void actionConflicts_conflictingOutputsInSameDirectory() throws Exception { |
| 615 | + // Don't check serialization here, since the action conflict only occurs during execution, |
| 616 | + // but serialization checks end up throwing (due to action conflicts) before we get there. |
604 | 617 | write( |
605 | 618 | "test/rule_def.bzl", |
606 | 619 | """ |
@@ -651,6 +664,7 @@ def rule_impl(ctx): |
651 | 664 | @TestParameters("{output: 'some_file', path: 'test/some_file'}") |
652 | 665 | public void actionConflicts_conflictingOutputsFromOtherContext(String output, String path) |
653 | 666 | throws Exception { |
| 667 | + SkyframeExecutorTestHelper.process(getSkyframeExecutor()); |
654 | 668 | write( |
655 | 669 | "test/rule_def.bzl", |
656 | 670 | String.format( |
@@ -717,6 +731,7 @@ def rule_impl(ctx): |
717 | 731 | @TestParameters("{value: '(1, 2)', repr: '\\(1, 2\\)'}") |
718 | 732 | public void implementationWithNonNoneReturnValueDisallowed(String value, String repr) |
719 | 733 | throws Exception { |
| 734 | + SkyframeExecutorTestHelper.process(getSkyframeExecutor()); |
720 | 735 | write( |
721 | 736 | "test/rule_def.bzl", |
722 | 737 | String.format( |
@@ -760,6 +775,7 @@ def rule_impl(ctx): |
760 | 775 | public void nonTopLevelImplementationsDisallowed( |
761 | 776 | @TestParameter({"non_top_level_impl", "lambda_impl"}) String implementation) |
762 | 777 | throws Exception { |
| 778 | + SkyframeExecutorTestHelper.process(getSkyframeExecutor()); |
763 | 779 | write( |
764 | 780 | "test/rule_def.bzl", |
765 | 781 | String.format( |
|
0 commit comments