提交 b1acfaaf 编写于 作者: A Andrea Bolognani

tests: Fix qemucapsfixreplies

Since e6be5245 we include the executed command along
with the reply in *.replies files, which breaks the
renumbering logic implemented in qemucapsfixreplies.

Adapt the script so that it works with the new format.
Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
上级 9486ed90
......@@ -8,7 +8,7 @@ if [ "$#" -ne 1 ] || [ "$1" = "--help" ] || [ ! -f "$1" ]; then
fi
awk -i inplace \
'BEGIN {count=1; pattern="libvirt-[0-9]+"}
'BEGIN {last=0; pattern="libvirt-[0-9]+"}
{
if (match($0, "libvirt-1[^0-9]")) {
count=1;
......@@ -16,7 +16,11 @@ awk -i inplace \
if (match($0, pattern)) {
str="libvirt-" count;
sub(pattern, str, $0);
count++;
if (last != count) {
last=count;
} else {
count++;
}
}
print
}' "$1"
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册