aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/docker/Dockerfile9
-rwxr-xr-xtools/docker/entrypoint.sh14
2 files changed, 8 insertions, 15 deletions
diff --git a/tools/docker/Dockerfile b/tools/docker/Dockerfile
index 31b2aae..68a62e1 100644
--- a/tools/docker/Dockerfile
+++ b/tools/docker/Dockerfile
@@ -13,8 +13,8 @@ ENV DEBIAN_FRONTEND noninteractive
ENV PYTHONUNBUFFERED 1
# System
-# trusty and findutils is for python3.4
-# xenial is for python3.5
+# trusty and findutils is for python3.4; xenial is for python3.5
+# TODO(stephenfin): Are curl, unzip required?
COPY tools/docker/trusty.list /etc/apt/sources.list.d/trusty.list
COPY tools/docker/xenial.list /etc/apt/sources.list.d/xenial.list
RUN apt-get update -qq && \
@@ -22,9 +22,8 @@ RUN apt-get update -qq && \
python-dev python-pip python-setuptools python-wheel \
python3.5-dev python3-pip python3-setuptools python3-wheel \
python3.4-dev findutils=4.4.2-7 python3.6-dev \
- libmysqlclient-dev mysql-client curl unzip xvfb chromium-chromedriver \
- chromium-browser build-essential git postgresql-client tzdata && \
- ln -s /usr/lib/chromium-browser/chromedriver /usr/bin/
+ libmysqlclient-dev mysql-client curl unzip build-essential \
+ git postgresql-client tzdata
# User
RUN useradd --uid=$UID --create-home patchwork
diff --git a/tools/docker/entrypoint.sh b/tools/docker/entrypoint.sh
index 4a89978..997b876 100755
--- a/tools/docker/entrypoint.sh
+++ b/tools/docker/entrypoint.sh
@@ -106,26 +106,20 @@ elif ! test_database; then
reset_data
fi
+# TODO(stephenfin): Deprecated the --test, --tox, --quick-test and --quick-tox
+# flags in a future release
if [ $# -eq 0 ]; then
# we probably ran with --reset and nothing else
# just exit cleanly
exit 0
elif [ "$1" == "--shell" ]; then
exec bash
-elif [ "$1" == "--quick-test" ]; then
+elif [ "$1" == "--test" ] || [ "$1" == "--quick-test" ]; then
shift
- export PW_SKIP_BROWSER_TESTS=yes
python3 manage.py test $@
-elif [ "$1" == "--test" ]; then
+elif [ "$1" == "--tox" ] || [ "$1" == "--quick-tox" ]; then
shift
- xvfb-run --server-args='-screen 0, 1024x768x16' python3 manage.py test $@
-elif [ "$1" == "--quick-tox" ]; then
- shift
- export PW_SKIP_BROWSER_TESTS=yes
tox $@
-elif [ "$1" == "--tox" ]; then
- shift
- xvfb-run --server-args='-screen 0, 1024x768x16' tox $@
else # run whatever CMD is set to
$@
fi