Merge lp:~sylvain-pineau/checkbox/fix-1447466 into lp:checkbox

Proposed by Sylvain Pineau
Status: Merged
Approved by: Maciej Kisielewski
Approved revision: 3720
Merged at revision: 3720
Proposed branch: lp:~sylvain-pineau/checkbox/fix-1447466
Merge into: lp:checkbox
Diff against target: 14 lines (+2/-2)
1 file modified
providers/plainbox-provider-checkbox/jobs/graphics.txt.in (+2/-2)
To merge this branch: bzr merge lp:~sylvain-pineau/checkbox/fix-1447466
Reviewer Review Type Date Requested Status
Maciej Kisielewski Approve
Review via email: mp+257345@code.launchpad.net

Description of the change

A fix for the linked bug (to escape subshell commands in the generator job)

To post a comment you must log in.
Revision history for this message
Maciej Kisielewski (kissiel) wrote :

Nice inline python :)
+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'providers/plainbox-provider-checkbox/jobs/graphics.txt.in'
2--- providers/plainbox-provider-checkbox/jobs/graphics.txt.in 2015-04-16 14:23:08 +0000
3+++ providers/plainbox-provider-checkbox/jobs/graphics.txt.in 2015-04-24 10:16:09 +0000
4@@ -146,8 +146,8 @@
5 device.category == 'VIDEO'
6 package.name == 'zenity'
7 command:
8- maxi="$(xrandr -q |grep -A 1 "connected\( primary\)* [0-9]" |tail -1 |awk '{print $1}')"
9- now="$(xdpyinfo | grep dimension | awk '{print $2}')"
10+ maxi="\$(xrandr -q |grep -A 1 "connected\( primary\)* [0-9]" |tail -1 |awk '{print \$1}')"
11+ now="\$(python3 -c 'from gi.repository import Gdk; screen=Gdk.Screen.get_default(); geo = screen.get_monitor_geometry(screen.get_primary_monitor()); print(geo.width, "x", geo.height, sep="")')"
12 test "\$maxi" != "\$now" && notify="\nPlease switch to the maximum resolution \nfor every graphic tests"
13 zenity --info --text "Maximum resolution: \$maxi\nCurrent resolution: \$now \$notify"
14 estimated_duration: 10.0

Subscribers

People subscribed via source and target branches