Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
tp-qemu
提交
a2a19c40
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,发现更多精彩内容 >>
未验证
提交
a2a19c40
编写于
6月 16, 2020
作者:
Y
Yanan Fu
提交者:
GitHub
6月 16, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #2275 from xiagao/bz1846192-brew
qemu_guest_agent: fix bug of qga pkg installation
上级
8091d50b
b0f9e737
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
40 addition
and
8 deletion
+40
-8
qemu/tests/qemu_guest_agent.py
qemu/tests/qemu_guest_agent.py
+40
-8
未找到文件。
qemu/tests/qemu_guest_agent.py
浏览文件 @
a2a19c40
...
...
@@ -155,6 +155,29 @@ class QemuGuestAgentTest(BaseVirtTest):
get latest qemu-guest-agent rpm package url.
:return: rpm pkg list
"""
def
get_mdl_tag_build_status
(
get_mdl_tag_cmd
):
"""
Get module tag and qemu-kvm build status.
"""
logging
.
info
(
"Get the needed module tag."
)
mdl_tag
=
process
.
system_output
(
get_mdl_tag_cmd
,
shell
=
True
,
timeout
=
query_timeout
).
strip
().
split
()[
0
].
decode
()
logging
.
info
(
"Check qemu-kvm build is ready or not"
)
get_qemu_name_cmd
=
"brew list-tagged %s"
%
mdl_tag
get_qemu_name_cmd
+=
" | grep qemu-kvm"
qemu_bild_name
=
process
.
system_output
(
get_qemu_name_cmd
,
shell
=
True
,
timeout
=
query_timeout
).
strip
().
split
()[
0
].
decode
()
get_build_ready_cmd
=
"brew buildinfo %s | grep State"
%
qemu_bild_name
output
=
process
.
system_output
(
get_build_ready_cmd
,
shell
=
True
,
timeout
=
query_timeout
).
strip
().
decode
()
return
mdl_tag
,
"COMPLETE"
in
output
virt_module_stream
=
self
.
params
.
get
(
"virt_module_stream"
,
""
)
guest_name
=
self
.
params
.
get
(
"guest_name"
)
arch
=
self
.
params
[
"vm_arch_name"
]
...
...
@@ -168,7 +191,7 @@ class QemuGuestAgentTest(BaseVirtTest):
except
avo_path
.
CmdNotFoundError
as
detail
:
raise
TestCancel
(
str
(
detail
))
error_context
.
context
(
"Get
latest virt module ta
g of %s"
error_context
.
context
(
"Get
the latest qemu-guest-agent pk
g of %s"
" stream."
%
virt_module_stream
,
logging
.
info
)
# target release,such as 810,811
...
...
@@ -184,14 +207,23 @@ class QemuGuestAgentTest(BaseVirtTest):
tag_version
)
get_latest_mdl_tag_cmd
=
"brew list-targets |grep"
get_latest_mdl_tag_cmd
+=
" %s |sort -r |head -n 1"
%
platform_tag
latest_mdl_tag
=
process
.
system_output
(
get_latest_mdl_tag_cmd
,
shell
=
True
,
timeout
=
query_timeout
).
strip
().
split
()[
0
].
decode
()
error_context
.
context
(
"Get qemu-guest-agent rpm pkg url."
,
logging
.
info
)
mdl_tag
,
build_s
=
get_mdl_tag_build_status
(
get_latest_mdl_tag_cmd
)
if
not
build_s
:
logging
.
info
(
"The qemu-kvm build's status is not ready,"
" so we well check it in the previous virt module"
)
get_pre_mdl_tag_cmd
=
"brew list-targets |grep %s"
%
platform_tag
get_pre_mdl_tag_cmd
+=
" |sort -r |head -n 2 |tail -n 1"
mdl_tag
,
build_s
=
get_mdl_tag_build_status
(
get_pre_mdl_tag_cmd
)
if
not
build_s
:
self
.
test
.
error
(
"Please check why the recent two modules'"
" qemu-kvm build is not ready."
)
error_context
.
context
(
"Get qemu-guest-agent rpm pkg"
" url of %s."
%
mdl_tag
,
logging
.
info
)
get_brew_latest_pkg_cmd
=
"brew --quiet --topdir=%s"
%
download_root
get_brew_latest_pkg_cmd
+=
" list-tagged %s"
%
latest_
mdl_tag
get_brew_latest_pkg_cmd
+=
" list-tagged %s"
%
mdl_tag
get_brew_latest_pkg_cmd
+=
" --path --arch=%s"
%
arch
get_brew_latest_pkg_cmd
+=
" |grep qemu-guest-agent-[0-9]"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录