summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/runtime/vnc.py
diff options
context:
space:
mode:
authorTudor Florea <tudor.florea@enea.com>2014-10-16 03:05:19 +0200
committerTudor Florea <tudor.florea@enea.com>2014-10-16 03:05:19 +0200
commitc527fd1f14c27855a37f2e8ac5346ce8d940ced2 (patch)
treebb002c1fdf011c41dbd2f0927bed23ecb5f83c97 /meta/lib/oeqa/runtime/vnc.py
downloadpoky-daisy-140929.tar.gz
initial commit for Enea Linux 4.0-140929daisy-140929
Migrated from the internal git server on the daisy-enea-point-release branch Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta/lib/oeqa/runtime/vnc.py')
-rw-r--r--meta/lib/oeqa/runtime/vnc.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/meta/lib/oeqa/runtime/vnc.py b/meta/lib/oeqa/runtime/vnc.py
new file mode 100644
index 0000000000..5ed10727bc
--- /dev/null
+++ b/meta/lib/oeqa/runtime/vnc.py
@@ -0,0 +1,19 @@
1from oeqa.oetest import oeRuntimeTest
2from oeqa.utils.decorators import *
3import re
4
5def setUpModule():
6 skipModuleUnless(oeRuntimeTest.hasPackage('x11vnc'), "No x11vnc package in image")
7
8class VNCTest(oeRuntimeTest):
9
10 @skipUnlessPassed('test_ssh')
11 def test_vnc(self):
12 (status, output) = self.target.run('x11vnc -display :0 -bg -o x11vnc.log')
13 self.assertEqual(status, 0, msg="x11vnc server failed to start: %s" % output)
14 port = re.search('PORT=[0-9]*', output)
15 self.assertTrue(port, msg="Listening port not specified in command output: %s" %output)
16
17 vncport = port.group(0).split('=')[1]
18 (status, output) = self.target.run('netstat -ntl | grep ":%s"' % vncport)
19 self.assertEqual(status, 0, msg="x11vnc server not running on port %s\n\n%s" % (vncport, self.target.run('netstat -ntl; cat x11vnc.log')[1]))