GTest
public class GTest
extends GTestBase
implements IDeviceTest
特定のデバイスでネイティブテストパッケージを実行するテスト。
概要
保護されたメソッド |
---|
void | executeCommandByScript ( ITestDevice testDevice, String cmd, IShellOutputReceiver resultParser) コマンドが長すぎてadbで直接実行できない場合に、一時スクリプトからgtestコマンドを実行するヘルパーメソッド。 |
String | getGTestCmdLine (String fullPath, String flags) 実行するgtestコマンドを作成するためのヘルパーメソッド。 |
String | loadFilter (String binaryOnDevice) getfilterメソッドを定義します。 |
boolean | shouldSkipFile (String fullPath) 特定のファイルの実行をスキップする必要があるかどうかを判断するためのヘルパーメソッド。 |
パブリックコンストラクター
パブリックメソッド
getDevice
public ITestDevice getDevice ()
テスト対象のデバイスを入手します。
setDevice
public void setDevice (ITestDevice device)
テスト対象のデバイスを注入します。
保護されたメソッド
executeCommandByScript
protected void executeCommandByScript (ITestDevice testDevice,
String cmd,
IShellOutputReceiver resultParser)
コマンドが長すぎてadbで直接実行できない場合に、一時スクリプトからgtestコマンドを実行するヘルパーメソッド。
パラメーター |
---|
testDevice | ITestDevice :コマンドを実行するデバイス |
cmd | String :実行するコマンド文字列 |
resultParser | IShellOutputReceiver :テスト結果を読み取るための出力レシーバー |
getGTestCmdLine
protected String getGTestCmdLine (String fullPath,
String flags)
実行するgtestコマンドを作成するためのヘルパーメソッド。
パラメーター |
---|
fullPath | String :デバイス上のgtestバイナリへの絶対ファイルシステムパス |
flags | String :gtest実行フラグ |
戻り値 |
---|
String | gtest用に実行するシェルコマンドライン |
loadFilter
protected String loadFilter (String binaryOnDevice)
getfilterメソッドを定義します。
サブクラスは、独自のフィルターを取得する方法を実装する必要があります。
パラメーター |
---|
binaryOnDevice | String :フィルターファイルのフルパス。 |
shouldSkipFile
protected boolean shouldSkipFile (String fullPath)
特定のファイルの実行をスキップする必要があるかどうかを判断するためのヘルパーメソッド。
パラメーター |
---|
fullPath | String :問題のファイルのフルパス |
戻り値 |
---|
boolean | 上記のファイルをスキップする必要がある場合はtrue。 |