KTapResultParser

public class KTapResultParser
extends Object

java.lang.Object
   ↳ com.android.tradefed.testtype.binary.KTapResultParser


Reads KTAP output as that produced by a KUnit test module and placed in a `results` file under debugfs.

This implementation is based off of the official documentation, kunit_parser.py and specific caveats found during testing. Additional logic needed:

  • Indentation is ignored because it's not consistent across usage.
  • Line starting with "# Subtest:" is required to properly nest into subtest groups. This approach was taken from kunit_parser.py.
  • Sometimes a "- " proceeds the test name and diagnostic data when a '#' isn't used. When it's encountered it's stripped off.
  • The test name can technically have any character besides '#'. This will probably become an issue when getting translated to TF test results. For now only post processing is to replace spaces with underscores.

Summary

Public constructors

KTapResultParser()

Public methods

static void applyKTapResultToListener(ITestInvocationListener listener, String testRunName, String ktapFileContent)

Public constructors

KTapResultParser

public KTapResultParser ()

Public methods

applyKTapResultToListener

public static void applyKTapResultToListener (ITestInvocationListener listener, 
                String testRunName, 
                String ktapFileContent)

Parameters
listener ITestInvocationListener

testRunName String

ktapFileContent String