Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
tp-qemu
提交
a0ce8329
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,发现更多精彩内容 >>
未验证
提交
a0ce8329
编写于
11月 06, 2018
作者:
Q
Qianqian Zhu
提交者:
GitHub
11月 06, 2018
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1481 from ybduan/seabios_bin
seabios.bin_file: Add new case for seabios
上级
b031f799
12b994b7
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
88 addition
and
23 deletion
+88
-23
qemu/tests/cfg/seabios.cfg
qemu/tests/cfg/seabios.cfg
+28
-23
qemu/tests/seabios_bin.py
qemu/tests/seabios_bin.py
+60
-0
未找到文件。
qemu/tests/cfg/seabios.cfg
浏览文件 @
a0ce8329
- seabios: install setup image_copy unattended_install.cdrom
no Host_RHEL.m5
start_vm = no
variants:
- basic:
only i386, x86_64
type = seabios
start_vm = no
restart_vm = no
kill_vm = yes
boot_menu = on
...
...
@@ -24,3 +26,6 @@
sgabios_info += "Serial Graphics Adapter .*\s"
sgabios_info += "SGABIOS \$Id: sgabios.S .*\s"
sgabios_info += "\d \d\s"
- bin_file:
type = seabios_bin
machine_type_remove = "Supported none pc q35"
qemu/tests/seabios_bin.py
0 → 100644
浏览文件 @
a0ce8329
import
logging
from
virttest
import
error_context
from
virttest
import
env_process
from
virttest
import
utils_misc
from
avocado.utils
import
process
@
error_context
.
context_aware
def
run
(
test
,
params
,
env
):
"""
KVM Seabios bin file test:
1) Get available bin files
2) Get supported machine types
3) Check bin file in use
:param test: QEMU test object
:param params: Dictionary with the test parameters
:param env: Dictionary with test environment.
"""
bin_dict
=
{
'rhel6'
:
'bios.bin'
,
'rhel7'
:
'bios-256k.bin'
}
error_context
.
context
(
"Get available bin files"
,
logging
.
info
)
output
=
process
.
system_output
(
'ls /usr/share/seabios'
,
shell
=
True
).
decode
()
for
value
in
bin_dict
.
values
():
if
value
not
in
output
:
test
.
fail
(
"%s is not available"
%
value
)
error_context
.
context
(
"Get supported machine types"
,
logging
.
info
)
qemu_binary
=
utils_misc
.
get_qemu_binary
(
params
)
machine_type_cmd
=
qemu_binary
+
" -machine help | awk '{ print $1 }'"
output
=
process
.
system_output
(
machine_type_cmd
,
shell
=
True
).
decode
()
machine_types
=
output
.
splitlines
()
machine_type_remove
=
params
[
'machine_type_remove'
].
split
()
for
i
in
machine_type_remove
:
machine_types
.
remove
(
i
)
logging
.
info
(
machine_types
)
for
machine
in
machine_types
:
error_context
.
context
(
"Check bin file with machine type: %s"
%
machine
,
logging
.
info
)
for
key
in
bin_dict
:
if
key
in
machine
:
bin_file
=
bin_dict
[
key
]
break
else
:
test
.
error
(
"Uncertain which bin file in use for machine type: %s"
%
machine
)
params
[
'machine_type'
]
=
machine
params
[
'start_vm'
]
=
'yes'
env_process
.
preprocess_vm
(
test
,
params
,
env
,
params
.
get
(
"main_vm"
))
vm
=
env
.
get_vm
(
params
[
"main_vm"
])
info_roms
=
vm
.
monitor
.
info
(
"roms"
)
if
bin_file
not
in
info_roms
:
test
.
fail
(
"Checking bin file fails with %s, info roms: %s"
%
(
machine
,
info_roms
))
vm
.
destroy
()
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录