kopia lustrzana https://github.com/jaseg/gerbolyze
update local tests
rodzic
a01e44b142
commit
bb8b28f86a
|
@ -2,8 +2,9 @@
|
||||||
FROM docker.io/archlinux:latest
|
FROM docker.io/archlinux:latest
|
||||||
MAINTAINER gerbolyze@jaseg.de
|
MAINTAINER gerbolyze@jaseg.de
|
||||||
RUN pacman --noconfirm -Syu
|
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 install stable
|
||||||
RUN rustup default stable
|
RUN rustup default stable
|
||||||
RUN cargo install usvg
|
RUN cargo install usvg resvg
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
pip3 install --user /data/gerbolyze-*.tar.gz --no-binary gerbolyze
|
set -e
|
||||||
/root/.local/bin/svg-flatten --clear-color black --dark-color white --format svg /data/test_svg_readme.svg /out/test_out.svg
|
rsync -av /data/git git
|
||||||
|
cd git
|
||||||
|
|
||||||
|
python3 -m pytest $@
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
FROM docker.io/ubuntu:latest
|
FROM docker.io/ubuntu:latest
|
||||||
MAINTAINER gerbolyze@jaseg.de
|
MAINTAINER gerbolyze@jaseg.de
|
||||||
RUN env DEBIAN_FRONTEND=noninteractive apt update -y
|
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 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
|
RUN cargo install usvg resvg
|
||||||
|
RUN python3 -m pip install numpy slugify lxml click pillow scipy sphinx pytest beautifulsoup4 pytest-parallel
|
||||||
|
|
||||||
|
|
35
run-tests.sh
35
run-tests.sh
|
@ -2,13 +2,32 @@
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
python setup.py sdist build
|
while [ $# -gt 0 ]; do
|
||||||
cp dist/*.tar.gz podman/testdata
|
case $1 in
|
||||||
|
--parallel)
|
||||||
for distro in arch fedora debian ubuntu
|
CONTAINER_ARGS="--workers auto $CONTAINER_ARGS"
|
||||||
do
|
shift;;
|
||||||
podman build -t gerbolyze-$distro-testenv -f podman/$distro-testenv
|
-x)
|
||||||
mkdir -p /tmp/gerbolyze-test-out
|
CONTAINER_ARGS="-x $CONTAINER_ARGS"
|
||||||
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
|
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
|
done
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue