diff options
Diffstat (limited to 'meta/lib/oeqa/runtime/cases/weston.py')
-rw-r--r-- | meta/lib/oeqa/runtime/cases/weston.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/meta/lib/oeqa/runtime/cases/weston.py b/meta/lib/oeqa/runtime/cases/weston.py index ee4d336482e..c52f61f76c8 100644 --- a/meta/lib/oeqa/runtime/cases/weston.py +++ b/meta/lib/oeqa/runtime/cases/weston.py @@ -16,20 +16,19 @@ class WestonTest(OERuntimeTestCase): @classmethod def tearDownClass(cls): - cls.tc.target.run('rm %s' % cls.weston_log_file) + cls.tc.target.run('rm -f %s' % cls.weston_log_file) @OETestDepends(['ssh.SSHTest.test_ssh']) @OEHasPackage(['weston']) def test_weston_running(self): cmd ='%s | grep [w]eston-desktop-shell' % self.tc.target_cmds['ps'] - status, output = self.target.run(cmd) + status, output = self.target.run(cmd, ignore_status=True) msg = ('Weston does not appear to be running %s' % self.target.run(self.tc.target_cmds['ps'])[1]) self.assertEqual(status, 0, msg=msg) def get_processes_of(self, target, error_msg): status, output = self.target.run('pidof %s' % target) - self.assertEqual(status, 0, msg='Retrieve %s (%s) processes error: %s' % (target, error_msg, output)) return output.split(" ") def get_weston_command(self, cmd): @@ -59,8 +58,7 @@ class WestonTest(OERuntimeTestCase): command = 'XDG_RUNTIME_DIR=/run wayland-info' else: command = self.get_weston_command('wayland-info') - status, output = self.target.run(command) - self.assertEqual(status, 0, msg='wayland-info error: %s' % output) + self.target.run(command) @OEHasPackage(['weston']) def test_weston_can_initialize_new_wayland_compositor(self): @@ -72,13 +70,14 @@ class WestonTest(OERuntimeTestCase): new_wl_processes, try_cnt = self.get_new_wayland_processes(existing_wl_processes) existing_and_new_weston_processes = self.get_processes_of('weston', 'existing and new') new_weston_processes = [x for x in existing_and_new_weston_processes if x not in existing_weston_processes] + if not new_weston_processes: + __, weston_log = self.target.run('cat %s' % self.weston_log_file) + self.fail('Could not get new weston-desktop-shell processes (%s, try_cnt:%s) weston log: %s' % (new_wl_processes, try_cnt, weston_log)) if 'systemd' in self.tc.td['VIRTUAL-RUNTIME_init_manager']: self.target.run('systemctl stop weston-ptest.service') else: for w in new_weston_processes: self.target.run('kill -9 %s' % w) - __, weston_log = self.target.run('cat %s' % self.weston_log_file) - self.assertTrue(new_wl_processes, msg='Could not get new weston-desktop-shell processes (%s, try_cnt:%s) weston log: %s' % (new_wl_processes, try_cnt, weston_log)) @skipIfNotFeature('x11', 'Test requires x11 to be in DISTRO_FEATURES') @OEHasPackage(['weston']) |