summaryrefslogtreecommitdiffstats
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>2020-12-21 22:29:57 +0000
commit8a67c61279b44c4ed75c34907bba46f8f826fa6d (patch)
treef8784eb90567ffe20d0406599303d8ed3d3b2e08
parent290dccc6e236d66f26da9332a87e4fb7b95e2c58 (diff)
downloadpoky-8a67c61279b44c4ed75c34907bba46f8f826fa6d.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: 824713174fae0617240a236d1bbfd2929bf4b24f) Signed-off-by: Teoh Jay Shen <jay.shen.teoh@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-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.')