-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Dockerfile and bash script to more easily run tests (s3ql#198)
- Loading branch information
Showing
4 changed files
with
65 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
*.pyc | ||
__pycache__ | ||
*/__pycache__ | ||
*/*/__pycache__ | ||
*/*/*/__pycache__ | ||
/.project | ||
/.pydevproject | ||
/.settings | ||
/.idea | ||
/build/ | ||
/contrib/expire_backups.1 | ||
/contrib/pcp.1 | ||
/dist/ | ||
/doc/ | ||
/rst/autogen/ | ||
/s3ql.old/ | ||
/src/s3ql.egg-info/ | ||
/src/s3ql/deltadump.*.so | ||
/src/s3ql/deltadump.c | ||
/tests/.cache/ | ||
/tests/.pytest_cache/ | ||
/tests/test.log | ||
/tests/test_crit.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# This is not a general purpose Dockerfile | ||
# It's tailored for running tests and building documentation. | ||
|
||
FROM ubuntu:bionic AS build | ||
ENV DEBIAN_FRONTEND noninteractive | ||
|
||
RUN apt-get update \ | ||
&& apt-get dist-upgrade -y \ | ||
&& apt-get install -y fakeroot curl dpkg-dev build-essential manpages pbuilder aptitude rsync \ | ||
git libbz2-dev libssl-dev libreadline-dev libffi-dev libsqlite3-dev \ | ||
zlib1g-dev libsqlite3-dev wget curl llvm libncurses5-dev xz-utils libxml2-dev libxmlsec1-dev liblzma-dev \ | ||
libsystemd-dev gcc psmisc pkg-config libattr1-dev libsqlite3-dev libjs-sphinxdoc texlive-latex-base \ | ||
texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended python3-pip python3-setuptools \ | ||
ninja-build udev libudev1 libudev-dev \ | ||
&& mkdir /build \ | ||
&& ln -sf /usr/bin/pip3 /usr/bin/pip && ln -sf /usr/bin/python3 /usr/bin/python \ | ||
&& pip install "setuptools >= 40.3.0" | ||
|
||
ADD tests/travis-install.sh /travis-install.sh | ||
RUN /travis-install.sh | ||
|
||
ADD . /build | ||
WORKDIR /build | ||
RUN python setup.py build_cython \ | ||
&& python setup.py build_ext --inplace \ | ||
&& python setup.py test \ | ||
&& python setup.py build_sphinx \ | ||
&& python setup.py install | ||
|
||
FROM scratch AS export | ||
COPY --from=build /build/doc/ /doc/ | ||
COPY --from=build /build/src/s3ql/deltadump.c /src/s3ql/deltadump.c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/usr/bin/env bash | ||
|
||
# always use S3QL source root as working dir | ||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | ||
cd "$DIR/.." || exit 1 | ||
|
||
# run tests in docker and copy documentation to /build/ | ||
# use BuildKit when available so that the --output option works on macOS | ||
DOCKER_BUILDKIT=1 docker build -f ./tests/Dockerfile -o "./build" . |