-
Notifications
You must be signed in to change notification settings - Fork 128
/
Containerfile.tests.el8
18 lines (16 loc) · 1.16 KB
/
Containerfile.tests.el8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# this container definition is intended *only* for running the oz test suite, it is not
# a general-purpose oz container definition!
FROM quay.io/almalinuxorg/8-base:latest
RUN set -exo pipefail \
&& dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm \
&& dnf install -y --setopt install_weak_deps=false --nodocs \
python3-requests python3-cryptography python3-setuptools python3-libvirt python3-lxml python3-libguestfs python3-pytest python3-coverage python3-monotonic \
libvirt-daemon libvirt-daemon-kvm libvirt-daemon-driver-qemu libvirt-daemon-config-network systemd \
&& dnf clean all \
&& rm -rf /var/cache/* /var/log/dnf*
COPY ./ /oz
# the XML generation tests are inherently unreliable before Python 3.8,
# as there was no consistent ordering of XML element attributes. See
# https://docs.python.org/3/library/xml.etree.elementtree.html#xml.etree.ElementTree.tostring
RUN printf "#!/bin/sh\n/usr/sbin/libvirtd -d\ncd /oz\npython3 -m pytest -vv -k 'not test_xml_generation and not modify_libvirt_xml_for_serial' tests/" > /usr/local/bin/runtests.sh && chmod ugo+x /usr/local/bin/runtests.sh
CMD /usr/local/bin/runtests.sh