Skip to content

Commit

Permalink
#97: clean up some ci files
Browse files Browse the repository at this point in the history
  • Loading branch information
tlamonthezie committed Sep 12, 2024
1 parent 03aca6f commit eaa8586
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 100 deletions.
76 changes: 0 additions & 76 deletions .github/workflows/pushbasedockerimage_ubuntu_any-py_3.all.yml

This file was deleted.

3 changes: 0 additions & 3 deletions ci/docker/build-and-test-ubuntu.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ RUN mkdir -p /opt/src/vt-tv/output/python_tests
RUN VTK_DIR=/opt/build/vtk bash /opt/src/vt-tv/ci/python_build.sh
RUN VTK_DIR=/opt/build/vtk bash /opt/src/vt-tv/ci/python_test.sh

# CI test script run
RUN DEBUG=ON ACTUAL=/opt/src/vt-tv/output/tests/default0.png EXPECTED=/opt/src/vt-tv/tests/expected/default/default0.png TOLERANCE=0.1 /opt/src/vt-tv/tests/test_image.sh

# Artifacts
FROM scratch AS artifacts
COPY --from=test-cpp /tmp/artifacts /tmp/artifacts
Expand Down
21 changes: 0 additions & 21 deletions tests/test_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,36 +8,19 @@ PARENT_DIR="$(dirname "$CURRENT_DIR")"
ACTUAL=${ACTUAL:-$PARENT_DIR/output/tests/ccm_example0.png}
EXPECTED=${EXPECTED:-$CURRENT_DIR/expected/ccm_example0.png}
TOLERANCE=${TOLERANCE:-0.1}
DEBUG=${DEBUG:-"OFF"}

if [ $DEBUG == "ON" ]; then
set -ex
fi

if [ ! -f "$ACTUAL" ]; then
echo "Image not found at "$ACTUAL
exit 1
fi

if [ $DEBUG == "ON" ]; then
echo "ACTUAL image found !"
fi

if [ ! -f "$EXPECTED" ]; then
echo "Image not found at "$EXPECTED
exit 1
fi

if [ $DEBUG == "ON" ]; then
echo "EXPECTED image found !"
fi

pip install imgcompare --quiet 2>/dev/null

if [ $DEBUG == "ON" ]; then
echo "imgcompare package installed !"
fi

DIFF=$(printf "%.2f" $(python -c 'import imgcompare; print(imgcompare.image_diff_percent("'$ACTUAL'", "'$EXPECTED'"));'))
if { echo $TOLERANCE ; echo $DIFF ; } | sort -n -c 2>/dev/null; then
echo "Image diff = $DIFF%. Tolerance = $TOLERANCE. FAILED"
Expand All @@ -46,8 +29,4 @@ else
echo "Image diff = $DIFF%. Tolerance = $TOLERANCE. OK"
fi

if [ $DEBUG == "ON" ]; then
echo "Success!"
fi

exit 0

0 comments on commit eaa8586

Please sign in to comment.