Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
tp-qemu
提交
68726c43
T
tp-qemu
项目概览
openeuler
/
tp-qemu
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
tp-qemu
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
68726c43
编写于
7月 27, 2020
作者:
Q
Qianqian Zhu
提交者:
GitHub
7月 27, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #2313 from leidwang/uefi_check_gui_config
new case : Verify UEFI config setting in the GUI screen
上级
ae682c67
eadc35f0
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
91 addition
and
0 deletion
+91
-0
qemu/tests/cfg/uefi_check_resolution.cfg
qemu/tests/cfg/uefi_check_resolution.cfg
+17
-0
qemu/tests/uefi_check_resolution.py
qemu/tests/uefi_check_resolution.py
+74
-0
未找到文件。
qemu/tests/cfg/uefi_check_resolution.cfg
0 → 100644
浏览文件 @
68726c43
- uefi_check_resolution:
only q35
only ovmf
type = uefi_check_resolution
timeout = 360
boot_menu = on
enable_sga = yes
boot_menu_hint = "Boot Options"
enter_change_preferred = "esc;down;kp_enter;down;down;down;down;kp_enter"
default_resolution_key = "f9;y"
variants:
- save_with_f10:
esc_boot_menu_key = "esc;esc;down;down;down;kp_enter"
save_change = "f10;y"
- save_with_commit:
esc_boot_menu_key = "esc;down;down;down;kp_enter"
save_change = "down;kp_enter"
qemu/tests/uefi_check_resolution.py
0 → 100644
浏览文件 @
68726c43
import
re
import
random
from
virttest
import
utils_misc
from
virttest
import
error_context
@
error_context
.
context_aware
def
run
(
test
,
params
,
env
):
"""
Verify UEFI config setting in the GUI screen:
1) Boot up a guest.
2) Set default resolution
3) Change resolution to $re1
4) Save it by hitting 'F10' + 'Y' or 'Commit Changes and Exit'
5) Exit setup interface
6) Check if resolution had been change to $re1
:param test: QEMU test object
:param params: Dictionary with the test parameters
:param env: Dictionary with test environment.
"""
change_prefered
=
[
"640 x 480"
,
"800 x 480"
,
"800 x 600"
,
"832 x 624"
,
"960 x 640"
,
"1024 x 600"
,
"1024 x 768"
,
"1152 x 864"
,
"1152 x 870"
,
"1280 x 720"
,
"1280 x 760"
,
"1280 x 768"
,
"1280 x 800"
,
"1280 x 960"
,
"1280 x 1024"
,
"1360 x 768"
,
"1366 x 768"
,
"1400 x 1050"
,
"1440 x 900"
,
"1600 x 900"
,
"1600 x 1200"
,
"1680 x 1050"
,
"1920 x 1080"
,
"1920 x 1200"
,
"1920 x 1440"
,
"2000 x 2000"
,
"2048 x 1536"
,
"2048 x 2048"
,
"2560 x 1440"
,
"2560 x 1600"
]
def
boot_check
(
info
):
"""
boot info check
"""
logs
=
vm
.
logsessions
[
'seabios'
].
get_output
()
result
=
re
.
search
(
info
,
logs
,
re
.
S
)
return
result
def
choose_resolution
():
"""
choose resolution randomly
"""
n
=
random
.
randint
(
0
,
29
)
change_resolution_key
=
[
"kp_enter"
]
+
[
"down"
]
*
n
+
[
"kp_enter"
]
resolution
=
change_prefered
[
n
]
check_info
=
"GraphicsConsole video resolution "
+
resolution
return
change_resolution_key
,
check_info
,
resolution
timeout
=
int
(
params
.
get
(
"timeout"
,
360
))
vm
=
env
.
get_vm
(
params
[
"main_vm"
])
vm
.
verify_alive
()
boot_menu_hint
=
params
[
"boot_menu_hint"
]
enter_change_preferred
=
params
[
"enter_change_preferred"
].
split
(
";"
)
default_resolution_key
=
params
[
"default_resolution_key"
].
split
(
";"
)
save_change_key
=
params
[
"save_change"
].
split
(
";"
)
esc_boot_menu_key
=
params
[
"esc_boot_menu_key"
].
split
(
";"
)
change_resolution_key
,
check_info
,
resolution
=
choose_resolution
()
if
not
utils_misc
.
wait_for
(
lambda
:
boot_check
(
boot_menu_hint
),
timeout
,
1
):
test
.
fail
(
"Could not get boot menu message"
)
key
=
[]
key
+=
enter_change_preferred
key
+=
default_resolution_key
key
+=
change_resolution_key
key
+=
save_change_key
key
+=
esc_boot_menu_key
list
(
map
(
vm
.
send_key
,
key
))
vm
.
reboot
()
if
not
boot_check
(
check_info
):
test
.
fail
(
"Change to resolution {'%s'} fail"
%
resolution
)
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录