diff options
Diffstat (limited to 'src/test/java/com/google/devtools/build/lib')
-rw-r--r-- | src/test/java/com/google/devtools/build/lib/skyframe/ParallelBuilderTest.java | 20 | ||||
-rw-r--r-- | src/test/java/com/google/devtools/build/lib/skyframe/TimestampBuilderTestCase.java | 18 |
2 files changed, 28 insertions, 10 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/skyframe/ParallelBuilderTest.java b/src/test/java/com/google/devtools/build/lib/skyframe/ParallelBuilderTest.java index 75dcc14d21..76667a3ac0 100644 --- a/src/test/java/com/google/devtools/build/lib/skyframe/ParallelBuilderTest.java +++ b/src/test/java/com/google/devtools/build/lib/skyframe/ParallelBuilderTest.java @@ -775,12 +775,12 @@ public class ParallelBuilderTest extends TimestampBuilderTestCase { buildArtifacts(baz); // Check that the percentages increase non-linearly, because foo has 10 input files List<String> expectedMessages = Lists.newArrayList( - "Test foo START", - "Test foo FINISH", - "Test bar START", - "Test bar FINISH", - "Test baz START", - "Test baz FINISH"); + " Test foo START", + " Test foo FINISH", + " Test bar START", + " Test bar FINISH", + " Test baz START", + " Test baz FINISH"); assertThat(messages).containsAllIn(expectedMessages); // Now do an incremental rebuild of bar and baz, @@ -792,10 +792,10 @@ public class ParallelBuilderTest extends TimestampBuilderTestCase { // (in-memory) file system, rather than using cached entries. buildArtifacts(baz); expectedMessages = Lists.newArrayList( - "Test bar START", - "Test bar FINISH", - "Test baz START", - "Test baz FINISH"); + " Test bar START", + " Test bar FINISH", + " Test baz START", + " Test baz FINISH"); assertThat(messages).containsAllIn(expectedMessages); } } diff --git a/src/test/java/com/google/devtools/build/lib/skyframe/TimestampBuilderTestCase.java b/src/test/java/com/google/devtools/build/lib/skyframe/TimestampBuilderTestCase.java index 46932ea7cb..2ca64ea0c3 100644 --- a/src/test/java/com/google/devtools/build/lib/skyframe/TimestampBuilderTestCase.java +++ b/src/test/java/com/google/devtools/build/lib/skyframe/TimestampBuilderTestCase.java @@ -53,6 +53,8 @@ import com.google.devtools.build.lib.pkgcache.PathPackageLocator; import com.google.devtools.build.lib.skyframe.ExternalFilesHelper.ExternalFileAction; import com.google.devtools.build.lib.skyframe.PackageLookupFunction.CrossRepositoryLabelViolationStrategy; import com.google.devtools.build.lib.skyframe.PackageLookupValue.BuildFileName; +import com.google.devtools.build.lib.skyframe.SkyframeActionExecutor.ActionCompletedReceiver; +import com.google.devtools.build.lib.skyframe.SkyframeActionExecutor.ProgressSupplier; import com.google.devtools.build.lib.testutil.FoundationTestCase; import com.google.devtools.build.lib.testutil.TestConstants; import com.google.devtools.build.lib.testutil.TestRuleClassProvider; @@ -242,6 +244,8 @@ public abstract class TimestampBuilderTestCase extends FoundationTestCase { false, new ActionCacheChecker(actionCache, null, ALWAYS_EXECUTE_FILTER, null), null); + skyframeActionExecutor.setActionExecutionProgressReportingObjects( + EMPTY_PROGRESS_SUPPLIER, EMPTY_COMPLETION_RECEIVER); List<SkyKey> keys = new ArrayList<>(); for (Artifact artifact : artifacts) { @@ -461,4 +465,18 @@ public abstract class TimestampBuilderTestCase extends FoundationTestCase { return actionTemplateExpansionFunction.extractTag(skyKey); } } + + private static final ProgressSupplier EMPTY_PROGRESS_SUPPLIER = + new ProgressSupplier() { + @Override + public String getProgressString() { + return ""; + } + }; + + private static final ActionCompletedReceiver EMPTY_COMPLETION_RECEIVER = + new ActionCompletedReceiver() { + @Override + public void actionCompleted(Action action) {} + }; } |