[gegl] tests: add mipmap testing folder



commit 3194f2a367ff4b404df250cd9803e187f6cf0bd8
Author: Øyvind Kolås <pippin gimp org>
Date:   Mon Jan 30 14:13:23 2017 +0100

    tests: add mipmap testing folder
    
    This new test folder is not part of the make check target, so one has to enter
    the folder and run make check manually.

 configure.ac                           |    1 +
 tests/mipmap/Makefile.am               |   13 +++++++++++++
 tests/mipmap/invert-crop-reference.png |  Bin 0 -> 12971 bytes
 tests/mipmap/invert-crop.sh            |   26 ++++++++++++++++++++++++++
 tests/mipmap/invert-reference.png      |  Bin 0 -> 60760 bytes
 tests/mipmap/invert.sh                 |   26 ++++++++++++++++++++++++++
 6 files changed, 66 insertions(+), 0 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index b20ed99..27a7cd1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1324,6 +1324,7 @@ tests/compositions/data/Makefile
 tests/ff-load-save/Makefile
 tests/python/Makefile
 tests/simple/Makefile
+tests/mipmap/Makefile
 tests/xml/Makefile
 tests/xml/data/Makefile
 perf/Makefile
diff --git a/tests/mipmap/Makefile.am b/tests/mipmap/Makefile.am
new file mode 100644
index 0000000..2468f9e
--- /dev/null
+++ b/tests/mipmap/Makefile.am
@@ -0,0 +1,13 @@
+# The tests
+
+EXTRA_DIST = invert.sh invert-crop.sh
+
+TESTS = $(EXTRA_DIST)
+
+check-TESTS: $(TESTS)
+       $(PYTHON) $(srcdir)/../run-tests.py \
+         --build-dir=$(top_builddir) --src-dir=$(top_srcdir) \
+         $(TESTS)
+
+clean-local:
+       rm -f test-exp-combine.hdr test-exp-combine-diff.png
diff --git a/tests/mipmap/invert-crop-reference.png b/tests/mipmap/invert-crop-reference.png
new file mode 100644
index 0000000..88cc211
Binary files /dev/null and b/tests/mipmap/invert-crop-reference.png differ
diff --git a/tests/mipmap/invert-crop.sh b/tests/mipmap/invert-crop.sh
new file mode 100755
index 0000000..cea154c
--- /dev/null
+++ b/tests/mipmap/invert-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-invert-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/invert-crop-output.png           \
+          -- invert crop x=147 y=66 width=200 height=200 \
+  && $abs_top_builddir/tools/gegl-imgcmp                           \
+          $abs_top_srcdir/tests/mipmap/invert-crop-reference.png \
+          $abs_top_builddir/tests/mipmap/invert-crop-output.png 10.0
+  failure=$?
+  #if [ $failure -eq 0 ]; then
+   # rm -f $abs_top_builddir/tests/mipmap/invert-crop-output.png
+  #fi
+fi
+
+exit $failure
+echo "WARNING: The result of this test is being ignored!"
+exit 0
diff --git a/tests/mipmap/invert-reference.png b/tests/mipmap/invert-reference.png
new file mode 100644
index 0000000..21d85b4
Binary files /dev/null and b/tests/mipmap/invert-reference.png differ
diff --git a/tests/mipmap/invert.sh b/tests/mipmap/invert.sh
new file mode 100755
index 0000000..7455654
--- /dev/null
+++ b/tests/mipmap/invert.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 invert 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/invert-output.png           \
+          -- invert \
+  && $abs_top_builddir/tools/gegl-imgcmp                           \
+          $abs_top_srcdir/tests/mipmap/invert-reference.png \
+          $abs_top_builddir/tests/mipmap/invert-output.png 10.0
+  failure=$?
+  if [ $failure -eq 0 ]; then
+    rm -f $abs_top_builddir/tests/mipmap/invert-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]