tests: Strip beginning lines from diff output to not conflict so much

This commit is contained in:
Cole Robinson 2014-02-02 13:41:43 -05:00
parent bce8ee942d
commit 66d9cdbe22
48 changed files with 22 additions and 160 deletions

View File

@ -1,6 +1,3 @@
--- Original XML
+++ Altered XML
@@ -304,5 +304,9 @@
<panic>
<address type="isa" iobase="0x505"/>
</panic>

View File

@ -1,6 +1,3 @@
--- Original XML
+++ Altered XML
@@ -304,5 +304,9 @@
<panic>
<address type="isa" iobase="0x505"/>
</panic>
@ -11,6 +8,7 @@
</devices>
</domain>
Creating storage file __virtinst_cli_new1.img | 10 MB 00:00
Creating storage file __virtinst_cli_new1.img | 10 MB 00:00
Domain 'test-many-devices' defined successfully.
Changes will take effect after the next domain shutdown.

View File

@ -1,6 +1,3 @@
--- Original XML
+++ Altered XML
@@ -304,5 +304,9 @@
<panic>
<address type="isa" iobase="0x505"/>
</panic>

View File

@ -1,6 +1,3 @@
--- Original XML
+++ Altered XML
@@ -304,5 +304,10 @@
<panic>
<address type="isa" iobase="0x505"/>
</panic>

View File

@ -1,6 +1,3 @@
--- Original XML
+++ Altered XML
@@ -304,5 +304,6 @@
<panic>
<address type="isa" iobase="0x505"/>
</panic>

View File

@ -1,6 +1,3 @@
--- Original XML
+++ Altered XML
@@ -265,21 +265,25 @@
<vendor id="0x04b3"/>
<product id="0x4485"/>
</source>

View File

@ -1,6 +1,3 @@
--- Original XML
+++ Altered XML
@@ -44,11 +44,6 @@
<feature policy="require" name="xtpr"/>
<feature policy="require" name="acpi"/>
</cpu>
@ -12,7 +9,7 @@
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
@@ -305,4 +300,5 @@
@@ -311,4 +306,5 @@
<address type="isa" iobase="0x505"/>
</panic>
</devices>

View File

@ -1,6 +1,3 @@
--- Original XML
+++ Altered XML
@@ -27,23 +27,6 @@
<spinlocks state="on" retries="12287"/>
</hyperv>
</features>
@ -24,7 +21,7 @@
<clock offset="utc">
<timer name="rtc" tickpolicy="catchup"/>
<timer name="pit" tickpolicy="delay"/>
@@ -305,4 +288,7 @@
@@ -311,4 +294,7 @@
<address type="isa" iobase="0x505"/>
</panic>
</devices>

View File

@ -1,6 +1,3 @@
--- Original XML
+++ Altered XML
@@ -54,10 +54,9 @@
<on_crash>restart</on_crash>
<devices>
<emulator>/usr/lib/xen/bin/qemu-dm</emulator>

View File

@ -1,6 +1,3 @@
--- Original XML
+++ Altered XML
@@ -258,7 +258,7 @@
<model type="vmvga" vram="9216" heads="1"/>
</video>
<video>

View File

@ -1,6 +1,3 @@
--- Original XML
+++ Altered XML
@@ -253,7 +253,7 @@
</graphics>
<sound model="sb16"/>
<sound model="es1370"/>

View File

@ -1,6 +1,3 @@
--- Original XML
+++ Altered XML
@@ -88,7 +88,7 @@
<driver name="qemu" type="qcow2" cache="none"/>
<source file="/tmp/foobar2"/>
<target dev="vdc" bus="virtio"/>

View File

@ -1,6 +1,3 @@
--- Original XML
+++ Altered XML
@@ -65,7 +65,7 @@
<address type="drive" controller="0" bus="0" target="0" unit="1"/>
</disk>
<disk type="file" device="disk">

View File

@ -1,6 +1,3 @@
--- Original XML
+++ Altered XML
@@ -160,7 +160,7 @@
<interface type="ethernet">
<mac address="00:11:7f:33:44:55"/>
<script path="/etc/qemu-ifup"/>

View File

@ -1,6 +1,3 @@
--- Original XML
+++ Altered XML
@@ -253,7 +253,7 @@
</graphics>
<sound model="sb16"/>
<sound model="es1370"/>

View File

@ -1,6 +1,3 @@
--- Original XML
+++ Altered XML
@@ -15,8 +15,10 @@
</numatune>
<os>
<type arch="i686">hvm</type>

View File

@ -1,6 +1,3 @@
--- Original XML
+++ Altered XML
@@ -214,7 +214,7 @@
<console type="pty">
<target type="uml" port="1"/>
</console>

View File

@ -1,6 +1,3 @@
--- Original XML
+++ Altered XML
@@ -44,10 +44,11 @@
<feature policy="require" name="xtpr"/>
<feature policy="require" name="acpi"/>
</cpu>

View File

@ -1,6 +1,3 @@
--- Original XML
+++ Altered XML
@@ -209,7 +209,7 @@
<target port="2"/>
</parallel>
<console type="pty">

View File

@ -1,6 +1,3 @@
--- Original XML
+++ Altered XML
@@ -99,7 +99,7 @@
<source file="/tmp/foobar4"/>
<target dev="xvdc" bus="xen"/>
</disk>

View File

@ -1,6 +1,3 @@
--- Original XML
+++ Altered XML
@@ -28,9 +28,9 @@
</hyperv>
</features>
<cpu mode="custom" match="exact">
@ -16,7 +13,7 @@
<feature policy="require" name="ds_cpl"/>
<feature policy="require" name="xtpr"/>
<feature policy="require" name="acpi"/>
+ <feature name="x2apic" policy="force"/>
+ <feature policy="force" name="x2apic"/>
</cpu>
<clock offset="utc">
<timer name="rtc" tickpolicy="catchup"/>

View File

@ -1,6 +1,3 @@
--- Original XML
+++ Altered XML
@@ -55,7 +55,6 @@
<devices>
<emulator>/usr/lib/xen/bin/qemu-dm</emulator>
<disk type="block" device="floppy">

View File

@ -1,6 +1,3 @@
--- Original XML
+++ Altered XML
@@ -55,9 +55,10 @@
<devices>
<emulator>/usr/lib/xen/bin/qemu-dm</emulator>
<disk type="block" device="floppy">

View File

@ -1,6 +1,3 @@
--- Original XML
+++ Altered XML
@@ -19,10 +19,9 @@
<boot dev="hd"/>
</os>
<features>

View File

@ -1,6 +1,3 @@
--- Original XML
+++ Altered XML
@@ -106,10 +106,10 @@
<controller type="virtio-serial" index="0"/>
<controller type="virtio-serial" index="1"/>
<controller type="ccid" index="0"/>

View File

@ -1,6 +1,3 @@
--- Original XML
+++ Altered XML
@@ -238,7 +238,7 @@
</backend>
</tpm>
<input type="mouse" bus="ps2"/>

View File

@ -1,6 +1,3 @@
--- Original XML
+++ Altered XML
@@ -262,9 +262,10 @@
</video>
<hostdev mode="subsystem" type="usb" managed="yes">
<source>

View File

@ -1,6 +1,3 @@
--- Original XML
+++ Altered XML
@@ -293,7 +293,7 @@
<usbdev allow="no"/>
</redirfilter>
<watchdog model="ib700" action="poweroff"/>

View File

@ -1,6 +1,3 @@
--- Original XML
+++ Altered XML
@@ -4,10 +4,9 @@
<description>Foo bar baz &amp;
yeah boii &lt; &gt; yeahfoo
</description>

View File

@ -1,6 +1,3 @@
--- Original XML
+++ Altered XML
@@ -1,9 +1,9 @@
<domain type="test">
- <name>test-many-devices</name>
- <uuid>12345678-12f4-1234-1234-123456789012</uuid>
@ -15,7 +12,7 @@
<memory unit="KiB">409600</memory>
<currentMemory unit="KiB">204800</currentMemory>
<memoryBacking>
@@ -305,4 +305,5 @@
@@ -311,4 +311,5 @@
<address type="isa" iobase="0x505"/>
</panic>
</devices>

View File

@ -1,6 +1,3 @@
--- Original XML
+++ Altered XML
@@ -125,11 +125,10 @@
<source dir="/foo/bar"/>
<target dir="/bar/baz"/>
</filesystem>

View File

@ -1,6 +1,3 @@
--- Original XML
+++ Altered XML
@@ -11,7 +11,7 @@
</memoryBacking>
<vcpu placement="static" cpuset="1-2,5-9,11,13-14">9</vcpu>
<numatune>

View File

@ -1,6 +1,3 @@
--- Original XML
+++ Altered XML
@@ -195,8 +195,8 @@
<protocol type="telnet"/>
<target port="1"/>
</serial>

View File

@ -1,6 +1,3 @@
--- Original XML
+++ Altered XML
@@ -281,8 +281,8 @@
<address domain="0x0003" bus="0x00" slot="0x19" function="0x0"/>
</source>
</hostdev>

View File

@ -1,6 +1,3 @@
--- Original XML
+++ Altered XML
@@ -295,7 +295,7 @@
<watchdog model="ib700" action="poweroff"/>
<memballoon model="virtio"/>
<rng model="virtio">

View File

@ -1,6 +1,3 @@
--- Original XML
+++ Altered XML
@@ -305,4 +305,7 @@
<address type="isa" iobase="0x505"/>
</panic>
</devices>

View File

@ -1,6 +1,3 @@
--- Original XML
+++ Altered XML
@@ -187,7 +187,7 @@
<protocol type="raw"/>
<address type="ccid" controller="0" slot="3"/>
</smartcard>

View File

@ -1,6 +1,3 @@
--- Original XML
+++ Altered XML
@@ -170,7 +170,7 @@
</virtualport>
<address type="pci" domain="0x0000" bus="0x00" slot="0x07" function="0x0"/>
</interface>

View File

@ -1,6 +1,3 @@
--- Original XML
+++ Altered XML
@@ -251,7 +251,7 @@
<channel name="inputs" mode="secure"/>
<channel name="record" mode="insecure"/>
</graphics>

View File

@ -1,6 +1,3 @@
--- Original XML
+++ Altered XML
@@ -234,7 +234,7 @@
<input type="tablet" bus="usb"/>
<tpm model="tpm-tis">
<backend type="passthrough">

View File

@ -1,6 +1,3 @@
--- Original XML
+++ Altered XML
@@ -9,7 +9,7 @@
<memoryBacking>
<hugepages/>
</memoryBacking>

View File

@ -1,6 +1,3 @@
--- Original XML
+++ Altered XML
@@ -255,7 +255,7 @@
<sound model="es1370"/>
<sound model="ich6"/>
<video>

View File

@ -1,6 +1,3 @@
--- Original XML
+++ Altered XML
@@ -292,7 +292,7 @@
<usbdev class="0x08" vendor="0x15E1" product="0x2007" version="1.10" allow="yes"/>
<usbdev allow="no"/>
</redirfilter>

View File

@ -1,18 +1,14 @@
--- Original XML
+++ Altered XML
@@ -83,12 +83,6 @@
<target dev="sdb" bus="scsi"/>
<readonly/>
<address type="drive" controller="0" bus="0" target="0" unit="1"/>
<source dev="/dev/null"/>
<target dev="hdc" bus="ide"/>
<address type="drive" controller="0" bus="1" target="0" unit="0"/>
- </disk>
- <disk type="file" device="disk">
- <driver name="qemu" type="qcow2" cache="none"/>
- <source file="/tmp/foobar2"/>
- <target dev="vdc" bus="virtio"/>
- <shareable/>
- <disk type="block" device="cdrom">
- <target dev="sdb" bus="scsi"/>
- <readonly/>
- <address type="drive" controller="0" bus="0" target="0" unit="1"/>
</disk>
<disk type="block" device="disk">
<source dev="/dev/default-pool/overlay.img"/>
<disk type="file" device="disk">
<driver name="qemu" type="qcow2" cache="none"/>
Domain 'test-many-devices' defined successfully.
Changes will take effect after the next domain shutdown.

View File

@ -1,6 +1,3 @@
--- Original XML
+++ Altered XML
@@ -54,11 +54,6 @@
<on_crash>restart</on_crash>
<devices>
<emulator>/usr/lib/xen/bin/qemu-dm</emulator>
@ -12,10 +9,10 @@
<disk type="dir" device="floppy">
<source dir="/tmp"/>
<target dev="fdb" bus="fdc"/>
@@ -72,12 +67,6 @@
<total_iops_sec>50</total_iops_sec>
</iotune>
<address type="drive" controller="0" bus="0" target="0" unit="0"/>
@@ -78,12 +73,6 @@
<target dev="hdb" bus="ide"/>
<readonly/>
<address type="drive" controller="0" bus="0" target="0" unit="1"/>
- </disk>
- <disk type="block" device="disk">
- <driver type="raw" cache="none"/>

View File

@ -1,6 +1,3 @@
--- Original XML
+++ Altered XML
@@ -253,7 +253,6 @@
</graphics>
<sound model="sb16"/>
<sound model="es1370"/>

View File

@ -1,6 +1,3 @@
--- Original XML
+++ Altered XML
@@ -254,12 +254,6 @@
<sound model="sb16"/>
<sound model="es1370"/>
<sound model="ich6"/>

View File

@ -256,6 +256,9 @@ class Command(object):
if utils.REGENERATE_OUTPUT or not os.path.exists(filename):
file(filename, "w").write(output)
if "--print-diff" in self.argv and output.count("\n") > 3:
output = "\n".join(output.splitlines()[3:])
utils.diff_compare(output, filename)
except AssertionError, e: