[gupnp/wip/phako/cleanup: 13/21] tests, examples: Some tests are examples




commit 66260a330815211b22839c31ef8c8658bb76f06b
Author: Jens Georg <mail jensge org>
Date:   Sun May 30 12:00:42 2021 +0200

    tests,examples: Some tests are examples
    
    Those are moved into examples, and gtests is moved one up

 examples/meson.build                     |   9 +++++++++
 {tests => examples}/test-browsing.c      |   0
 {tests => examples}/test-introspection.c |   0
 {tests => examples}/test-proxy.c         |   0
 {tests => examples}/test-server.c        |   0
 {tests => examples}/test-white-list.c    |   0
 tests/{gtest => }/data/TestDevice.xml    |   0
 tests/{gtest => }/data/TestService.xml   |   0
 tests/{gtest => }/data/random4k.bin      | Bin
 tests/gtest/meson.build                  |  12 ------------
 tests/meson.build                        |  17 ++++++++++-------
 tests/{gtest => }/test-bugs.c            |   0
 tests/{gtest => }/test-context.c         |   0
 13 files changed, 19 insertions(+), 19 deletions(-)
---
diff --git a/examples/meson.build b/examples/meson.build
index c8d0d3c..eb32dfd 100644
--- a/examples/meson.build
+++ b/examples/meson.build
@@ -16,3 +16,12 @@ executable(
     'get-volume.c',
     dependencies: gupnp
 )
+
+foreach program : ['browsing', 'proxy', 'server', 'introspection', 'white-list']
+    executable(
+        'test-' + program,
+        sources : 'test-@0@.c'.format(program),
+        dependencies : [gupnp, gio_unix]
+    )
+endforeach
+
diff --git a/tests/test-browsing.c b/examples/test-browsing.c
similarity index 100%
rename from tests/test-browsing.c
rename to examples/test-browsing.c
diff --git a/tests/test-introspection.c b/examples/test-introspection.c
similarity index 100%
rename from tests/test-introspection.c
rename to examples/test-introspection.c
diff --git a/tests/test-proxy.c b/examples/test-proxy.c
similarity index 100%
rename from tests/test-proxy.c
rename to examples/test-proxy.c
diff --git a/tests/test-server.c b/examples/test-server.c
similarity index 100%
rename from tests/test-server.c
rename to examples/test-server.c
diff --git a/tests/test-white-list.c b/examples/test-white-list.c
similarity index 100%
rename from tests/test-white-list.c
rename to examples/test-white-list.c
diff --git a/tests/gtest/data/TestDevice.xml b/tests/data/TestDevice.xml
similarity index 100%
rename from tests/gtest/data/TestDevice.xml
rename to tests/data/TestDevice.xml
diff --git a/tests/gtest/data/TestService.xml b/tests/data/TestService.xml
similarity index 100%
rename from tests/gtest/data/TestService.xml
rename to tests/data/TestService.xml
diff --git a/tests/gtest/data/random4k.bin b/tests/data/random4k.bin
similarity index 100%
rename from tests/gtest/data/random4k.bin
rename to tests/data/random4k.bin
diff --git a/tests/meson.build b/tests/meson.build
index c27a3f5..33637d7 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -1,9 +1,12 @@
-foreach program : ['browsing', 'proxy', 'server', 'introspection', 'white-list']
-    executable(
-        'test-' + program,
-        sources : 'test-@0@.c'.format(program),
-        dependencies : [gupnp, gio_unix]
+foreach program : ['context', 'bugs']
+    test(
+        program,
+        executable(
+            'test-' + program,
+            'test-@0@.c'.format (program),
+            dependencies : gupnp,
+            c_args : '-DDATA_PATH="@0@/data"'.format(meson.current_source_dir())
+        ),
+        is_parallel : false
     )
 endforeach
-
-subdir('gtest')
diff --git a/tests/gtest/test-bugs.c b/tests/test-bugs.c
similarity index 100%
rename from tests/gtest/test-bugs.c
rename to tests/test-bugs.c
diff --git a/tests/gtest/test-context.c b/tests/test-context.c
similarity index 100%
rename from tests/gtest/test-context.c
rename to tests/test-context.c


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