SemaphoreTokenTargetPreparer
public
class
SemaphoreTokenTargetPreparer
extends BaseTargetPreparer
implements
ITargetCleaner
This is a preparer used to use token to serialize test excution in tradefed host. only the device
acquire token will be allow to start the test. Others will wait until it released This can't be
only used when you have one test in tradefed and use shared resources. Please make sure only a
single test running on the host with different DUTs User need to add --semaphore-token:no-disable
in the command file.
Summary
Public constructors
SemaphoreTokenTargetPreparer
public SemaphoreTokenTargetPreparer ()
Public methods
setUp
public void setUp (ITestDevice device,
IBuildInfo buildInfo)
Perform the target setup for testing.
Parameters |
device |
ITestDevice : the ITestDevice to prepare. |
buildInfo |
IBuildInfo : data about the build under test. |
tearDown
public void tearDown (ITestDevice device,
IBuildInfo buildInfo,
Throwable e)
Perform the target cleanup/teardown after testing.
Parameters |
device |
ITestDevice : the ITestDevice to prepare. |
buildInfo |
IBuildInfo : data about the build under test. |
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 . |