public class KTapResultParser
extends 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.


Public constructors


Public methods

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

Public constructors


public KTapResultParser ()

Public methods


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

listener ITestInvocationListener

testRunName String

ktapFileContent String