diff options
author | Cole Robinson <crobinso@redhat.com> | 2018-01-21 12:40:15 -0500 |
---|---|---|
committer | Cole Robinson <crobinso@redhat.com> | 2018-01-21 14:42:44 -0500 |
commit | a10fda6b5c74c781e269073816b913d03a23ca87 (patch) | |
tree | c2535e70ede4e4d943659ce49c8e2b674c6bdadc | |
parent | d774d01e1ce3d0db91cb78425de4015c622bc99d (diff) | |
download | virt-manager-a10fda6b5c74c781e269073816b913d03a23ca87.tar.gz |
uitests: console: Add live lxc serial test
-rw-r--r-- | tests/uitests/console.py | 10 | ||||
-rw-r--r-- | tests/uitests/xml/uitests-lxc-serial.xml | 14 | ||||
-rw-r--r-- | ui/details.ui | 5 | ||||
-rw-r--r-- | virtManager/serialcon.py | 1 |
4 files changed, 30 insertions, 0 deletions
diff --git a/tests/uitests/console.py b/tests/uitests/console.py index 83cb5d26..7b2dfe77 100644 --- a/tests/uitests/console.py +++ b/tests/uitests/console.py @@ -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) diff --git a/tests/uitests/xml/uitests-lxc-serial.xml b/tests/uitests/xml/uitests-lxc-serial.xml new file mode 100644 index 00000000..1ed357f2 --- /dev/null +++ b/tests/uitests/xml/uitests-lxc-serial.xml @@ -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> + diff --git a/ui/details.ui b/ui/details.ui index 2a4e3959..e0689f4d 100644 --- a/ui/details.ui +++ b/ui/details.ui @@ -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> diff --git a/virtManager/serialcon.py b/virtManager/serialcon.py index 21ab8ae7..176e94b8 100644 --- a/virtManager/serialcon.py +++ b/virtManager/serialcon.py @@ -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) |