Skip to contentSkip to conversation

oeqa/runtime: add test for matchbox-terminal

PATCH In review [email protected] 2 participants 3 messages Sep 14, 2020 – Oct 29, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 oeqa/runtime: add test for matchbox-terminal

From: TeohJayShen <[email protected]>

This test is checking that the terminal application is able to run. The click_terminal_icon_on_X_desktop manual test case from oeqa/manual/bsp-hw can be replace by this runtime test.

---
 meta/lib/oeqa/runtime/cases/terminal.py | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
 create mode 100644 meta/lib/oeqa/runtime/cases/terminal.py
meta/lib/oeqa/runtime/cases/terminal.py new file +18 -0
new file mode 100644
index 0000000..a268f26
@@ -0,0 +1,18 @@
+from oeqa.runtime.case import OERuntimeTestCase
+from oeqa.core.decorator.depends import OETestDepends
+from oeqa.runtime.decorator.package import OEHasPackage
+
+import threading
+import time
+
+class TerminalTest(OERuntimeTestCase):
+
+    @OEHasPackage(['matchbox-terminal'])
+    @OETestDepends(['ssh.SSHTest.test_ssh'])
+    def test_terminal_running(self):
+        t_thread = threading.Thread(target=self.target.run, args=('export DISPLAY=:0 && matchbox-terminal',))
+        t_thread.start()
+        time.sleep(2)
+        status, output = self.target.run('pidof matchbox-terminal')
+        self.target.run('kill -9 %s' % output)
+        self.assertEqual(status, 0, msg='Not able to find process that runs terminal.')   
Signature · 1 line
2.7.4
#1 lore raw
Quoted 1 line · On Mon, 14 Sep 2020 at 05:27, <[email protected]> wrote:

This test is checking that the terminal application is able to run. The click_terminal_icon_on_X_desktop manual test case from oeqa/manual/bsp-hw can be replace by this runtime test.

This does not test that the terminal actually started. If it hung, this test would pass. The manual test case is "does the terminal work", which this test does not replicate.

Ross

#2 lore raw

Hi Ross,

Thank you for the clarification. I will rework on the terminal.py test case.

Thanks,
Jay

-----Original Message-----
From: Ross Burton <[email protected]>
Sent: Wednesday, 28 October, 2020 8:40 PM
To: Teoh, Jay Shen <[email protected]>
Cc: OE-core <[email protected]>
Subject: Re: [OE-core] [PATCH] oeqa/runtime: add test for matchbox-terminal

Quoted 1 line · On Mon, 14 Sep 2020 at 05:27, <[email protected]> wrote:

This test is checking that the terminal application is able to run. The click_terminal_icon_on_X_desktop manual test case from oeqa/manual/bsp-hw can be replace by this runtime test.

This does not test that the terminal actually started. If it hung, this test would pass. The manual test case is "does the terminal work", which this test does not replicate.

Ross