2025 年 3 月 27 日より、AOSP のビルドとコントリビューションには aosp-main
ではなく android-latest-release
を使用することをおすすめします。詳細については、AOSP の変更をご覧ください。
再試行の分離
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
再試行機能の仕組みについては、テストの自動再試行のドキュメントをご覧ください。
再試行を行うと、デバイスが異常な状態になり、テストを成功させることができなくなる場合があります。分離機能を使用すると、デバイスをフレッシュな初期状態に戻し、テストを実行して成功させることができます。
機能を有効にする
再試行の分離機能を有効にするには、再試行オプションに加えて次のオプションを使用します。
--retry-isolation-grade <FULLY_ISOLATED|REBOOT_ISOLATED>
無効にするには、次のオプションを使用します。
--retry-isolation-grade NOT_ISOLATED
この機能はデフォルトでは無効になっています。
さまざまな等級の分離
分離等級は、再試行と再試行の間に構成する分離の程度を表します。
- FULLY_ISOLATED は、構成の構成済み target_preparers を再実行することにより、デバイスを完全にワイプしてリセットします。
- REBOOT_ISOLATED は、デバイスを再起動します。
互換性テストスイート(CTS)に関する注意事項
現在、Android パートナーの CTS 実行では FULLY_ISOLATED はサポートされていません。
結果の表示
結果レポーターは、特定のモジュールまたは実行が分離されて実行されているマーカーを受け取ります。また、レポートにマーカーを表示するかどうかを選択できます。
- モジュール レベルでは、
module-isolated
プロパティが分離等級に設定されます。
- 実行レベルでは、
run-isolated
プロパティが分離等級に設定されます。
たとえば、分離後に最初に実行されるモジュールは module-isolated:FULLY_ISOLATED
として報告されます。
分離されたテスト実行は、強いシグナルを提供します。テストが合格か不合格かにかかわらず、テストオーナーは以前のテストによって生じた異常な状態がデバイスに残っていないと確信できます。
このページのコンテンツやコードサンプルは、コンテンツ ライセンスに記載のライセンスに従います。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。"],[],[],null,["# Retry isolation\n\nSee the [Automatic Test Retry documentation](/docs/core/tests/tradefed/testing/through-tf/auto-retry)\nto understand how the retry feature works.\n\nWhen executing retries, if the device has entered into a bad state\nthat does not allow tests to succeed anymore. Use the isolation\nfeature restore the device into a fresh initial\nstate and allow tests to run and succeed.\n\nEnable the feature\n------------------\n\nThe retry isolation can be enabled with the follow options in addition to the\nretry options: \n\n --retry-isolation-grade \u003cFULLY_ISOLATED|REBOOT_ISOLATED\u003e\n\nor disabled with: \n\n --retry-isolation-grade NOT_ISOLATED\n\nThe feature is disabled by default.\n\n### Different grade of isolation\n\nThe isolation grade represents the extent of the isolation we want to configure\nbetween retries:\n\n- FULLY_ISOLATED will completely wipe \\& resetup the device by rerunning the configured target_preparers of the configuration\n- REBOOT_ISOLATED will reboot the device\n\n### Note on Compatibility Test Suite (CTS)\n\nAndroid partner runs of CTS currently do not support FULLY_ISOLATED\n\nWhat do the results look like?\n------------------------------\n\nResult reporters receive a marker that a given module or run was running in\nisolation and can elect to display the marker in their report.\n\n- At the module level the `module-isolated` property will be set to its isolation grade.\n- At the run level the `run-isolated` property will be set to its isolation grade.\n\nFor example: the first module running after being isolated will be reported as\n`module-isolated:FULLY_ISOLATED`.\n\nA test run in isolation provides a strong signal. Be it pass or fail, the\ntest owner should have high confidence that no bad state from a previous\ntest was left on the device."]]