[gegl] tests: mipmap - migrate to new test runner - bring all of the test configuration into meson
- From: Øyvind "pippin" Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] tests: mipmap - migrate to new test runner - bring all of the test configuration into meson
- Date: Sat, 20 Feb 2021 22:28:48 +0000 (UTC)
commit 6e9e8bbd1c1919ef6d471e828df7bd8c3ddefa6d
Author: John Marshall <jtm home gmail com>
Date: Sun Jun 14 08:18:56 2020 +0100
tests: mipmap
- migrate to new test runner
- bring all of the test configuration into meson
tests/mipmap/invert-crop.sh | 26 ------
tests/mipmap/invert.sh | 26 ------
tests/mipmap/meson.build | 92 +++++++++++++++++----
.../invert-crop.png} | Bin
.../{invert-reference.png => reference/invert.png} | Bin
.../rotate-crop.png} | Bin
.../{rotate-reference.png => reference/rotate.png} | Bin
.../unsharp-crop.png} | Bin
.../unsharp.png} | Bin
tests/mipmap/rotate-crop.sh | 26 ------
tests/mipmap/rotate.sh | 26 ------
tests/mipmap/unsharp-crop.sh | 26 ------
tests/mipmap/unsharp.sh | 26 ------
13 files changed, 75 insertions(+), 173 deletions(-)
---
diff --git a/tests/mipmap/meson.build b/tests/mipmap/meson.build
index 1de47a1c7..4f6f5ef7f 100644
--- a/tests/mipmap/meson.build
+++ b/tests/mipmap/meson.build
@@ -1,23 +1,81 @@
-testnames = [
- 'invert-crop',
- 'invert',
- 'rotate-crop',
- 'rotate',
- 'unsharp-crop',
- 'unsharp',
-]
+# environment
+mipmap_test_env = gegl_test_env_no_ocl
+mipmap_test_env.set('GEGL_TILE_SIZE','8x8')
+mipmap_test_env.set('GEGL_MIPMAP_RENDERING','1')
-foreach testname : testnames
- test(testname.underscorify(),
- find_program(testname + '.sh'),
- env: [
- 'ABS_TOP_BUILDDIR=' + meson.build_root(),
- 'ABS_TOP_SRCDIR=' + meson.source_root(),
- 'GEGL_SWAP=RAM',
- 'GEGL_PATH=' + meson.build_root() / 'operations',
+rotate_test_env = mipmap_test_env
+rotate_test_env.set('GEGL_THREADS','1')
+
+# gegl mipmap tests
+# test parameter dictionary layout
+# <test name>:
+# [<gegl op list>],
+# [<img-cmp arg list>],
+# env,
+#
+mipmap_tests = {
+ 'invert': [
+ ['invert'],
+ ['10'],
+ mipmap_test_env,
+ ],
+ 'invert-crop': [
+ ['invert',
+ 'crop', 'x=147', 'y=66', 'width=200', 'height=200'],
+ ['10'],
+ mipmap_test_env,
+ ],
+ 'rotate': [
+ ['rotate', 'degrees=10.0'],
+ ['20'],
+ rotate_test_env,
+ ],
+ 'rotate-crop': [
+ ['rotate', 'degrees=15',
+ 'crop', 'x=147', 'y=66', 'width=200','height=200'],
+ ['10'],
+ mipmap_test_env,
+ ],
+ 'unsharp': [
+ ['unsharp-mask', 'scale=10.0'],
+ ['20'],
+ mipmap_test_env,
+ ],
+ 'unsharp-crop': [
+ ['unsharp-mask', 'scale=10.0',
+ 'crop', 'x=147', 'y=66', 'width=200', 'height=200'],
+ ['10'],
+ mipmap_test_env,
+ ],
+}
+
+mipmap_test_image = join_paths(
+ meson.current_source_dir() ,'..', 'compositions', 'data',
+ 'car-stack.png'
+)
+
+foreach _test, _args : mipmap_tests
+ _gegl_ops = _args[0]
+ _imgcmp_args = _args[1]
+ _env = _args[2]
+
+ test( _test.underscorify(),
+ test_runner,
+ args: [
+ '--test-name', _test,
+ '--output-dir', meson.current_build_dir() / 'output',
+ '--reference-path', meson.current_source_dir() / 'reference',
+ '--input-file', mipmap_test_image,
+ '--gegl-exe', gegl_bin,
+ '--gegl-scale', '0.33',
+ '--gegl-ops', _gegl_ops,
+ '--imgcmp-exe', gegl_imgcmp,
+ '--imgcmp-args', _imgcmp_args,
],
+ env: _env,
suite: 'mipmap',
- is_parallel: false,
+ timeout: 60,
+ is_parallel: gegl_test_parallel,
)
endforeach
diff --git a/tests/mipmap/invert-crop-reference.png b/tests/mipmap/reference/invert-crop.png
similarity index 100%
rename from tests/mipmap/invert-crop-reference.png
rename to tests/mipmap/reference/invert-crop.png
diff --git a/tests/mipmap/invert-reference.png b/tests/mipmap/reference/invert.png
similarity index 100%
rename from tests/mipmap/invert-reference.png
rename to tests/mipmap/reference/invert.png
diff --git a/tests/mipmap/rotate-crop-reference.png b/tests/mipmap/reference/rotate-crop.png
similarity index 100%
rename from tests/mipmap/rotate-crop-reference.png
rename to tests/mipmap/reference/rotate-crop.png
diff --git a/tests/mipmap/rotate-reference.png b/tests/mipmap/reference/rotate.png
similarity index 100%
rename from tests/mipmap/rotate-reference.png
rename to tests/mipmap/reference/rotate.png
diff --git a/tests/mipmap/unsharp-crop-reference.png b/tests/mipmap/reference/unsharp-crop.png
similarity index 100%
rename from tests/mipmap/unsharp-crop-reference.png
rename to tests/mipmap/reference/unsharp-crop.png
diff --git a/tests/mipmap/unsharp-reference.png b/tests/mipmap/reference/unsharp.png
similarity index 100%
rename from tests/mipmap/unsharp-reference.png
rename to tests/mipmap/reference/unsharp.png
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]