[gegl] tests: set GEGL_PATH for mipmap tests, add a test just unsharp-ing
- From: Øyvind Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] tests: set GEGL_PATH for mipmap tests, add a test just unsharp-ing
- Date: Mon, 30 Jan 2017 21:30:42 +0000 (UTC)
commit bcf2a04323167bfea1a2cfb55c059a34db3effc2
Author: Øyvind Kolås <pippin gimp org>
Date: Mon Jan 30 21:44:33 2017 +0100
tests: set GEGL_PATH for mipmap tests, add a test just unsharp-ing
operations/core/crop.c | 1 +
tests/mipmap/Makefile.am | 2 +-
tests/mipmap/invert-crop.sh | 2 +-
tests/mipmap/invert.sh | 2 +-
tests/mipmap/unsharp-crop.sh | 2 +-
tests/mipmap/unsharp-reference.png | Bin 0 -> 87354 bytes
tests/mipmap/unsharp.sh | 26 ++++++++++++++++++++++++++
7 files changed, 31 insertions(+), 4 deletions(-)
---
diff --git a/operations/core/crop.c b/operations/core/crop.c
index 1af88ff..7686529 100644
--- a/operations/core/crop.c
+++ b/operations/core/crop.c
@@ -52,6 +52,7 @@ property_boolean (reset_origin, _("Reset origin"), FALSE)
#include "gegl-op.h"
#include <math.h>
+#include <stdio.h>
static void
gegl_crop_prepare (GeglOperation *operation)
diff --git a/tests/mipmap/Makefile.am b/tests/mipmap/Makefile.am
index c54ee87..d323464 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
+EXTRA_DIST = invert.sh invert-crop.sh unsharp-crop.sh unsharp.sh
TESTS = $(EXTRA_DIST)
diff --git a/tests/mipmap/invert-crop.sh b/tests/mipmap/invert-crop.sh
index cea154c..7c0bc10 100755
--- a/tests/mipmap/invert-crop.sh
+++ b/tests/mipmap/invert-crop.sh
@@ -8,7 +8,7 @@ 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
\
+ 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/invert-crop-output.png \
-- invert crop x=147 y=66 width=200 height=200 \
diff --git a/tests/mipmap/invert.sh b/tests/mipmap/invert.sh
index 7455654..31a761a 100755
--- a/tests/mipmap/invert.sh
+++ b/tests/mipmap/invert.sh
@@ -8,7 +8,7 @@ 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
\
+ 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/invert-output.png \
-- invert \
diff --git a/tests/mipmap/unsharp-crop.sh b/tests/mipmap/unsharp-crop.sh
index 414345c..0c1f2b0 100755
--- a/tests/mipmap/unsharp-crop.sh
+++ b/tests/mipmap/unsharp-crop.sh
@@ -8,7 +8,7 @@ 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
\
+ 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/unsharp-crop-output.png \
-- unsharp-mask scale=10.0 crop x=147 y=66 width=200 height=200 \
diff --git a/tests/mipmap/unsharp-reference.png b/tests/mipmap/unsharp-reference.png
new file mode 100644
index 0000000..d3435d5
Binary files /dev/null and b/tests/mipmap/unsharp-reference.png differ
diff --git a/tests/mipmap/unsharp.sh b/tests/mipmap/unsharp.sh
new file mode 100755
index 0000000..50154e5
--- /dev/null
+++ b/tests/mipmap/unsharp.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 due to lack of gegl executable"
+ exit 77
+else
+ 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/unsharp-output.png \
+ -- unsharp-mask scale=10.0 \
+ && $abs_top_builddir/tools/gegl-imgcmp \
+ $abs_top_srcdir/tests/mipmap/unsharp-reference.png \
+ $abs_top_builddir/tests/mipmap/unsharp-output.png 10.0
+ failure=$?
+ #if [ $failure -eq 0 ]; then
+ # rm -f $abs_top_builddir/tests/mipmap/unsharp-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]