aboutsummaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/runtime/vnc.py
diff options
context:
space:
mode:
authorStefan Stanacar <stefanx.stanacar@intel.com>2013-09-19 13:49:35 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-09-20 12:14:31 +0100
commit2f91bb438cfcdd0a40daed5902b6e98fc0aee67f (patch)
treedf38d065c5459d0ab331cb7108dfdb54b5fb39d2 /meta/lib/oeqa/runtime/vnc.py
parent48b9e45b9716130b015ae2ab7398d6aa243933dc (diff)
downloadopenembedded-core-contrib-2f91bb438cfcdd0a40daed5902b6e98fc0aee67f.tar.gz
lib/oeqa/runtime: cleanup and improve output readability for some tests
- move everything in the same test. setUp/tearDown aren't quite the right thing here, everything it's part of the same test. (and it get's confusing when ssh fails) ldd: - change test name and add output to error message vnc: - remove unnecessary check as there is no point in doing both ps and netstat. Also improve error output a bit. Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/runtime/vnc.py')
-rw-r--r--meta/lib/oeqa/runtime/vnc.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/meta/lib/oeqa/runtime/vnc.py b/meta/lib/oeqa/runtime/vnc.py
index ce111793b8..5ed10727bc 100644
--- a/meta/lib/oeqa/runtime/vnc.py
+++ b/meta/lib/oeqa/runtime/vnc.py
@@ -9,14 +9,11 @@ class VNCTest(oeRuntimeTest):
@skipUnlessPassed('test_ssh')
def test_vnc(self):
- (status, output) = self.target.run('x11vnc -display :0.0 -bg -q')
+ (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)
- (status, output) = self.target.run(oeRuntimeTest.pscmd + ' | grep -i [x]11vnc')
- self.assertEqual(status, 0, msg="x11vnc process not running")
-
vncport = port.group(0).split('=')[1]
- (status, output) = self.target.run('netstat -atun | grep :%s | grep LISTEN' % vncport)
- self.assertEqual(status, 0, msg="x11vnc server not running on port %s" % vncport)
+ (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]))