use of com.google.devtools.build.lib.util.io.AnsiTerminalPrinter in project bazel by bazelbuild.
the class TestSummaryTest method testFlakyAttempts.
@Test
public void testFlakyAttempts() throws Exception {
String expectedString = ANY_STRING + "WARNING" + ANY_STRING + BlazeTestStatus.FLAKY + ANY_STRING + ", failed in 2 out of 3";
AnsiTerminalPrinter terminalPrinter = Mockito.mock(AnsiTerminalPrinter.class);
TestSummary summary = basicBuilder.setStatus(BlazeTestStatus.FLAKY).addPassedLogs(getPathList("/a")).addFailedLogs(getPathList("/b", "/c")).build();
TestSummaryPrinter.print(summary, terminalPrinter, true, false);
terminalPrinter.print(find(expectedString));
}
use of com.google.devtools.build.lib.util.io.AnsiTerminalPrinter in project bazel by bazelbuild.
the class TestSummaryTest method testPartialCachedStatus.
@Test
public void testPartialCachedStatus() throws Exception {
String expectedString = ANY_STRING + "\\(3/4 cached" + ANY_STRING;
AnsiTerminalPrinter terminalPrinter = Mockito.mock(AnsiTerminalPrinter.class);
TestSummary summary = createTestSummary(stubTarget, BlazeTestStatus.PASSED, CACHED - 1);
TestSummaryPrinter.print(summary, terminalPrinter, true, false);
terminalPrinter.print(find(expectedString));
}
Aggregations