clitest: Sanitize diff output some more

This commit is contained in:
Cole Robinson 2014-12-06 16:32:10 -05:00
parent cf0206a58c
commit 7b8e850bc0
8 changed files with 16 additions and 8 deletions

View File

@ -9,7 +9,7 @@
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
@@ -369,4 +364,5 @@
@@
<address type="isa" iobase="0x505"/>
</panic>
</devices>

View File

@ -21,7 +21,7 @@
<clock offset="utc">
<timer name="rtc" tickpolicy="catchup"/>
<timer name="pit" tickpolicy="delay"/>
@@ -369,4 +352,5 @@
@@
<address type="isa" iobase="0x505"/>
</panic>
</devices>

View File

@ -9,7 +9,7 @@
<feature policy="require" name="tm2"/>
<feature policy="require" name="est"/>
<feature policy="require" name="ss"/>
@@ -53,6 +53,7 @@
@@
<feature policy="require" name="ds_cpl"/>
<feature policy="require" name="xtpr"/>
<feature policy="require" name="acpi"/>

View File

@ -8,7 +8,7 @@
<blkiotune>
<weight>100</weight>
<device>
@@ -14,7 +14,6 @@
@@
</device>
</blkiotune>
<memoryBacking>

View File

@ -12,7 +12,7 @@
<memory unit="KiB">409600</memory>
<currentMemory unit="KiB">204800</currentMemory>
<blkiotune>
@@ -369,4 +369,5 @@
@@
<address type="isa" iobase="0x505"/>
</panic>
</devices>

View File

@ -6,7 +6,7 @@
<numatune>
<memory mode="interleave" placement="auto"/>
</numatune>
@@ -53,6 +53,7 @@
@@
<feature policy="require" name="ds_cpl"/>
<feature policy="require" name="xtpr"/>
<feature policy="require" name="acpi"/>

View File

@ -10,7 +10,7 @@
<disk type="dir" device="floppy">
<source dir="/tmp"/>
<target dev="fdb" bus="fdc"/>
@@ -92,12 +86,6 @@
@@
<target dev="hdb" bus="ide"/>
<readonly/>
<address type="drive" controller="0" bus="0" target="0" unit="1"/>

View File

@ -248,7 +248,15 @@ class Command(object):
file(filename, "w").write(output)
if "--print-diff" in self.argv and output.count("\n") > 3:
output = "\n".join(output.splitlines()[3:])
# 1) Strip header
# 2) Simplify context lines to reduce churn when
# libvirt or testdriver changes
newlines = []
for line in output.splitlines()[3:]:
if line.startswith("@@"):
line = "@@"
newlines.append(line)
output = "\n".join(newlines)
utils.diff_compare(output, filename)