Merge lp:~cypressyew/checkbox/brightness-tolerance into lp:checkbox

Proposed by Po-Hsu Lin
Status: Merged
Approved by: Sylvain Pineau
Approved revision: 4068
Merged at revision: 4078
Proposed branch: lp:~cypressyew/checkbox/brightness-tolerance
Merge into: lp:checkbox
Diff against target: 14 lines (+2/-2)
1 file modified
providers/plainbox-provider-checkbox/bin/brightness_test (+2/-2)
To merge this branch: bzr merge lp:~cypressyew/checkbox/brightness-tolerance
Reviewer Review Type Date Requested Status
Sylvain Pineau (community) Approve
Review via email: mp+275675@code.launchpad.net

Description of the change

Use the absolute difference for brightness and actual_brightness and a tolerance value (now is 1) to determine the pass / fail of the dim brightness test.

To post a comment you must log in.
Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

Thanks, +1

review: Approve
Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

The attempt to merge lp:~cypressyew/checkbox/brightness-tolerance into lp:checkbox failed. Below is the output from the failed tests.

[precise] starting container
[precise] (timing) 0.08user 0.07system 0:05.30elapsed 2%CPU (0avgtext+0avgdata 10196maxresident)k
[precise] (timing) 0inputs+32outputs (0major+8714minor)pagefaults 0swaps
[precise] provisioning container
[precise] Unable to provision requirements in container!
[precise] stdout: http://paste.ubuntu.com/12999405/
[precise] stderr: http://paste.ubuntu.com/12999406/
[precise] Fixing file permissions in source directory
[precise] Destroying failed container to reclaim resources
[trusty] starting container
[trusty] (timing) 0.08user 0.07system 0:05.33elapsed 3%CPU (0avgtext+0avgdata 10196maxresident)k
[trusty] (timing) 0inputs+32outputs (0major+8703minor)pagefaults 0swaps
[trusty] provisioning container
[trusty] Unable to provision requirements in container!
[trusty] stdout: http://paste.ubuntu.com/12999410/
[trusty] stderr: http://paste.ubuntu.com/12999411/
[trusty] Fixing file permissions in source directory
[trusty] Destroying failed container to reclaim resources

Destroying precise-testing failed
Destroying trusty-testing failed

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'providers/plainbox-provider-checkbox/bin/brightness_test'
--- providers/plainbox-provider-checkbox/bin/brightness_test 2014-03-20 14:01:58 +0000
+++ providers/plainbox-provider-checkbox/bin/brightness_test 2015-10-26 09:31:53 +0000
@@ -130,8 +130,8 @@
130 Note: this doesn't guarantee that screen brightness130 Note: this doesn't guarantee that screen brightness
131 changed.131 changed.
132 '''132 '''
133 if (self.get_actual_brightness(interface) !=133 if (abs(self.get_actual_brightness(interface) -
134 self.get_last_set_brightness(interface)):134 self.get_last_set_brightness(interface)) > 1):
135 return False135 return False
136 else:136 else:
137 return True137 return True

Subscribers

People subscribed via source and target branches