Weston test
weston_test
Weston 合成器的内部测试工具。
需要强调的是,这些工具绝不应在运行 Weston 测试之外使用。weston-test.so 模块绝不应被安装。
这些请求可能允许客户端执行非常危险的操作。
move_surface(surface: object<wl_surface>, x: int, y: int)
参数 | 类型 | 描述 |
|---|---|---|
| surface | object<wl_surface> | |
| x | int | |
| y | int |
activate_surface(surface: object<wl_surface>)
参数 | 类型 | 描述 |
|---|---|---|
| surface | object<wl_surface>允许为空 |
client_break(breakpoint: uint<weston_test.breakpoint>, resource_id: uint)
参数 | 类型 | 描述 |
|---|---|---|
| breakpoint | uint<weston_test.breakpoint> | event type to wait for |
| resource_id | uint | optional Wayland resource ID to filter for (type-specific) |
请求合成器在某处暂停执行。当执行暂停时,合成器将向客户端发出共享信号量。
breakpoint { post_repaint, post_latch }
参数 | 值 | 描述 |
|---|---|---|
| post_repaint | 0 | 输出重绘之后(过滤类型:wl_output) |
| post_latch | 1 | 输出锁存之后(过滤类型:wl_output) |
这是 Weston 内部测试的全局单例接口。
此接口允许测试客户端触发合成器端的测试过程。这对于实际测试在合成器插件中但也需要特定客户端存在的情况非常有用。
此接口由包含测试代码的合成器插件实现。
测试客户端使用 "run" 请求启动测试。在收到 "finished" 事件之前,不得发送另一个 "run" 请求。如果合成器端测试成功,则发送 "finished" 事件。如果合成器端测试失败,合成器应发送 "test_failed" 协议错误,但也可能以错误退出(例如 SEGV)。
未知的测试名称将引发 "unknown_test" 协议错误。
error { test_failed, unknown_test }
参数 | 值 | 描述 |
|---|---|---|
| test_failed | 0 | 合成器测试失败 |
| unknown_test | 1 | 无法识别的测试名称 |
合成器支持
Copyright
Copyright © 2012 Intel Corporation
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.