scripts for running linux tests with docker

This commit is contained in:
Konstantin Käfer
2015-03-13 12:05:51 +01:00
parent 5225a2ce5b
commit 5e40f72b7c
11 changed files with 101 additions and 16 deletions

19
docker/linux/Dockerfile Normal file
View File

@@ -0,0 +1,19 @@
FROM ubuntu:12.04
RUN apt-get update -y && \
apt-get install -y build-essential git-core python-pip python-software-properties software-properties-common && \
rm -rf /var/lib/apt/lists/*
RUN add-apt-repository --yes ppa:ubuntu-toolchain-r/test && \
add-apt-repository --yes ppa:boost-latest/ppa && \
apt-get update -y && \
apt-get -y install gcc-4.8 g++-4.8 curl zlib1g-dev automake gdb libtool xutils-dev make cmake pkg-config python-pip libboost1.55-dev libcurl4-openssl-dev libpng-dev libsqlite3-dev mesa-utils libxi-dev x11proto-randr-dev x11proto-xext-dev libxrandr-dev x11proto-xf86vidmode-dev libxxf86vm-dev libxcursor-dev libxinerama-dev xvfb llvm-3.4 && \
pip install awscli
RUN apt-get install -y imagemagick
RUN useradd -ms /bin/bash mapbox
USER mapbox
ENV HOME /home/mapbox
WORKDIR /home/mapbox

15
docker/linux/run-clang.sh Normal file
View File

@@ -0,0 +1,15 @@
#!/usr/bin/env bash
set -e
set -o pipefail
docker build \
-t mapbox/gl-native:linux \
docker/linux
docker run \
-i \
-e "CXX=clang++" \
-v `pwd`:/home/mapbox/build \
-t mapbox/gl-native:linux \
build/docker/linux/test.sh

15
docker/linux/run-gcc.sh Executable file
View File

@@ -0,0 +1,15 @@
#!/usr/bin/env bash
set -e
set -o pipefail
docker build \
-t mapbox/gl-native:linux \
docker/linux
docker run \
-i \
-e "CXX=g++" \
-v `pwd`:/home/mapbox/build \
-t mapbox/gl-native:linux \
build/docker/linux/test.sh

26
docker/linux/test.sh Executable file
View File

@@ -0,0 +1,26 @@
#!/usr/bin/env bash
set -e
set -o pipefail
export TRAVIS_OS_NAME=linux
cd build
source ./scripts/local_mason.sh
mason install mesa 10.4.3
export LD_LIBRARY_PATH=`mason prefix mesa 10.4.3`/lib
export DISPLAY=:99.0
Xvfb :99 -ac -screen 0 1024x768x24 &
if [[ ${CXX} == "g++" ]]; then
export CXX="g++-4.8"
export CC="gcc-4.8"
fi
source ./scripts/install_node.sh
make linux -j`nproc`
make test-* -j`nproc`
./scripts/compare_images.sh