[gegl] tests: add another mipmap test



commit 39ea9fd5ff381f7dc2308016d6ecf54f226bff00
Author: Øyvind Kolås <pippin gimp org>
Date:   Mon Jan 30 15:08:46 2017 +0100

    tests: add another mipmap test

 tests/mipmap/Makefile.am                |    2 +-
 tests/mipmap/unsharp-crop-reference.png |  Bin 0 -> 17774 bytes
 tests/mipmap/unsharp-crop.sh            |   26 ++++++++++++++++++++++++++
 3 files changed, 27 insertions(+), 1 deletions(-)
---
diff --git a/tests/mipmap/Makefile.am b/tests/mipmap/Makefile.am
index 2468f9e..c54ee87 100644
--- a/tests/mipmap/Makefile.am
+++ b/tests/mipmap/Makefile.am
@@ -1,6 +1,6 @@
 # The tests
 
-EXTRA_DIST = invert.sh invert-crop.sh
+EXTRA_DIST = invert.sh invert-crop.sh unsharp-crop.sh
 
 TESTS = $(EXTRA_DIST)
 
diff --git a/tests/mipmap/unsharp-crop-reference.png b/tests/mipmap/unsharp-crop-reference.png
new file mode 100644
index 0000000..206059e
Binary files /dev/null and b/tests/mipmap/unsharp-crop-reference.png differ
diff --git a/tests/mipmap/unsharp-crop.sh b/tests/mipmap/unsharp-crop.sh
new file mode 100755
index 0000000..414345c
--- /dev/null
+++ b/tests/mipmap/unsharp-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-unsharp-crop due to lack of gegl executable"
+  exit 77
+else
+  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/unsharp-crop-output.png           \
+          -- unsharp-mask scale=10.0 crop x=147 y=66 width=200 height=200 \
+  && $abs_top_builddir/tools/gegl-imgcmp                           \
+          $abs_top_srcdir/tests/mipmap/unsharp-crop-reference.png \
+          $abs_top_builddir/tests/mipmap/unsharp-crop-output.png 10.0
+  failure=$?
+  #if [ $failure -eq 0 ]; then
+   # rm -f $abs_top_builddir/tests/mipmap/unsharp-crop-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]