| <html devsite><head> |
| <title>使用 VTS 进行系统测试</title> |
| <meta name="project_path" value="/_project.yaml"/> |
| <meta name="book_path" value="/_book.yaml"/> |
| </head> |
| <body> |
| <!-- |
| Copyright 2017 The Android Open Source Project |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| |
| <p>供应商测试套件 (VTS) 会自动执行 HAL 和 OS 内核测试。要使用 VTS 测试 Android 原生系统的实现情况,请设置一个测试环境,然后使用 VTS 计划测试相应补丁。</p> |
| |
| <h2 id="establish">建立测试环境</h2> |
| <p>要设置测试环境,请按以下步骤操作:</p> |
| <ol> |
| <li>安装 Python 开发工具包: |
| <pre class="devsite-terminal devsite-click-to-copy"> |
| sudo apt-get install python-dev |
| </pre> |
| </li> |
| <li>安装协议缓冲区工具(适用于 Python): |
| <pre class="devsite-click-to-copy"> |
| <code class="devsite-terminal">sudo apt-get install python-protobuf</code> |
| <code class="devsite-terminal">sudo apt-get install protobuf-compiler</code> |
| </pre> |
| </li> |
| <li>安装 Python 虚拟环境相关工具: |
| <pre class="devsite-click-to-copy"> |
| <code class="devsite-terminal">sudo apt-get install python-virtualenv</code> |
| <code class="devsite-terminal">sudo apt-get install python-pip</code> |
| </pre> |
| </li> |
| </ol> |
| |
| <h2 id="test">测试补丁</h2> |
| <p>要测试补丁,请按以下步骤操作:</p> |
| <ol> |
| <li>构建 VTS 主机端软件包: |
| <pre class="devsite-click-to-copy"> |
| <code class="devsite-terminal">. build/envsetup.sh</code> |
| <code class="devsite-terminal">lunch aosp_arm64-userdebug</code> |
| <code class="devsite-terminal">make vts -j</code> |
| </pre> |
| </li> |
| <li>运行默认的 VTS 测试: |
| <pre class="devsite-click-to-copy"> |
| <code class="devsite-terminal">vts-tradefed</code> |
| tf> run vts // where vts is the test plan name |
| </pre> |
| </li> |
| </ol> |
| |
| <h2 id="plans">VTS 计划</h2> |
| <p>可用的 VTS 测试计划包括:</p> |
| |
| <table> |
| <thead> |
| <tr> |
| <th>命令</th> |
| <th>说明</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td>> run vts</td> |
| <td>适用于默认的 VTS 测试</td> |
| </tr> |
| <tr> |
| <td>> run vts-hal</td> |
| <td>适用于默认的 VTS HAL(硬件抽象层)测试</td> |
| </tr> |
| <tr> |
| <td>> run vts-kernel</td> |
| <td>适用于默认的 VTS 内核测试</td> |
| </tr> |
| </tbody> |
| </table> |
| |
| <p>要查看所有计划的列表,请参阅 <code><a href="https://android.googlesource.com/platform/test/vts/+/master/tools/vts-tradefed/res/config/plans.md">/test/vts/tools/vts-tradefed/res/config.md</a></code>。</p> |
| |
| <h2 id="support">支持</h2> |
| <p>您可以在 <code><a href=" https://android.googlesource.com/platform/test/vts/+/master/README.md">/test/vts/doc</a></code> 下查看用户手册。有关 VTS 的问题,请加入 <a href="https://groups.google.com/forum/#!forum/android-vts">[email protected]</a> 网上论坛。</p> |
| |
| </body></html> |