use of com.google.devtools.build.lib.rules.test.TestResult in project bazel by bazelbuild.
the class TestResultAnalyzerTest method testIncrementalAnalyzeSetsActionRanTrueWhenThereAreNonCachedResults.
@Test
public void testIncrementalAnalyzeSetsActionRanTrueWhenThereAreNonCachedResults() {
TestSummary.Builder summaryBuilder = makeTestSummaryBuilder();
assertFalse(summaryBuilder.peek().actionRan());
TestResultData testResultData = TestResultData.newBuilder().setRemotelyCached(false).build();
TestResult result = new TestResult(mock(TestRunnerAction.class), testResultData, /*cached=*/
false);
TestSummary.Builder newSummaryBuilder = underTest.incrementalAnalyze(summaryBuilder, result);
assertTrue(newSummaryBuilder.peek().actionRan());
}
use of com.google.devtools.build.lib.rules.test.TestResult in project bazel by bazelbuild.
the class TestResultAnalyzerTest method testIncrementalAnalyzeSetsActionRanFalseForLocallyCachedTests.
@Test
public void testIncrementalAnalyzeSetsActionRanFalseForLocallyCachedTests() {
TestSummary.Builder summaryBuilder = makeTestSummaryBuilder();
assertFalse(summaryBuilder.peek().actionRan());
TestResultData testResultData = TestResultData.newBuilder().setRemotelyCached(false).build();
TestResult result = new TestResult(mock(TestRunnerAction.class), testResultData, /*cached=*/
true);
TestSummary.Builder newSummaryBuilder = underTest.incrementalAnalyze(summaryBuilder, result);
assertFalse(newSummaryBuilder.peek().actionRan());
}
Aggregations