Search in sources :

Example 1 with AggregatingTestListener

use of com.google.devtools.build.lib.runtime.AggregatingTestListener in project bazel by bazelbuild.

the class TestCommand method exec.

@Override
public ExitCode exec(CommandEnvironment env, OptionsProvider options) {
    TestResultAnalyzer resultAnalyzer = new TestResultAnalyzer(env.getDirectories().getExecRoot(), options.getOptions(TestSummaryOptions.class), options.getOptions(ExecutionOptions.class), env.getEventBus());
    printer = new AnsiTerminalPrinter(env.getReporter().getOutErr().getOutputStream(), options.getOptions(BlazeCommandEventHandler.Options.class).useColor());
    // Initialize test handler.
    AggregatingTestListener testListener = new AggregatingTestListener(resultAnalyzer, env.getEventBus(), env.getReporter());
    env.getEventBus().register(testListener);
    return doTest(env, options, testListener);
}
Also used : TestSummaryOptions(com.google.devtools.build.lib.runtime.TerminalTestResultNotifier.TestSummaryOptions) ExecutionOptions(com.google.devtools.build.lib.exec.ExecutionOptions) ExecutionOptions(com.google.devtools.build.lib.exec.ExecutionOptions) AggregatingTestListener(com.google.devtools.build.lib.runtime.AggregatingTestListener) TestSummaryOptions(com.google.devtools.build.lib.runtime.TerminalTestResultNotifier.TestSummaryOptions) AnsiTerminalPrinter(com.google.devtools.build.lib.util.io.AnsiTerminalPrinter) TestResultAnalyzer(com.google.devtools.build.lib.runtime.TestResultAnalyzer)

Aggregations

ExecutionOptions (com.google.devtools.build.lib.exec.ExecutionOptions)1 AggregatingTestListener (com.google.devtools.build.lib.runtime.AggregatingTestListener)1 TestSummaryOptions (com.google.devtools.build.lib.runtime.TerminalTestResultNotifier.TestSummaryOptions)1 TestResultAnalyzer (com.google.devtools.build.lib.runtime.TestResultAnalyzer)1 AnsiTerminalPrinter (com.google.devtools.build.lib.util.io.AnsiTerminalPrinter)1