summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/runtime
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2024-03-07 09:19:34 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-03-07 17:27:51 +0000
commit0bd3234676fc39e4cd687cbba56d4502a2b1d8a2 (patch)
tree815f135a877935f153aeb9bc7831c44a3499ddc3 /meta/lib/oeqa/runtime
parentf6235fef62af1591b2636182f794a858a87b204e (diff)
downloadpoky-0bd3234676fc39e4cd687cbba56d4502a2b1d8a2.tar.gz
oeqa/runtime/login: Fix dbus-wait timeout and loop conditional
The dbus-wait command returns a timeout after 60s but reports "success", detect this. Unfortunately it does effectively break the test as the signal is nearly never being correctly detected since it was already sent. For that reason comment out the code instead too. Also fix the loop conditional as the logic was incorrect and it was looping indefinitely when an image match didn't occur. (From OE-Core rev: 89c930e9e4b38b116edcba59e88621a39f8bda67) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/runtime')
-rw-r--r--meta/lib/oeqa/runtime/cases/login.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/meta/lib/oeqa/runtime/cases/login.py b/meta/lib/oeqa/runtime/cases/login.py
index 0a662e5d02..e1bc60d49b 100644
--- a/meta/lib/oeqa/runtime/cases/login.py
+++ b/meta/lib/oeqa/runtime/cases/login.py
@@ -66,15 +66,16 @@ class LoginTest(OERuntimeTestCase):
66 # Which is ugly and I hate it but it 'works' for various definitions of 66 # Which is ugly and I hate it but it 'works' for various definitions of
67 # 'works'. 67 # 'works'.
68 ### 68 ###
69 status, output = self.target.run('dbus-wait org.matchbox_project.desktop Loaded') 69 # RP: if the signal is sent before we run this, it will never be seen and we'd timeout
70 if status != 0: 70 #status, output = self.target.run('dbus-wait org.matchbox_project.desktop Loaded')
71 self.fail('dbus-wait failed. This could mean that the image never loaded the matchbox desktop.') 71 #if status != 0 or "Timeout" in output:
72 # self.fail('dbus-wait failed (%s, %s). This could mean that the image never loaded the matchbox desktop.' % (status, output))
72 73
73 # Start taking screenshots every 2 seconds until diff=0 or timeout is 60 seconds 74 # Start taking screenshots every 2 seconds until diff=0 or timeout is 60 seconds
74 timeout = time.time() + 60 75 timeout = time.time() + 60
75 diff = True 76 diff = True
76 with tempfile.NamedTemporaryFile(prefix="oeqa-screenshot-login", suffix=".png") as t: 77 with tempfile.NamedTemporaryFile(prefix="oeqa-screenshot-login", suffix=".png") as t:
77 while diff != 0 or time.time() > timeout: 78 while diff != 0 and time.time() < timeout:
78 time.sleep(2) 79 time.sleep(2)
79 ret = self.target.runner.run_monitor("screendump", args={"filename": t.name, "format":"png"}) 80 ret = self.target.runner.run_monitor("screendump", args={"filename": t.name, "format":"png"})
80 81