[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] Added unit test for VMX configuration files.
# HG changeset patch # User emellor@xxxxxxxxxxxxxxxxxxxxxx # Node ID 8c5b7b6772ae154192263bcb8c836eb619ab3eb4 # Parent d37644abe52d0d10d54ab55157677f8612e4778e Added unit test for VMX configuration files. Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx> diff -r d37644abe52d -r 8c5b7b6772ae tools/python/xen/xm/tests/test_create.py --- a/tools/python/xen/xm/tests/test_create.py Tue Dec 13 18:07:51 2005 +++ b/tools/python/xen/xm/tests/test_create.py Tue Dec 13 18:08:17 2005 @@ -141,5 +141,55 @@ }) + def testVMXConfigFile(self): + (fd, fname) = tempfile.mkstemp() + try: + os.write(fd, + ''' +kernel = "/usr/lib/xen/boot/vmxloader" +builder='vmx' +memory = 128 +name = "ExampleVMXDomain" +vcpus=1 +vif = [ 'type=ioemu, bridge=xenbr0' ] +disk = [ 'file:/var/images/min-el3-i386.img,ioemu:hda,w' ] +device_model = '/usr/lib/xen/bin/qemu-dm' +sdl=0 +vnc=1 +vncviewer=1 +ne2000=0 + ''') + finally: + os.close(fd) + + self.t('-f %s display=fakedisplay' % fname, + { 'kernel' : '/usr/lib/xen/boot/vmxloader', + 'builder' : 'vmx', + 'memory' : 128, + 'name' : 'ExampleVMXDomain', + 'vcpus' : 1, + 'nics' : -1, + 'vif' : ['type=ioemu, bridge=xenbr0'], + 'disk' : [['file:/var/images/min-el3-i386.img', + 'ioemu:hda', 'w', None]], + 'device_model': '/usr/lib/xen/bin/qemu-dm', + + 'extra' : ('VNC_VIEWER=%s:%d ' % + (xen.xm.create.get_host_addr(), + xen.xm.create.VNC_BASE_PORT + 1)), + 'vnc' : 1, + 'vncviewer' : 1, + + 'xm_file' : fname, + 'defconfig' : fname, + 'display' : 'fakedisplay', + + 'boot' : 'c', + 'dhcp' : 'off', + 'interface' : 'eth0', + 'path' : '.:/etc/xen', + }) + + def test_suite(): return unittest.makeSuite(test_create) _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |