summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>2025-10-09 15:37:28 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-10-27 17:20:42 +0000
commit1666d6495d588700935c4230831adb71dbd7831c (patch)
tree05acb3f3025b191c93e1be3c514f994c6ab11f0e
parent0faccb809f6be8ddbaf350ef0d973243ae926ec4 (diff)
downloadpoky-1666d6495d588700935c4230831adb71dbd7831c.tar.gz
oeqa: runtime: weston: Remove tear down method
Tear down method is executed even when the tests are disabled. This lead to SSH being used to run commands on the target, and as it might fail when no SSH server is present, we had to use ignore_ssh_fails=True here. Instead, remove log file just before it is created: it will remain on the target after the test is run, but this should be acceptable. (From OE-Core rev: 8b119b1a0fa618c03fbee1bcc755785fedd2d923) Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/lib/oeqa/runtime/cases/weston.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/meta/lib/oeqa/runtime/cases/weston.py b/meta/lib/oeqa/runtime/cases/weston.py
index e2cecffe83..b0dccee73b 100644
--- a/meta/lib/oeqa/runtime/cases/weston.py
+++ b/meta/lib/oeqa/runtime/cases/weston.py
@@ -14,10 +14,6 @@ import time
14class WestonTest(OERuntimeTestCase): 14class WestonTest(OERuntimeTestCase):
15 weston_log_file = '/tmp/weston-2.log' 15 weston_log_file = '/tmp/weston-2.log'
16 16
17 @classmethod
18 def tearDownClass(cls):
19 cls.tc.target.run('rm %s' % cls.weston_log_file, ignore_ssh_fails=True)
20
21 @OETestDepends(['ssh.SSHTest.test_ssh']) 17 @OETestDepends(['ssh.SSHTest.test_ssh'])
22 @OEHasPackage(['weston']) 18 @OEHasPackage(['weston'])
23 def test_weston_running(self): 19 def test_weston_running(self):
@@ -67,6 +63,10 @@ class WestonTest(OERuntimeTestCase):
67 existing_wl_processes = self.get_processes_of('weston-desktop-shell', 'existing') 63 existing_wl_processes = self.get_processes_of('weston-desktop-shell', 'existing')
68 existing_weston_processes = self.get_processes_of('weston', 'existing') 64 existing_weston_processes = self.get_processes_of('weston', 'existing')
69 65
66 # weston log file should be removed, except if test_weston_supports_xwayland() test has to be run.
67 if 'x11' not in self.td.get('DISTRO_FEATURES'):
68 self.addCleanup(self.target.run, 'rm -f %s' % self.weston_log_file)
69
70 weston_thread = threading.Thread(target=self.run_weston_init) 70 weston_thread = threading.Thread(target=self.run_weston_init)
71 weston_thread.start() 71 weston_thread.start()
72 new_wl_processes, try_cnt = self.get_new_wayland_processes(existing_wl_processes) 72 new_wl_processes, try_cnt = self.get_new_wayland_processes(existing_wl_processes)
@@ -83,6 +83,7 @@ class WestonTest(OERuntimeTestCase):
83 @skipIfNotFeature('x11', 'Test requires x11 to be in DISTRO_FEATURES') 83 @skipIfNotFeature('x11', 'Test requires x11 to be in DISTRO_FEATURES')
84 @OEHasPackage(['weston']) 84 @OEHasPackage(['weston'])
85 def test_weston_supports_xwayland(self): 85 def test_weston_supports_xwayland(self):
86 self.addCleanup(self.target.run, 'rm -f %s' % self.weston_log_file)
86 cmd ='cat %s | grep "xserver listening on display"' % self.weston_log_file 87 cmd ='cat %s | grep "xserver listening on display"' % self.weston_log_file
87 status, output = self.target.run(cmd) 88 status, output = self.target.run(cmd)
88 msg = ('xwayland does not appear to be running') 89 msg = ('xwayland does not appear to be running')