| <html devsite><head> |
| <title>与 Android CTS 集成</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>Android CTS 发布包(可从 <a href="/compatibility/cts/downloads.html">Android 兼容性下载</a>中获得)包括 deqp 测试,其中一个测试子集(称为 <code>mustpass</code> 列表)要求必须通过。对于不支持目标 API 或扩展程序的设备,将跳过测试并报告为已通过。</p> |
| |
| <p><code>mustpass</code> 列表包括 OpenGL ES 3.0、OpenGL ES 3.1、OpenGL ES 3.2 和 Android Extension Pack 测试。<code>mustpass</code> 文件可以在 deqp 源代码树中的 <code>android/cts</code> 目录下找到。您可以使用以下命令通过 <code>cts-tradefed</code> 实用程序运行 deqp 测试:</p> |
| |
| <pre class="devsite-terminal devsite-click-to-copy"> |
| cts-tradefed run cts --plan CTS-DEQP |
| </pre> |
| |
| <h2 id="duplicating_runs_without_cts">在没有 CTS 的情况下复制运行</h2> |
| |
| <p>要复制 CTS 运行,请安装 CTS 包的 deqp APK 并使用以下命令:</p> |
| |
| <pre class="devsite-terminal devsite-click-to-copy"> |
| adb -d shell am start -n com.drawelements.deqp/android.app.NativeActivity -e \ |
| cmdLine "deqp --deqp-case=dEQP-GLES3.some_group.* --deqp-gl-config-name=rgba8888d24s8 --deqp-log-filename=/sdcard/dEQP-Log.qpa |
| </pre> |
| |
| <p>关键部分是 <code>--deqp-gl-config-name=rgba8888d24s8</code> 参数,它要求在具有 24 位深度缓冲区和 8 位模板缓冲区的 RGBA 8888 屏幕 Surface 上运行测试。请记得使用 <code>--deqp-case</code> 参数设置所需的测试。</p> |
| |
| <h2 id="mapping_of_the_cts_results">CTS 结果映射</h2> |
| |
| <p>在 Android CTS 中,测试用例最终呈现以下三种状态之一:通过、失败或未执行(deqp 会提供更多的结果代码)。CTS 会自动将 deqp 结果代码映射到 CTS 结果:</p> |
| <ul> |
| <li>CTS 通过可包括 <code>Pass</code>、<code>NotSupported</code>、<code>QualityWarning</code> 和 <code>CompatibilityWarning</code>。</li> |
| <li>CTS 失败可包括 <code>Fail</code>、<code>ResourceError</code>、<code>Crash</code>、<code>Timeout</code> 和 <code>InternalError</code>。</li> |
| </ul> |
| |
| </body></html> |