mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06:00
uitests: console: Add live lxc serial test
This commit is contained in:
@@ -123,3 +123,13 @@ class Console(uiutils.UITestCase):
|
||||
return self._checkPassword()
|
||||
|
||||
|
||||
@_vm_wrapper("uitests-lxc-serial", uri="lxc:///")
|
||||
def testConsoleLXCSerial(self):
|
||||
"""
|
||||
Ensure LXC has serial open, and we can send some data
|
||||
"""
|
||||
win = self.app.topwin
|
||||
term = win.find("Serial Terminal")
|
||||
self.assertTrue(term.showing)
|
||||
term.typeText("help\n")
|
||||
self.assertTrue("COMMANDS" in term.text)
|
||||
|
||||
14
tests/uitests/xml/uitests-lxc-serial.xml
Normal file
14
tests/uitests/xml/uitests-lxc-serial.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<domain type='lxc'>
|
||||
<name>uitests-lxc-serial</name>
|
||||
<memory unit='KiB'>1048576</memory>
|
||||
<currentMemory unit='KiB'>1048576</currentMemory>
|
||||
<vcpu placement='static'>1</vcpu>
|
||||
<os>
|
||||
<type arch='x86_64'>exe</type>
|
||||
<init>/bin/sh</init>
|
||||
</os>
|
||||
<devices>
|
||||
<console type='pty'/>
|
||||
</devices>
|
||||
</domain>
|
||||
|
||||
@@ -6165,6 +6165,11 @@
|
||||
<object class="GtkNotebook" id="serial-pages">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<child internal-child="accessible">
|
||||
<object class="AtkObject" id="serial-pages-atkobject">
|
||||
<property name="AtkObject::accessible-name">serial-pages</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">2</property>
|
||||
|
||||
@@ -336,6 +336,7 @@ class vmmSerialConsole(vmmGObject):
|
||||
self.terminal = Vte.Terminal()
|
||||
self.terminal.set_scrollback_lines(1000)
|
||||
self.terminal.set_audible_bell(False)
|
||||
self.terminal.get_accessible().set_name("Serial Terminal")
|
||||
|
||||
self.terminal.connect("button-press-event", self.show_serial_rcpopup)
|
||||
self.terminal.connect("commit", self.console.send_data, self.terminal)
|
||||
|
||||
Reference in New Issue
Block a user