From d5a9d916e663c0c17b4837d2caf53c8d751ea631 Mon Sep 17 00:00:00 2001
From: Ramon Novoa <rnovoa@artica.es>
Date: Fri, 16 Sep 2016 12:19:36 +0200
Subject: [PATCH] Start Xvfb on the Travis CI environment.

---
 .travis.yml | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/.travis.yml b/.travis.yml
index 4fe5efb2b6..a48959cef7 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -16,6 +16,11 @@ before_install:
 install:
   - pip install selenium PyVirtualDisplay testtools
 
+before_script:
+  - "export DISPLAY=:99.0"
+  - "sh -e /etc/init.d/xvfb start"
+  - sleep 3 # give xvfb some time to start
+
 script:
   - docker run --name pandorafms -h pandorafms -dt -v "$TRAVIS_BUILD_DIR:/tmp/pandorafms" -p 127.0.0.1:80:80 pandorafms/pandorafms-base tail -f /var/log/messages
   - docker exec -t pandorafms /tmp/pandorafms/tests/test.sh