File: test-xvfb-display.patch

package info (click to toggle)
alttab 1.7.1-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,828 kB
  • sloc: ansic: 4,263; sh: 1,825; makefile: 17
file content (46 lines) | stat: -rw-r--r-- 1,127 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
Description: Export the DISPLAY variable for the test duration
 Make sure all the X clients started in the test run connect to the Xvfb instance.
Forwarded: https://github.com/sagb/alttab/pull/172
Author: Peter Pentchev <roam@ringlet.net>
Last-Update: 2024-06-07

--- a/test/run-in-xvfb.test
+++ b/test/run-in-xvfb.test
@@ -65,9 +65,10 @@
         sh -c "mkdir -p /tmp/.X11-unix ; chmod 1777 /tmp/.X11-unix" >/dev/null
     Xvfb :200 -ac &
     export xvfb=$!
+    export DISPLAY=:200
     for ms100 in `seq 1 50` ; do
         sleep 0.1
-        if DISPLAY=:200 xprop -root >/dev/null ; then
+        if xprop -root >/dev/null ; then
             return
         fi
     done
@@ -86,7 +87,7 @@
 
 start_alttab()
 {
-    DISPLAY=:200 "$ALTTAB" -w 0 -vv &
+    "$ALTTAB" -w 0 -vv &
     export alttab=$!
     sleep 1
 }
@@ -103,7 +104,7 @@
 {
     eyes=""
     for c in `seq 1 7` ; do
-        DISPLAY=:200 xeyes &
+        xeyes &
         eyes="${eyes} $!"
     done
     export eyes
@@ -120,7 +121,6 @@
 
 alttab_simple_cycle()
 {
-    DISPLAY=:200
     xdotool keydown Alt_L
     for c in $(seq 1 20); do
         sleep 0.1