[gegl] tests: add more mipmap rendering tests



commit c0894bb1742854cf5d1b3d8be91ea87381d0bd5d
Author: Øyvind Kolås <pippin gimp org>
Date:   Wed Feb 22 21:24:22 2017 +0100

    tests: add more mipmap rendering tests

 tests/mipmap/Makefile.am               |    2 +-
 tests/mipmap/rotate-crop-reference.png |  Bin 0 -> 15381 bytes
 tests/mipmap/rotate-crop.sh            |   26 ++++++++++++++++++++++++++
 tests/mipmap/rotate-reference.png      |  Bin 0 -> 80769 bytes
 tests/mipmap/rotate.sh                 |   26 ++++++++++++++++++++++++++
 5 files changed, 53 insertions(+), 1 deletions(-)
---
diff --git a/tests/mipmap/Makefile.am b/tests/mipmap/Makefile.am
index cb3e2da..af7af8e 100644
--- a/tests/mipmap/Makefile.am
+++ b/tests/mipmap/Makefile.am
@@ -1,6 +1,6 @@
 # The tests
 
-EXTRA_DIST = invert.sh invert-crop.sh unsharp-crop.sh unsharp.sh
+EXTRA_DIST = invert.sh invert-crop.sh unsharp-crop.sh unsharp.sh rotate.sh rotate-crop.sh
 
 TESTS = $(EXTRA_DIST)
 
diff --git a/tests/mipmap/rotate-crop-reference.png b/tests/mipmap/rotate-crop-reference.png
new file mode 100644
index 0000000..b1a5f9f
Binary files /dev/null and b/tests/mipmap/rotate-crop-reference.png differ
diff --git a/tests/mipmap/rotate-crop.sh b/tests/mipmap/rotate-crop.sh
new file mode 100755
index 0000000..06338f1
--- /dev/null
+++ b/tests/mipmap/rotate-crop.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+# Set by TESTS_ENVIRONMENT in Makefile.am
+abs_top_srcdir=$ABS_TOP_SRCDIR
+abs_top_builddir=$ABS_TOP_BUILDDIR
+
+if [ ! -f $abs_top_builddir/bin/gegl ]; then
+  echo "Skipping test-rotate-crop due to lack of gegl executable"
+  exit 77
+else
+  GEGL_TILE_SIZE=8x8 GEGL_PATH=$abs_top_builddir/operations GEGL_USE_OPENCL=no GEGL_MIPMAP_RENDERING=1 
$abs_top_builddir/bin/gegl                                       \
+          -s 0.33 $abs_top_srcdir/tests/compositions/data/car-stack.png -o      \
+          $abs_top_builddir/tests/mipmap/rotate-crop-output.png           \
+          -- rotate degrees=15.0 crop x=147 y=66 width=200 height=200 \
+  && $abs_top_builddir/tools/gegl-imgcmp                           \
+          $abs_top_srcdir/tests/mipmap/rotate-crop-reference.png \
+          $abs_top_builddir/tests/mipmap/rotate-crop-output.png 10.0
+  failure=$?
+  #if [ $failure -eq 0 ]; then
+   # rm -f $abs_top_builddir/tests/mipmap/rotate-crop-output.png
+  #fi
+fi
+
+exit $failure
+echo "WARNING: The result of this test is being ignored!"
+exit 0
diff --git a/tests/mipmap/rotate-reference.png b/tests/mipmap/rotate-reference.png
new file mode 100644
index 0000000..62b2d85
Binary files /dev/null and b/tests/mipmap/rotate-reference.png differ
diff --git a/tests/mipmap/rotate.sh b/tests/mipmap/rotate.sh
new file mode 100755
index 0000000..ceed5f1
--- /dev/null
+++ b/tests/mipmap/rotate.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+# Set by TESTS_ENVIRONMENT in Makefile.am
+abs_top_srcdir=$ABS_TOP_SRCDIR
+abs_top_builddir=$ABS_TOP_BUILDDIR
+
+if [ ! -f $abs_top_builddir/bin/gegl ]; then
+  echo "Skipping test-rotate due to lack of gegl executable"
+  exit 77
+else
+  GEGL_TILE_SIZE=8x8 GEGL_PATH=$abs_top_builddir/operations GEGL_USE_OPENCL=no GEGL_MIPMAP_RENDERING=1 
$abs_top_builddir/bin/gegl                                       \
+          -s 0.33 $abs_top_srcdir/tests/compositions/data/car-stack.png -o      \
+          $abs_top_builddir/tests/mipmap/rotate-output.png           \
+          -- rotate degrees=10.0  \
+  && $abs_top_builddir/tools/gegl-imgcmp                           \
+          $abs_top_srcdir/tests/mipmap/rotate-reference.png \
+          $abs_top_builddir/tests/mipmap/rotate-output.png 20.0
+  failure=$?
+  #if [ $failure -eq 0 ]; then
+   # rm -f $abs_top_builddir/tests/mipmap/rotate-output.png
+  #fi
+fi
+
+exit $failure
+echo "WARNING: The result of this test is being ignored!"
+exit 0


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]