Skip to content
Snippets Groups Projects
Commit 0d3f08dd authored by david_williams's avatar david_williams
Browse files

improve xvfb scripts

parent 027ff8b5
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env bash
ulimit -n 2048
echo "ulimit: " `ulimit -n`
# remember to leave no slashes on filename in source command,
# (the commonVariations.shsource file, that is)
......@@ -11,29 +12,7 @@ then
source ${RELENG_CONTROL}/commonComputedVariables.shsource
fi
if [ -z $DISPLAYNUMBER ]
then
DISPLAYNUMBER=1001
fi
if [ -z $XVFBFONTPATH ]
then
XVFBFONTPATH=/usr/share/fonts/misc/
fi
# limit data space (ld) to 10m bytes.
# limit stack space (ls) to 1m bytes.
# limit number of open files (lf) to 20
# set connection time out to 60 seconds
XVFBSCREEN=${BUILD_HOME}/tmp
mkdir -p ${XVFBSCREEN}
/usr/bin/Xvfb :$DISPLAYNUMBER -screen 0 1600x1200x16 -fbdir "${XVFBSCREEN}" -fp "${XVFBFONTPATH}" -ld 10240 -ls 1024 -lf 20 -to 60 -reset &
echo $! > ccxvfb.pid
echo "ulimit: " `ulimit -n`
${RELENG_CONTROL}/xvfb-start.sh
jmxport="7000"
webport="7777"
......
......@@ -23,26 +23,4 @@ else
fi
echo;
PIDFILE=ccxvfb.pid
if [ -f ${PIDFILE} ] ; then
echo " Killing Xvfb process from PID file"
PID=`cat ${PIDFILE}`
kill -3 $PID
# if permission denied, for example, then be sure not to remove PID file
if [ $? ]
then
if kill -9 $PID ; then
echo " Xvfb process stopped"
rm -f ${PIDFILE}
else
echo " Xvfb process could not be stopped"
fi
else
echo " Could not kill the process."
fi
else
echo " PID file (${PIDFILE}) does not exist."
echo " Either Xvfb not running, or PID file has been deleted"
fi
echo;
./xvfb-stop.sh
#!/usr/bin/env bash
./xvfb-stop.sh
./xvfb-start.sh
#!/usr/bin/env bash
# remember to leave no slashes on filename in source command,
# (the commonVariations.shsource file, that is)
# so that users path is used to find it (first)
if [ -z $BUILD_INITIALIZED ]
then
source commonVariations.shsource
source ${RELENG_CONTROL}/commonComputedVariables.shsource
fi
if [ -z $DISPLAYNUMBER ]
then
DISPLAYNUMBER=1001
fi
if [ -z $XVFBFONTPATH ]
then
XVFBFONTPATH=/usr/share/fonts/misc/
fi
# limit data space (ld) to 10m bytes.
# limit stack space (ls) to 1m bytes.
# limit number of open files (lf) to 20
# set connection time out to 60 seconds
XVFBSCREEN=${BUILD_HOME}/tmp
mkdir -p ${XVFBSCREEN}
Xvfb :$DISPLAYNUMBER -screen 0 1600x1200x16 -fbdir "${XVFBSCREEN}" -fp "${XVFBFONTPATH}" -ld 10240 -ls 1024 -lf 20 -to 60 -reset -bs &
XVFBPID=$!
echo $XVFBPID > ccxvfb.pid
echo "DISPLAYNUMBER: " $DISPLAYNUMBER;
echo "XVFBFONTPATH: " $XVFBFONTPATH;
echo "XVFBSCREEN: " $XVFBSCREEN;
echo "XVFBPID: " $XVFBPID;
#!/usr/bin/env bash
PIDFILE=ccxvfb.pid
if [ -f ${PIDFILE} ] ; then
echo " Killing Xvfb process from PID file"
PID=`cat ${PIDFILE}`
kill -3 $PID
# if permission denied, for example, then be sure not to remove PID file
if [ $? ]
then
if kill -9 $PID ; then
echo " Xvfb process stopped"
rm -f ${PIDFILE}
else
echo " Xvfb process could not be stopped"
fi
else
echo " Could not kill the process."
fi
else
echo " PID file (${PIDFILE}) does not exist."
echo " Either Xvfb not running, or PID file has been deleted"
fi
echo;
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment