From c527fd1f14c27855a37f2e8ac5346ce8d940ced2 Mon Sep 17 00:00:00 2001 From: Tudor Florea Date: Thu, 16 Oct 2014 03:05:19 +0200 Subject: initial commit for Enea Linux 4.0-140929 Migrated from the internal git server on the daisy-enea-point-release branch Signed-off-by: Tudor Florea --- meta/lib/oeqa/runtime/vnc.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 meta/lib/oeqa/runtime/vnc.py (limited to 'meta/lib/oeqa/runtime/vnc.py') 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 @@ +from oeqa.oetest import oeRuntimeTest +from oeqa.utils.decorators import * +import re + +def setUpModule(): + skipModuleUnless(oeRuntimeTest.hasPackage('x11vnc'), "No x11vnc package in image") + +class VNCTest(oeRuntimeTest): + + @skipUnlessPassed('test_ssh') + def test_vnc(self): + (status, output) = self.target.run('x11vnc -display :0 -bg -o x11vnc.log') + self.assertEqual(status, 0, msg="x11vnc server failed to start: %s" % output) + port = re.search('PORT=[0-9]*', output) + self.assertTrue(port, msg="Listening port not specified in command output: %s" %output) + + vncport = port.group(0).split('=')[1] + (status, output) = self.target.run('netstat -ntl | grep ":%s"' % vncport) + 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])) -- cgit v1.2.3-54-g00ecf