oeqa/runtime: add test for matchbox-terminal
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
@@ -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
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_desktopmanual 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
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_desktopmanual 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