RustTestResultParser

public class RustTestResultParser
extends MultiLineReceiver

java.lang.Object
   ↳ com.android.ddmlib.MultiLineReceiver
     ↳ com.android.tradefed.testtype.rust.RustTestResultParser


Interprets the output of tests run with Rust's unittest framework and translates it into calls on a series of ITestInvocationListeners.

Looks for the following output from Rust tests:

running 10 tests test LexError ... ok <0.001s> test idents ... FAILED <0.000s> test make_sure_no_proc_macro ... ignored test test_scalar_div_rem_zero ... ignored, Android sometimes uses panic_abort ... ---- tests::idents stdout ---- thread 'main' panicked at 'assertion failed: `(left == right)` ... test result: ok. 10 passed; 1 failed; 1 ignored; 0 measured; 0 filtered out @See https://doc.rust-lang.org/book/ch11-00-testing.html

Summary

Public constructors

RustTestResultParser( listeners, String runName)

Create a new RustTestResultParser that reports to the given ITestInvocationListeners.

Public methods

void done()

Send recorded test results to all listeners.

boolean isCancelled()
void processNewLines(String[] lines)

Process Rust unittest output.

Public constructors

RustTestResultParser

public RustTestResultParser ( listeners, 
                String runName)

Create a new RustTestResultParser that reports to the given ITestInvocationListeners.

Parameters
listeners : the test invocation listeners

runName String: the test name

Public methods

done

public void done ()

Send recorded test results to all listeners.

isCancelled

public boolean isCancelled ()

Returns
boolean

processNewLines

public void processNewLines (String[] lines)

Process Rust unittest output.

Parameters
lines String