2025 年 3 月 27 日より、AOSP のビルドとコントリビューションには aosp-main
ではなく android-latest-release
を使用することをおすすめします。詳細については、AOSP の変更をご覧ください。
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
GTest
public
class
GTest
extends GTestBase
implements
IDeviceTest
指定のデバイスでネイティブ テスト パッケージを実行するテスト。
概要
保護されたメソッド |
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)
フィルタ取得メソッドを定義します。
|
boolean
|
shouldRunFile(String fullPath)
特定のファイルを実行する必要があるかどうかを判断するヘルパー メソッド。
|
パブリック コンストラクタ
パブリック メソッド
getDevice
public ITestDevice getDevice ()
テスト対象デバイスを入手します。
isRebootBeforeTestEnabled
public boolean isRebootBeforeTestEnabled ()
setDevice
public void setDevice (ITestDevice device)
テスト対象デバイスを挿入します。
setNativeTestDevicePath
public void setNativeTestDevicePath (String path)
保護されたメソッド
createFlagFile
protected String createFlagFile (String filter)
--gtest_flagfile で使用されるフィルタを含むファイルを作成して、引数のサイズに関する OS の制限を回避します。
パラメータ |
filter |
String : フィルタ文字列 |
戻り値 |
String |
フィルタを含むファイルのパス。 |
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)
取得フィルタ メソッドを定義します。
サブクラスは、独自のフィルタを取得する方法を実装する必要があります。
パラメータ |
binaryOnDevice |
String : フィルタ ファイルのフルパス。 |
shouldRunFile
protected boolean shouldRunFile (String fullPath)
特定のファイルを実行するかどうかを判断するヘルパー メソッド。
パラメータ |
fullPath |
String : 問題のファイルのフルパス |
戻り値 |
boolean |
該当するファイルを実行する場合は true。 |
このページのコンテンツやコードサンプルは、コンテンツ ライセンスに記載のライセンスに従います。Java および OpenJDK は Oracle および関連会社の商標または登録商標です。
最終更新日 2025-03-26 UTC。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-03-26 UTC。"],[],[]]