GTest
public
class
GTest
extends GTestBase
implements
IDeviceTest
| java.lang.Object | ||
| ↳ | com.android.tradefed.testtype.GTestBase | |
| ↳ | com.android.tradefed.testtype.GTest | |
指定のデバイスでネイティブ テスト パッケージを実行するテスト。
概要
パブリック コンストラクタ | |
|---|---|
GTest()
|
|
パブリック メソッド | |
|---|---|
ITestDevice
|
getDevice()
テスト対象デバイスを取得します。 |
boolean
|
isRebootBeforeTestEnabled()
|
void
|
run(TestInformation testInfo, ITestInvocationListener listener)
|
void
|
setDevice(ITestDevice device)
テスト対象デバイスを挿入します。 |
void
|
setNativeTestDevicePath(String path)
|
保護されたメソッド | |
|---|---|
String
|
createFlagFile(String filter)
--gtest_flagfile を介して使用されるフィルタを含むファイルを作成して、引数のサイズに関する OS の制限を回避します。 |
void
|
executeCommandByScript(ITestDevice testDevice, String cmd, IShellOutputReceiver resultParser)
コマンドが長すぎて adb で直接実行できない場合に、一時スクリプトから gtest コマンドを実行するヘルパー メソッド。 |
String
|
getGTestCmdLine(String fullPath, String flags)
実行する gtest コマンドをビルドするヘルパー メソッド。 |
String
|
loadFilter(String binaryOnDevice)
get フィルタ メソッドを定義します。 |
boolean
|
shouldRunFile(String fullPath)
指定されたファイルを実行すべきかどうかを判断するヘルパー メソッド。 |
パブリック コンストラクタ
GTest
public GTest ()
パブリック メソッド
isRebootBeforeTestEnabled
public boolean isRebootBeforeTestEnabled ()
| 戻り値 | |
|---|---|
boolean |
|
ホームラン
public void run (TestInformation testInfo, ITestInvocationListener listener)
| パラメータ | |
|---|---|
testInfo |
TestInformation |
listener |
ITestInvocationListener |
| 例外 | |
|---|---|
DeviceNotAvailableException |
|
setDevice
public void setDevice (ITestDevice device)
テスト対象デバイスを挿入します。
| パラメータ | |
|---|---|
device |
ITestDevice: 使用する ITestDevice |
setNativeTestDevicePath
public void setNativeTestDevicePath (String path)
| パラメータ | |
|---|---|
path |
String |
保護されたメソッド
createFlagFile
protected String createFlagFile (String filter)
--gtest_flagfile で使用されるフィルタを含むファイルを作成して、引数のサイズに関する OS の制限を回避します。
| パラメータ | |
|---|---|
filter |
String: フィルタ文字列 |
| 戻り値 | |
|---|---|
String |
フィルタを含むファイルへのパス。 |
| 例外 | |
|---|---|
DeviceNotAvailableException |
|
executeCommandByScript
protected void executeCommandByScript (ITestDevice testDevice, String cmd, IShellOutputReceiver resultParser)
コマンドが長すぎて adb で直接実行できない場合に、一時スクリプトから gtest コマンドを実行するヘルパー メソッド。
| パラメータ | |
|---|---|
testDevice |
ITestDevice: コマンドを実行するデバイス |
cmd |
String: 実行するコマンド文字列 |
resultParser |
IShellOutputReceiver: テスト結果を読み取るための出力レシーバ |
| 例外 | |
|---|---|
DeviceNotAvailableException |
|
getGTestCmdLine
protected String getGTestCmdLine (String fullPath,
String flags)実行する gtest コマンドをビルドするヘルパー メソッド。
| パラメータ | |
|---|---|
fullPath |
String: デバイス上の gtest バイナリの絶対ファイル システム パス |
flags |
String: gtest 実行フラグ |
| 戻り値 | |
|---|---|
String |
gtest で実行するシェル コマンドライン |
loadFilter
protected String loadFilter (String binaryOnDevice)
get フィルタ メソッドを定義します。
サブクラスは、独自のフィルタを取得する方法を実装する必要があります。
| パラメータ | |
|---|---|
binaryOnDevice |
String: フィルタ ファイルのフルパス。 |
| 戻り値 | |
|---|---|
String |
フィルタ文字列。 |
| 例外 | |
|---|---|
DeviceNotAvailableException |
|
shouldRunFile
protected boolean shouldRunFile (String fullPath)
指定されたファイルを実行すべきかどうかを判断するヘルパー メソッド。
| パラメータ | |
|---|---|
fullPath |
String: 問題のファイルのフルパス |
| 戻り値 | |
|---|---|
boolean |
上記のファイルを実行する場合は true。 |