Commit 2aa539bb authored by Michał Kępień's avatar Michał Kępień

Install Python test prerequisites in all images

With the introduction of Python-based system tests in BIND, all
operating system images used in GitLab CI should now have pytest and the
"requests" module installed.  Additionally, the pip tool should also be
available to facilitate prototyping tests in merge requests by
eliminating the need to install pip in each CI job.
parent 55e37c1a
...@@ -32,6 +32,8 @@ RUN apk add \ ...@@ -32,6 +32,8 @@ RUN apk add \
perl-xml-simple \ perl-xml-simple \
py3-dnspython \ py3-dnspython \
py3-ply \ py3-ply \
py3-pytest \
py3-requests \
python3 \ python3 \
tzdata tzdata
RUN apk add \ RUN apk add \
......
...@@ -39,20 +39,29 @@ RUN if [ "@VERSION@" = "centos8" ]; then yum -y install \ ...@@ -39,20 +39,29 @@ RUN if [ "@VERSION@" = "centos8" ]; then yum -y install \
diffutils \ diffutils \
python3 \ python3 \
python3-dns \ python3-dns \
python3-pip \
python3-ply \ python3-ply \
python3-pytest \
python3-requests \
sqlite-devel \ sqlite-devel \
; fi ; fi
RUN if [ "@VERSION@" = "centos7" ]; then yum -y install \ RUN if [ "@VERSION@" = "centos7" ]; then yum -y install \
GeoIP-devel \ GeoIP-devel \
file \ file \
libuv-devel \ libuv-devel \
python-dns \ python36-dns \
python-ply \ python36-pip \
python36-ply \
python36-pytest \
python36-requests \
sqlite-devel \ sqlite-devel \
; fi ; fi
RUN if [ "@VERSION@" = "centos6" ]; then yum -y install \ RUN if [ "@VERSION@" = "centos6" ]; then yum -y install \
GeoIP-devel \ GeoIP-devel \
python34-pip \
python34-ply \ python34-ply \
python34-pytest \
python34-requests \
python34-setuptools \ python34-setuptools \
; fi ; fi
RUN if [ "@DNSTAP@" = "yes" ]; then yum -y install fstrm-devel protobuf-c-devel; fi RUN if [ "@DNSTAP@" = "yes" ]; then yum -y install fstrm-devel protobuf-c-devel; fi
......
...@@ -67,8 +67,11 @@ RUN apt-get -y install \ ...@@ -67,8 +67,11 @@ RUN apt-get -y install \
pkg-config \ pkg-config \
procps \ procps \
python3 \ python3 \
python3-ply \
python3-dnspython \ python3-dnspython \
python3-pip \
python3-ply \
python3-pytest \
python3-requests \
python3-sphinx \ python3-sphinx \
python3-sphinx-rtd-theme \ python3-sphinx-rtd-theme \
sudo \ sudo \
...@@ -78,7 +81,10 @@ RUN apt-get -y install \ ...@@ -78,7 +81,10 @@ RUN apt-get -y install \
RUN if [ "@VERSION@" = "buster" ]; then apt-get -y install \ RUN if [ "@VERSION@" = "buster" ]; then apt-get -y install \
python \ python \
python-dnspython \ python-dnspython \
python-pip \
python-ply \ python-ply \
python-pytest \
python-requests \
; fi ; fi
RUN if [ "@ABI_CHECK@" = "yes" ]; then \ RUN if [ "@ABI_CHECK@" = "yes" ]; then \
apt-get -y install abi-compliance-checker abi-dumper w3m; \ apt-get -y install abi-compliance-checker abi-dumper w3m; \
...@@ -97,10 +103,10 @@ RUN if [ "@CLANG@" -ge "9" ] 2>/dev/null; then \ ...@@ -97,10 +103,10 @@ RUN if [ "@CLANG@" -ge "9" ] 2>/dev/null; then \
clang-tidy-@CLANG@; \ clang-tidy-@CLANG@; \
fi fi
RUN if [ "@COCCINELLE@" = "yes" ]; then apt-get -y install coccinelle; fi RUN if [ "@COCCINELLE@" = "yes" ]; then apt-get -y install coccinelle; fi
RUN if [ "@COMPILEDB@" = "yes" ]; then apt-get -y install python3-pip && pip3 install compiledb; fi RUN if [ "@COMPILEDB@" = "yes" ]; then pip3 install compiledb; fi
RUN if [ "@CPPCHECK@" = "yes" ]; then apt-get -y install cppcheck; fi RUN if [ "@CPPCHECK@" = "yes" ]; then apt-get -y install cppcheck; fi
RUN if [ "@DNSTAP@" = "yes" ]; then apt-get -y install libfstrm-dev libprotobuf-c-dev protobuf-c-compiler; fi RUN if [ "@DNSTAP@" = "yes" ]; then apt-get -y install libfstrm-dev libprotobuf-c-dev protobuf-c-compiler; fi
RUN if [ "@PYTHON_QA@" = "yes" ]; then apt-get -y install python3-pip && pip3 install flake8==3.8.1 pylint==2.5.2; fi RUN if [ "@PYTHON_QA@" = "yes" ]; then pip3 install flake8==3.8.1 pylint==2.5.2; fi
RUN if [ "@RESPDIFF@" = "yes" ]; then apt-get -y install python3-dpkt python3-lmdb python3-numpy python3-scipy python3-tabulate; fi RUN if [ "@RESPDIFF@" = "yes" ]; then apt-get -y install python3-dpkt python3-lmdb python3-numpy python3-scipy python3-tabulate; fi
RUN if [ "@SHELLCHECK@" = "yes" ]; then apt-get -y install shellcheck; fi RUN if [ "@SHELLCHECK@" = "yes" ]; then apt-get -y install shellcheck; fi
RUN if [ "@SOFTHSM@" -ge "2" ] 2>/dev/null; then apt-get -y install libsofthsm2 softhsm2; fi RUN if [ "@SOFTHSM@" -ge "2" ] 2>/dev/null; then apt-get -y install libsofthsm2 softhsm2; fi
......
...@@ -32,7 +32,10 @@ RUN dnf -y install \ ...@@ -32,7 +32,10 @@ RUN dnf -y install \
perl-XML-Simple \ perl-XML-Simple \
procps-ng \ procps-ng \
python-dns \ python-dns \
python-ply python-pip \
python-ply \
python-pytest \
python-requests
RUN if [ "@SOFTHSM@" -ge "2" ] 2>/dev/null; then dnf -y install softhsm; fi RUN if [ "@SOFTHSM@" -ge "2" ] 2>/dev/null; then dnf -y install softhsm; fi
RUN dnf -y install \ RUN dnf -y install \
gcc-c++ \ gcc-c++ \
......
...@@ -34,7 +34,10 @@ RUN zypper -n install \ ...@@ -34,7 +34,10 @@ RUN zypper -n install \
perl-XML-Simple \ perl-XML-Simple \
procps \ procps \
python3-dnspython \ python3-dnspython \
python3-pip \
python3-ply \ python3-ply \
python3-pytest \
python3-requests \
sqlite3-devel \ sqlite3-devel \
system-user-nobody \ system-user-nobody \
timezone timezone
......
...@@ -6,7 +6,7 @@ echo "kern.corefile=core.%P" >> /etc/sysctl.conf ...@@ -6,7 +6,7 @@ echo "kern.corefile=core.%P" >> /etc/sysctl.conf
sysrc hostname="freebsd" sysrc hostname="freebsd"
ASSUME_ALWAYS_YES=yes pkg install bash cmocka fstrm gdb git json-c libmaxminddb libuv libxml2 p5-Net-DNS pkgconf protobuf-c py37-dnspython py37-ply sudo ASSUME_ALWAYS_YES=yes pkg install bash cmocka fstrm gdb git json-c libmaxminddb libuv libxml2 p5-Net-DNS pkgconf protobuf-c py37-dnspython py37-pip py37-ply py37-pytest py37-requests sudo
# Prefer GDB from ports # Prefer GDB from ports
if [ -x /usr/bin/gdb ]; then if [ -x /usr/bin/gdb ]; then
......
...@@ -5,7 +5,7 @@ set -e -v ...@@ -5,7 +5,7 @@ set -e -v
echo "set timeout 1" >> /etc/boot.conf echo "set timeout 1" >> /etc/boot.conf
sed -i "s/rw/rw,softdep/" /etc/fstab sed -i "s/rw/rw,softdep/" /etc/fstab
pkg_add bash cmocka git json-c libmaxminddb libuv libxml lmdb p5-Net-DNS py3-dnspython py3-ply sudo-- pkg_add bash cmocka git json-c libmaxminddb libuv libxml lmdb p5-Net-DNS py3-dnspython py3-pip py3-ply py3-requests py3-test sudo--
echo "gitlab-runner ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers echo "gitlab-runner ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment