Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(169)

Unified Diff: client/site_tests/power_Backlight/power_Backlight.py

Issue 2127005: Fix race condition between screen locker and dpms in power_Backlight test. (Closed) Base URL: ssh://git@chromiumos-git/autotest.git
Patch Set: Re-upload Created 10 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/site_tests/power_Backlight/power_Backlight.py
diff --git a/client/site_tests/power_Backlight/power_Backlight.py b/client/site_tests/power_Backlight/power_Backlight.py
index 97c540706e27a72ccc3bd0e52e01bb6eaa6ee0d6..c031e50b60fcabf014049c977e435b8fac5b09e6 100644
--- a/client/site_tests/power_Backlight/power_Backlight.py
+++ b/client/site_tests/power_Backlight/power_Backlight.py
@@ -12,9 +12,16 @@ class power_Backlight(test.test):
def run_once(self, delay=60, seconds=10, tries=20):
- # disable screen locker and screen blanking
- # TODO(davidjames): Power manager should support this feature directly
+ # disable screen locker
os.system('stop screen-locker')
+
+ # disable screen blanking. Stopping screen-locker isn't
+ # synchronous :(. Add a sleep for now, till powerd comes around
+ # and fixes all this for us.
+ # TODO(davidjames): Power manager should support this feature directly
+ time.sleep(5)
+ site_ui.xsystem('xset s off')
+ site_ui.xsystem('xset dpms 0 0 0')
site_ui.xsystem('xset -dpms')
status = site_power_status.get_status()
@@ -49,7 +56,6 @@ class power_Backlight(test.test):
def cleanup(self):
- # re-enable screen locker and screen blanking
+ # Re-enable screen locker. This also re-enables dpms.
utils.system('start screen-locker')
- site_ui.xsystem('xset +dpms')
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698