forked from ChicoState/TicTacToeBoard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
30 lines (27 loc) · 810 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
FROM ubuntu:xenial
MAINTAINER Kevin Buffardi (kbuffardi@csuchico.edu)
LABEL title="Unit Testing CPP"
LABEL version=0.1
ENV GTEST_REPO=/googletest
ENV GTEST_DIR=${GTEST_REPO}/googletest
ENV CXXFLAGS=-std=c++11
ENV WORKDIR=/usr/src
WORKDIR /usr/src
# Install dependencies
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive \
apt-get install -y \
build-essential \
g++ \
cmake \
git-all
# Setup GoogleTest
RUN git clone https://github.com/google/googletest ${GTEST_REPO} && \
mkdir ${GTEST_REPO}/build && \
cd ${GTEST_REPO}/build && \
cmake .. -DBUILD_GMOCK=OFF && \
make && \
make install && \
cd ${WORKDIR}
# Build and run tests
CMD ["sh","-c","sed -i -e 's/\r$//' test_runner.sh; ${WORKDIR}/test_runner.sh; gcov -r *.cpp"]