summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorTeoh Jay Shen <jay.shen.teoh@intel.com>2020-12-21 10:43:03 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-08-10 11:14:11 +0100
commit587ea95477061a081278390d61bb173a965b7acb (patch)
tree71cfc76b0740f6feb16ab80ca1be578661b16e9d /meta/lib
parent92b976d733992d2e5f1a9709b782e5d86a782582 (diff)
downloadpoky-587ea95477061a081278390d61bb173a965b7acb.tar.gz
oeqa/terminal : improve the test case
-Improve this test case to fulfill the requirements of replacing the click_terminal_icon_on_X_desktop manual test case from oeqa/manual/bsp-hw : 1) verify that the terminal window is working without problem 2) verify that there's only 1 terminal window is launched (From OE-Core rev: 039cd427cffe37bdf09cbf30c2cc47a85e166330) Signed-off-by: Teoh Jay Shen <jay.shen.teoh@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 824713174fae0617240a236d1bbfd2929bf4b24f) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oeqa/runtime/cases/terminal.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/meta/lib/oeqa/runtime/cases/terminal.py b/meta/lib/oeqa/runtime/cases/terminal.py
index a268f26880..8fcca99f47 100644
--- a/meta/lib/oeqa/runtime/cases/terminal.py
+++ b/meta/lib/oeqa/runtime/cases/terminal.py
@@ -10,9 +10,12 @@ class TerminalTest(OERuntimeTestCase):
10 @OEHasPackage(['matchbox-terminal']) 10 @OEHasPackage(['matchbox-terminal'])
11 @OETestDepends(['ssh.SSHTest.test_ssh']) 11 @OETestDepends(['ssh.SSHTest.test_ssh'])
12 def test_terminal_running(self): 12 def test_terminal_running(self):
13 t_thread = threading.Thread(target=self.target.run, args=('export DISPLAY=:0 && matchbox-terminal',)) 13 t_thread = threading.Thread(target=self.target.run, args=("export DISPLAY=:0 && matchbox-terminal -e 'sh -c \"uname -a && exec sh\"'",))
14 t_thread.start() 14 t_thread.start()
15 time.sleep(2) 15 time.sleep(2)
16
16 status, output = self.target.run('pidof matchbox-terminal') 17 status, output = self.target.run('pidof matchbox-terminal')
18 number_of_terminal = len(output.split())
19 self.assertEqual(number_of_terminal, 1, msg='There should be only one terminal being launched. Number of terminal launched : %s' % number_of_terminal)
17 self.target.run('kill -9 %s' % output) 20 self.target.run('kill -9 %s' % output)
18 self.assertEqual(status, 0, msg='Not able to find process that runs terminal.') 21 self.assertEqual(status, 0, msg='Not able to find process that runs terminal.')