Merge lp:~vanvugt/compiz-core/fix-994841 into lp:compiz-core/0.9.8

Proposed by Daniel van Vugt
Status: Merged
Approved by: Alan Griffiths
Approved revision: 3129
Merged at revision: 3130
Proposed branch: lp:~vanvugt/compiz-core/fix-994841
Merge into: lp:compiz-core/0.9.8
Diff against target: 32 lines (+10/-9)
1 file modified
scripts/run-with-xvfb.sh (+10/-9)
To merge this branch: bzr merge lp:~vanvugt/compiz-core/fix-994841
Reviewer Review Type Date Requested Status
Sam Spilsbury Approve
Alan Griffiths Approve
Review via email: mp+105020@code.launchpad.net

Description of the change

If running test cases under a real X server, we don't care if Xvfb is missing
(LP: #994841)

To post a comment you must log in.
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

Good

review: Approve
Revision history for this message
Sam Spilsbury (smspillaz) wrote :

Lgtm but we need to move that check into the cmake stage really so we ca diaable the tests rather than marking them passed (on another note - is there any reason for these to depend on X? Surelh you can mock out the xlib calls ....)

review: Approve
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I don't think most of the affected tests even need an X server at all. That's something that should be cleaned up separately.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'scripts/run-with-xvfb.sh'
--- scripts/run-with-xvfb.sh 2012-03-13 08:42:15 +0000
+++ scripts/run-with-xvfb.sh 2012-05-08 01:43:19 +0000
@@ -8,18 +8,19 @@
8 exit 18 exit 1
9fi9fi
1010
11xvfb=`which Xvfb`11# The script should still pass if you have a real Xserver and no Xvfb
12if [ ! -x "$xvfb" ]; then12if [ ! -z "$DISPLAY" ]; then
13 echo "Error: Xvfb does not seem to be installed."13 echo "Note: You are already running an Xserver."
14 exit 114 $1
15fi15else
16 xvfb=`which Xvfb`
17 if [ ! -x "$xvfb" ]; then
18 echo "Error: Xvfb does not seem to be installed."
19 exit 1
20 fi
1621
17if [ -z "$DISPLAY" ]; then
18 Xvfb -ac -noreset -screen 0 1024x768x16 -help 2>/dev/null 1>&222 Xvfb -ac -noreset -screen 0 1024x768x16 -help 2>/dev/null 1>&2
19 XID=`for id in 101 102 103 104 105 106 107 197 199 211 223 227 293 307 308 309 310 311 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 4703 4721 4723 4729 4733 4751 9973 9974 9975 9976 9977 9978 9979 9980 9981 9982 9983 9984 9985 9986 9987 9988 9989 9990 9991 9992 9993 9994 9995 9996 9997 9998 9999 ; do test -e /tmp/.X$id-lock || { echo $id; exit 0; }; done; echo "No Display ports available, quit."; exit 1`23 XID=`for id in 101 102 103 104 105 106 107 197 199 211 223 227 293 307 308 309 310 311 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 4703 4721 4723 4729 4733 4751 9973 9974 9975 9976 9977 9978 9979 9980 9981 9982 9983 9984 9985 9986 9987 9988 9989 9990 9991 9992 9993 9994 9995 9996 9997 9998 9999 ; do test -e /tmp/.X$id-lock || { echo $id; exit 0; }; done; echo "No Display ports available, quit."; exit 1`
20 { Xvfb -ac -noreset -screen 0 1024x768x16 :$XID -nolisten tcp -auth /dev/null >/dev/null 2>&1 & trap "kill -15 $! " 0 HUP INT QUIT TRAP USR1 PIPE TERM ; } || { echo "Gtk+Tests:ERROR: Failed to start Xvfb environment for X11 target tests."; exit 1; }24 { Xvfb -ac -noreset -screen 0 1024x768x16 :$XID -nolisten tcp -auth /dev/null >/dev/null 2>&1 & trap "kill -15 $! " 0 HUP INT QUIT TRAP USR1 PIPE TERM ; } || { echo "Gtk+Tests:ERROR: Failed to start Xvfb environment for X11 target tests."; exit 1; }
21 DISPLAY=:$XID $125 DISPLAY=:$XID $1
22else
23 echo "Note: You are already running an Xserver."
24 $1
25fi26fi

Subscribers

People subscribed via source and target branches