diff options
author | Tudor Florea <tudor.florea@enea.com> | 2015-10-09 22:59:03 +0200 |
---|---|---|
committer | Tudor Florea <tudor.florea@enea.com> | 2015-10-09 22:59:03 +0200 |
commit | 972dcfcdbfe75dcfeb777150c136576cf1a71e99 (patch) | |
tree | 97a61cd7e293d7ae9d56ef7ed0f81253365bb026 /meta/lib/oeqa/runtime/vnc.py | |
download | poky-972dcfcdbfe75dcfeb777150c136576cf1a71e99.tar.gz |
initial commit for Enea Linux 5.0 arm
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.py | 20 |
1 files changed, 20 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..f31deff306 --- /dev/null +++ b/meta/lib/oeqa/runtime/vnc.py | |||
@@ -0,0 +1,20 @@ | |||
1 | from oeqa.oetest import oeRuntimeTest, skipModuleUnless | ||
2 | from oeqa.utils.decorators import * | ||
3 | import re | ||
4 | |||
5 | def setUpModule(): | ||
6 | skipModuleUnless(oeRuntimeTest.hasPackage('x11vnc'), "No x11vnc package in image") | ||
7 | |||
8 | class VNCTest(oeRuntimeTest): | ||
9 | |||
10 | @testcase(213) | ||
11 | @skipUnlessPassed('test_ssh') | ||
12 | def test_vnc(self): | ||
13 | (status, output) = self.target.run('x11vnc -display :0 -bg -o x11vnc.log') | ||
14 | self.assertEqual(status, 0, msg="x11vnc server failed to start: %s" % output) | ||
15 | port = re.search('PORT=[0-9]*', output) | ||
16 | self.assertTrue(port, msg="Listening port not specified in command output: %s" %output) | ||
17 | |||
18 | vncport = port.group(0).split('=')[1] | ||
19 | (status, output) = self.target.run('netstat -ntl | grep ":%s"' % vncport) | ||
20 | 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])) | ||