自 2025 年 3 月 27 日起,我们建议您使用 android-latest-release
而非 aosp-main
构建 AOSP 并为其做出贡献。如需了解详情,请参阅 AOSP 的变更。
与 Android CTS 集成
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
Android CTS 发布包(可从 Android 兼容性下载中获得)包括 Khronos 合规性测试,并且必须通过这些测试中的一部分测试(称为 mustpass
列表)。对于不支持目标 API 或扩展程序的设备,将跳过测试并报告为已通过。
mustpass
列表涵盖 OpenGL ES 2.0 到 OpenGL ES 3.2 以及 Vulkan 1.1。mustpass
文件可以在 Khronos 合规性测试的 android/cts
目录下找到。您可以使用以下命令,通过 cts-tradefed
实用程序运行这些测试:
cts-tradefed run cts --plan CTS-DEQP
在没有 CTS 的情况下复制运行
如需复制 CTS 运行,请安装 CTS 包的 deqp APK 并使用以下命令:
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
关键部分是 --deqp-gl-config-name=rgba8888d24s8
参数,它要求在具有 24 位深度缓冲区和 8 位模板缓冲区的 RGBA 8888 屏幕 Surface 上运行测试。请记得使用 --deqp-case
参数设置所需的测试。
CTS 结果映射
在 Android CTS 中,测试用例最终呈现以下三种状态之一:通过、失败或未执行(deqp 会提供更多的结果代码)。CTS 会自动将 Khronos 合规性测试结果代码映射到 CTS 结果:
- CTS 通过可包括
Pass
、NotSupported
、QualityWarning
和 CompatibilityWarning
。
- CTS 失败可包括
Fail
、ResourceError
、Crash
、Timeout
和 InternalError
。
本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-27。
[[["易于理解","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"]],["最后更新时间 (UTC):2025-07-27。"],[],[],null,["# Integrate with Android CTS\n\nAndroid CTS release packages (available from\n[Android Compatibility\nDownloads](/docs/compatibility/cts/downloads)) include [Khronos Conformance Tests](https://github.com/khronosgroup/vk-gl-cts) and require a subset of these\ntests (known as the `mustpass` list), to pass. For devices that do\nnot support a target API or extension, tests are skipped and reported as\npassing.\n\nThe `mustpass` list includes coverage for OpenGL ES 2.0 through\nOpenGL ES 3.2 and Vulkan 1.1. `mustpass`\nfiles can be found under the `android/cts` directory in the Khronos\nConformance Tests. You can run these tests through the `cts-tradefed`\nutility with the following command: \n\n```\ncts-tradefed run cts --plan CTS-DEQP\n```\n\nDuplicate runs without CTS\n--------------------------\n\nTo replicate the CTS run, install the deqp APK of the CTS package and use the\nfollowing command: \n\n```\nadb -d shell am start -n com.drawelements.deqp/android.app.NativeActivity -e \\\ncmdLine \"deqp --deqp-case=dEQP-GLES3.some_group.* --deqp-gl-config-name=rgba8888d24s8 --deqp-log-filename=/sdcard/dEQP-Log.qpa\n```\n\nThe important part is the `--deqp-gl-config-name=rgba8888d24s8`\nargument, which requests the tests be run on an RGBA 8888 on-screen surface\nwith a 24-bit depth buffer and an 8-bit stencil buffer. Remember to set\nthe desired tests using the `--deqp-case` argument.\n\nCTS results mapping\n-------------------\n\nIn the Android CTS, a test case can end up in one of three states: passed,\nfailed, or not executed (the deqp has more result codes available). CTS\nautomatically maps Khronos Conformance Test result codes to CTS results:\n\n- A CTS pass can include `Pass`, `NotSupported`, `QualityWarning`, and `CompatibilityWarning`.\n- A CTS failure can include `Fail`, `ResourceError`, `Crash`, `Timeout`, and `InternalError`."]]