From 911d9094d8a8d1c89760850432a103e64a5baec3 Mon Sep 17 00:00:00 2001 From: Sarah Mei Date: Mon, 3 Oct 2011 21:58:00 -0500 Subject: [PATCH] Go back to copying in the /etc/init.d/xvfb script since the Travis workers apparently don't have it anymore. --- config/ci/before-travis.sh | 5 +++-- config/ci/xvfb | 28 ++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 config/ci/xvfb diff --git a/config/ci/before-travis.sh b/config/ci/before-travis.sh index 0122fc649..d46300e0e 100755 --- a/config/ci/before-travis.sh +++ b/config/ci/before-travis.sh @@ -5,12 +5,13 @@ export RUBY_HEAP_SLOTS_GROWTH_FACTOR=1 export RUBY_GC_MALLOC_LIMIT=1000000000 export RUBY_HEAP_FREE_MIN=500000 - # Start xvfb in preparation for cucumber & jasmine +echo "Starting Xvfb" +sudo cp config/ci/xvfb /etc/init.d/xvfb sh -e /etc/init.d/xvfb start # Regenerate css files -echo "Regenerate CSS files" +echo "Regenerating CSS files" bundle exec sass -q --update public/stylesheets/sass/:public/stylesheets/ # Create a database.yml for the right database diff --git a/config/ci/xvfb b/config/ci/xvfb new file mode 100644 index 000000000..97be37b90 --- /dev/null +++ b/config/ci/xvfb @@ -0,0 +1,28 @@ +# Copyright (c) 2010, Diaspora Inc. This file is +# licensed under the Affero General Public License version 3 or later. See +# the COPYRIGHT file. + +XVFB=/usr/bin/Xvfb +XVFBARGS=":99 -ac -screen 0 1024x768x16" +PIDFILE=/tmp/cucumber_xvfb_99.pid +case "$1" in + start) + echo -n "Starting virtual X frame buffer: Xvfb" + /sbin/start-stop-daemon --start --quiet --pidfile $PIDFILE --make-pidfile --background --exec $XVFB -- $XVFBARGS + echo "." + ;; + stop) + echo -n "Stopping virtual X frame buffer: Xvfb" + /sbin/start-stop-daemon --stop --quiet --pidfile $PIDFILE + rm -f $PIDFILE + echo "." + ;; + restart) + $0 stop + $0 start + ;; + *) + echo "Usage: /etc/init.d/xvfb {start|stop|restart}" + exit 1 +esac +exit 0 \ No newline at end of file