InstallKernelModulePreparer

public class InstallKernelModulePreparer
extends BaseTargetPreparer implements ILabPreparer

java.lang.Object
   ↳ com.android.tradefed.targetprep.BaseTargetPreparer
     ↳ com.android.tradefed.targetprep.InstallKernelModulePreparer


A target preparer that flash the device with android common kernel generic image. Please see https://source.android.com/devices/architecture/kernel/android-common for details.

Summary

Public constructors

InstallKernelModulePreparer()

Public methods

void setUp(TestInformation testInfo)

Perform the target setup for testing.

void tearDown(TestInformation testInfo, Throwable e)

Perform the target cleanup/teardown after testing.

Protected methods

String[] getDependentModules(String modName, String lsmodOutput)
String getDisplayedModuleName(String fullPath)

Return module name as it's displayed after loading.

Public constructors

InstallKernelModulePreparer

public InstallKernelModulePreparer ()

Public methods

setUp

public void setUp (TestInformation testInfo)

Perform the target setup for testing.

Parameters
testInfo TestInformation: The TestInformation of the invocation.

Throws
BuildError
DeviceNotAvailableException
TargetSetupError

tearDown

public void tearDown (TestInformation testInfo, 
                Throwable e)

Perform the target cleanup/teardown after testing.

Parameters
testInfo TestInformation: The TestInformation of the invocation.

e Throwable: if the invocation ended with an exception, this will be the exception that was caught at the Invocation level. Otherwise, will be null.

Throws
DeviceNotAvailableException

Protected methods

getDependentModules

protected String[] getDependentModules (String modName, 
                String lsmodOutput)

Parameters
modName String

lsmodOutput String

Returns
String[]

getDisplayedModuleName

protected String getDisplayedModuleName (String fullPath)

Return module name as it's displayed after loading.

For example, see the difference between the file name and that returned by `lsmod`:

$ insmod kunit.ko
 $ lsmod | grep kunit
 kunit 20480 0
 

Parameters
fullPath String

Returns
String