update local tests

wip
jaseg 2022-06-21 13:54:29 +02:00
rodzic a01e44b142
commit bb8b28f86a
4 zmienionych plików z 37 dodań i 14 usunięć

Wyświetl plik

@ -2,8 +2,9 @@
FROM docker.io/archlinux:latest
MAINTAINER gerbolyze@jaseg.de
RUN pacman --noconfirm -Syu
RUN pacman --noconfirm -Sy pugixml opencv pango cairo git python make clang rustup cargo python-pip base-devel
RUN pacman --noconfirm -Sy pugixml opencv pango cairo git python make clang rustup cargo python-pip base-devel gerbv rsync
RUN python3 -m pip install pytest-parallel
RUN rustup install stable
RUN rustup default stable
RUN cargo install usvg
RUN cargo install usvg resvg

Wyświetl plik

@ -1,5 +1,7 @@
#!/bin/sh
pip3 install --user /data/gerbolyze-*.tar.gz --no-binary gerbolyze
/root/.local/bin/svg-flatten --clear-color black --dark-color white --format svg /data/test_svg_readme.svg /out/test_out.svg
set -e
rsync -av /data/git git
cd git
python3 -m pytest $@

Wyświetl plik

@ -2,6 +2,7 @@
FROM docker.io/ubuntu:latest
MAINTAINER gerbolyze@jaseg.de
RUN env DEBIAN_FRONTEND=noninteractive apt update -y
RUN env DEBIAN_FRONTEND=noninteractive apt install -y libopencv-dev libpugixml-dev libpangocairo-1.0-0 libpango1.0-dev libcairo2-dev clang make python3 git python3-wheel curl python3-pip python3-venv cargo
RUN cargo install usvg
RUN env DEBIAN_FRONTEND=noninteractive apt install -y libopencv-dev libpugixml-dev libpangocairo-1.0-0 libpango1.0-dev libcairo2-dev clang make python3 git python3-wheel curl python3-pip python3-venv cargo rsync gerbv
RUN cargo install usvg resvg
RUN python3 -m pip install numpy slugify lxml click pillow scipy sphinx pytest beautifulsoup4 pytest-parallel

Wyświetl plik

@ -2,13 +2,32 @@
set -e
python setup.py sdist build
cp dist/*.tar.gz podman/testdata
for distro in arch fedora debian ubuntu
do
podman build -t gerbolyze-$distro-testenv -f podman/$distro-testenv
mkdir -p /tmp/gerbolyze-test-out
podman run --mount type=bind,src=podman/testdata,dst=/data,ro --mount type=bind,src=/tmp/gerbolyze-test-out,dst=/out gerbolyze-$distro-testenv /data/testscript.sh
while [ $# -gt 0 ]; do
case $1 in
--parallel)
CONTAINER_ARGS="--workers auto $CONTAINER_ARGS"
shift;;
-x)
CONTAINER_ARGS="-x $CONTAINER_ARGS"
shift;;
--no-cache)
NO_CACHE=--no-cache
shift;;
*)
echo "Unknown argument \"$1\""
exit 1
shift;;
esac
done
mkdir -p podman/testdata/git
git ls-tree --full-tree -r HEAD --name-only | rsync -lptgoDv --delete . --files-from - podman/testdata/git/
#git clone --depth 1 . podman/testdata/git
for distro in ubuntu-old ubuntu arch
do
podman build $NO_CACHE -t gerbonara-$distro-testenv -f podman/$distro-testenv
mkdir -p /tmp/gerbonara-test-out
podman run --mount type=bind,src=podman/testdata,dst=/data,ro --mount type=bind,src=/tmp/gerbonara-test-out,dst=/out gerbonara-$distro-testenv /data/testscript.sh $CONTAINER_ARGS
done