[gnome-settings-daemon] power tests: Verify that daemon does not crash
- From: Martin Pitt <martinpitt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] power tests: Verify that daemon does not crash
- Date: Thu, 24 Jan 2013 09:11:42 +0000 (UTC)
commit 39e036f12009c546a94ac8ce90ba8dcee1c868c3
Author: Martin Pitt <martinpitt gnome org>
Date: Thu Jan 24 10:07:24 2013 +0100
power tests: Verify that daemon does not crash
Check that the daemon is still running in tearDown(), i. e. that it did not
crash during the test.
plugins/power/test.py | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/plugins/power/test.py b/plugins/power/test.py
index b6d6d11..920f695 100755
--- a/plugins/power/test.py
+++ b/plugins/power/test.py
@@ -95,6 +95,7 @@ class PowerPluginTest(gsdtestcase.GSDTestCase):
# reactivate screen, in case tests triggered a display blank
self.reset_idle_timer()
+ daemon_running = self.daemon.poll() == None
self.daemon.terminate()
self.daemon.wait()
self.plugin_log.close()
@@ -119,6 +120,9 @@ class PowerPluginTest(gsdtestcase.GSDTestCase):
except OSError:
pass
+ # we check this at the end so that the other cleanup always happens
+ self.assertTrue(daemon_running, 'daemon died during the test')
+
def get_status(self):
return self.obj_session_presence_props.Get('org.gnome.SessionManager.Presence', 'status')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]