Skip to content

Commit

Permalink
Disable screen locking during autopilot test runs.
Browse files Browse the repository at this point in the history
Approved by Christopher Lee, Didier Roche, PS Jenkins bot.

(bzr r3307)
  • Loading branch information
Łukasz 'sil2100' Zemczak authored and Tarmac committed Apr 17, 2013
2 parents c2e14d6 + 0364503 commit 5999adf
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/autopilot/unity/tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
from Xlib import display
from Xlib import Xutil

from gi.repository import Gio

log = getLogger(__name__)

Expand All @@ -66,6 +67,12 @@ def setUp(self):
# ropey. Once it's been proven to work reliably we can remove this line:
self.set_unity_log_level("unity.wm.compiz", "DEBUG")

# For the length of the test, disable screen locking
self._desktop_settings = Gio.Settings.new("org.gnome.desktop.lockdown")
lock_state = self._desktop_settings.get_boolean("disable-lock-screen")
self._desktop_settings.set_boolean("disable-lock-screen", True)
self.addCleanup(self._desktop_settings.set_boolean, "disable-lock-screen", lock_state)

def check_test_behavior(self):
"""Fail the test if it did something naughty.
Expand Down

0 comments on commit 5999adf

Please sign in to comment.