[dia] tests: drop the export_test.sh script entirely



commit 57e4009caa745023e0edc46da3b1d78f27073229
Author: Zander Brown <zbrown gnome org>
Date:   Tue Sep 21 15:07:14 2021 +0100

    tests: drop the export_test.sh script entirely
    
    Of course now we have lots of tiny tests all defined in meson

 tests/exports/exports_test.sh | 35 -----------------------------------
 tests/exports/meson.build     | 42 ++++++++++++++++++++++++++++++------------
 2 files changed, 30 insertions(+), 47 deletions(-)
---
diff --git a/tests/exports/meson.build b/tests/exports/meson.build
index a4f4da025..812f34c40 100644
--- a/tests/exports/meson.build
+++ b/tests/exports/meson.build
@@ -15,18 +15,36 @@ export_plugins = [
     'wpg',
 ]
 
-export_script = find_program('exports_test.sh')
+export_tests = [
+    'Arcs',
+    'Bezierlines',
+    'Ellipses',
+    'Polygons',
+    'Texts',
+    'Beziergons',
+    'Boxes',
+    'Lines',
+    'Polylines',
+    'Zigzaglines',
+]
+
+diff = find_program('diff')
 
 foreach plugin : export_plugins
-    test('exports-' + plugin,
-        export_script,
-        args: [
-            # TODO: We don't need to specify full_path().  See
-            # https://github.com/mesonbuild/meson/issues/2681
-            diaapp.full_path(),
-            plugin,
-        ],
-        workdir: meson.current_source_dir(),
-        env: run_env,
-    )
+    foreach file : export_tests
+        output_name = file + '.' + plugin
+        actual_output = custom_target(output_name,
+           output: file + '.' + plugin,
+            input: file + '.dia',
+          command: [diaapp, '-t', plugin, '-e', '@OUTPUT@', '@INPUT@'],
+              env: run_env,
+        )
+        test(file, diff,
+             args: [
+                      '-q', actual_output,
+                       meson.current_source_dir() / plugin / file + '.' + plugin
+                   ],
+            suite: ['export', plugin],
+        )
+    endforeach
 endforeach


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