aboutsummaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oeqa/runtime/date.py10
-rw-r--r--meta/lib/oeqa/runtime/ldd.py4
-rw-r--r--meta/lib/oeqa/runtime/vnc.py9
3 files changed, 9 insertions, 14 deletions
diff --git a/meta/lib/oeqa/runtime/date.py b/meta/lib/oeqa/runtime/date.py
index 3b35964763..a208e29ada 100644
--- a/meta/lib/oeqa/runtime/date.py
+++ b/meta/lib/oeqa/runtime/date.py
@@ -4,13 +4,12 @@ import re
class DateTest(oeRuntimeTest):
- def setUp(self):
+ @skipUnlessPassed("test_ssh")
+ def test_date(self):
(status, output) = self.target.run('date +"%Y-%m-%d %T"')
self.assertEqual(status, 0, msg="Failed to get initial date, output: %s" % output)
- self.oldDate = output
+ oldDate = output
- @skipUnlessPassed("test_ssh")
- def test_date(self):
sampleDate = '"2016-08-09 10:00:00"'
(status, output) = self.target.run("date -s %s" % sampleDate)
self.assertEqual(status, 0, msg="Date set failed, output: %s" % output)
@@ -19,6 +18,5 @@ class DateTest(oeRuntimeTest):
p = re.match('Tue, 09 Aug 2016 10:00:.. \+0000', output)
self.assertTrue(p, msg="The date was not set correctly, output: %s" % output)
- def tearDown(self):
- (status, output) = self.target.run('date -s "%s"' % self.oldDate)
+ (status, output) = self.target.run('date -s "%s"' % oldDate)
self.assertEqual(status, 0, msg="Failed to reset date, output: %s" % output)
diff --git a/meta/lib/oeqa/runtime/ldd.py b/meta/lib/oeqa/runtime/ldd.py
index 577c5e26ef..4374530fc4 100644
--- a/meta/lib/oeqa/runtime/ldd.py
+++ b/meta/lib/oeqa/runtime/ldd.py
@@ -11,9 +11,9 @@ class LddTest(oeRuntimeTest):
@skipUnlessPassed('test_ssh')
def test_ldd_exists(self):
(status, output) = self.target.run('which ldd')
- self.assertEqual(status, 0, msg = "ldd does not exist in PATH !")
+ self.assertEqual(status, 0, msg = "ldd does not exist in PATH: which ldd: %s" % output)
@skipUnlessPassed('test_ldd_exists')
- def test_ldd(self):
+ def test_ldd_rtldlist_check(self):
(status, output) = self.target.run('for i in $(which ldd | xargs cat | grep "^RTLDLIST"|cut -d\'=\' -f2|tr -d \'"\'); do test -f $i && echo $i && break; done')
self.assertEqual(status, 0, msg = "ldd path not correct or RTLDLIST files don't exist. ")
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]))