summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/runtime/cases/terminal.py
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oeqa/runtime/cases/terminal.py')
-rw-r--r--meta/lib/oeqa/runtime/cases/terminal.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/meta/lib/oeqa/runtime/cases/terminal.py b/meta/lib/oeqa/runtime/cases/terminal.py
new file mode 100644
index 0000000000..8fcca99f47
--- /dev/null
+++ b/meta/lib/oeqa/runtime/cases/terminal.py
@@ -0,0 +1,21 @@
1from oeqa.runtime.case import OERuntimeTestCase
2from oeqa.core.decorator.depends import OETestDepends
3from oeqa.runtime.decorator.package import OEHasPackage
4
5import threading
6import time
7
8class TerminalTest(OERuntimeTestCase):
9
10 @OEHasPackage(['matchbox-terminal'])
11 @OETestDepends(['ssh.SSHTest.test_ssh'])
12 def test_terminal_running(self):
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()
15 time.sleep(2)
16
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)
20 self.target.run('kill -9 %s' % output)
21 self.assertEqual(status, 0, msg='Not able to find process that runs terminal.')