Skip to content

Commit

Permalink
Abstract xvfb into linux only
Browse files Browse the repository at this point in the history
  • Loading branch information
tgsmith61591 committed Jul 7, 2017
1 parent c330885 commit 4594ab3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
6 changes: 1 addition & 5 deletions .travis.yml
Expand Up @@ -73,11 +73,7 @@ matrix:
DEPLOY=false CACHEC=true

install: source build_tools/travis/install.sh
before_script:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- sleep 5 # give xvfb some time to start by sleeping for 5 seconds

before_script: bash build_tools/travis/before_script.sh
script: bash build_tools/travis/test_script.sh
after_success: source build_tools/travis/after_success.sh

Expand Down
10 changes: 10 additions & 0 deletions build_tools/travis/before_script.sh
@@ -0,0 +1,10 @@
#!/usr/bin/env bash

set -e

# if it's a linux build, we need to sleep before test:
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
export DISPLAY=:99.0
sh -e /etc/init.d/xvfb start
sleep 5 # give xvfb some time to start by sleeping for 5 seconds
fi

0 comments on commit 4594ab3

Please sign in to comment.