File tree Expand file tree Collapse file tree 1 file changed +22
-16
lines changed
dev/tests/js/JsTestDriver Expand file tree Collapse file tree 1 file changed +22
-16
lines changed Original file line number Diff line number Diff line change 139
139
kill -9 $LSOF
140
140
fi
141
141
142
- DISPLAY_NUM=99
143
- ps -ef | egrep "[X]vfb.*:$DISPLAY_NUM"
144
- if [ $? -eq 0 ] ; then
145
- pkill Xvfb
142
+ # Skip Xvfb setup for OS X since there browsers do not support headless display that way
143
+ if [ "$(uname)" != "Darwin" ]; then
144
+ DISPLAY_NUM=99
145
+ ps -ef | egrep "[X]vfb.*:$DISPLAY_NUM"
146
+ if [ $? -eq 0 ] ; then
147
+ pkill Xvfb
148
+ fi
149
+
150
+ XVFB=`which Xvfb`
151
+ if [ "$?" -eq 1 ];
152
+ then
153
+ echo "Xvfb not found."
154
+ exit 1
155
+ fi
156
+
157
+ $XVFB :$DISPLAY_NUM -nolisten inet6 -ac &
158
+ PID_XVFB="$!" # take the process ID
159
+ export DISPLAY=:$DISPLAY_NUM # set display to use that of the Xvfb
146
160
fi
147
-
148
- XVFB=`which Xvfb`
149
- if [ "$?" -eq 1 ];
150
- then
151
- echo "Xvfb not found."
152
- exit 1
153
- fi
154
-
155
- $XVFB :$DISPLAY_NUM -nolisten inet6 -ac &
156
- PID_XVFB="$!" # take the process ID
157
- export DISPLAY=:$DISPLAY_NUM # set display to use that of the Xvfb
161
+
158
162
USER=`whoami`
159
163
SUDO=`which sudo`
160
164
161
165
# run the tests
162
166
$SUDO -u $USER ' . $ command . '
163
167
164
- kill -9 $PID_XVFB # shut down Xvfb (firefox will shut down cleanly by JsTestDriver)
168
+ if [ "$(uname)" != "Darwin" ]; then
169
+ kill -9 $PID_XVFB # shut down Xvfb (firefox will shut down cleanly by JsTestDriver)
170
+ fi
165
171
echo "Done." ' ;
166
172
167
173
fwrite ($ fh , $ shellCommand . PHP_EOL );
You can’t perform that action at this time.
0 commit comments