[libgda] Flatpak: adding a terminal test application



commit 469498191cc483a539ab9a62c44242387aed253b
Author: Daniel Espinosa <esodan gmail com>
Date:   Sun Apr 14 13:33:41 2019 -0500

    Flatpak: adding a terminal test application
    
    This new application will be used to test some features
    under flatpak sanboxed environment

 meson_options.txt       |  1 +
 org.gnome.gda.Test.json | 45 +++++++++++++++++++++++++++++++++++++++++++++
 tests/gda-test.c        | 10 ++++++++++
 tests/meson.build       | 14 ++++++++++++++
 4 files changed, 70 insertions(+)
---
diff --git a/meson_options.txt b/meson_options.txt
index 9ee9ae292..960f41265 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -18,3 +18,4 @@ option('enable-gtk-doc', type : 'boolean', value : false, description : 'Enable
 option('enable-experimental', type : 'boolean', value : false, description : 'Enable experimental features 
[default = false]')
 option('enable-ldap', type : 'boolean', value : false, description : 'Enable experimental LDAP provider')
 option('enable-web', type : 'boolean', value : false, description : 'Enable experimental WEB provider')
+option('enable-test-flatpak', type : 'boolean', value : false, description : 'Enable Terminal Test 
Application ')
diff --git a/org.gnome.gda.Test.json b/org.gnome.gda.Test.json
new file mode 100644
index 000000000..fdd8ece92
--- /dev/null
+++ b/org.gnome.gda.Test.json
@@ -0,0 +1,45 @@
+{
+    "app-id": "org.gnome.gda.Test",
+    "runtime": "org.gnome.Platform",
+    "runtime-version": "master",
+    "sdk": "org.gnome.Sdk",
+    "command": "org.gnome.gda.Test",
+    "finish-args": [
+        "--filesystem=home",
+        "--filesystem=xdg-run/dconf",
+        "--filesystem=~/.config/dconf:ro"
+    ],
+    "build-options": {
+        "cflags": "-O2 -g",
+        "cxxflags": "-O2 -g",
+        "env": {
+            "V": "1"
+        }
+    },
+    "cleanup": [
+        "/include",
+        "/lib/pkgconfig",
+        "/man",
+        "/share/doc",
+        "/share/gtk-doc",
+        "/share/man",
+        "/share/pkgconfig",
+        "/share/vala",
+        "*.la",
+        "*.a"
+    ],
+    "modules": [
+        {
+                "name": "test",
+                "config-opts": [
+                        "-Denable-test-flatpak=true"
+                        ],
+                "sources": [
+                        {
+                                "type": "git",
+                                "url": "./"
+                        }
+                ]
+        }
+    ]
+}
diff --git a/tests/gda-test.c b/tests/gda-test.c
new file mode 100644
index 000000000..099bbf937
--- /dev/null
+++ b/tests/gda-test.c
@@ -0,0 +1,10 @@
+#include<libgda/libgda.h>
+
+int main() {
+       GdaConnection *cnc;
+       gda_init();
+       cnc = gda_connection_open_from_string("SQLite", "DB_DIR=.;DB_NAME=test", NULL, 
GDA_CONNECTION_OPTIONS_NONE, NULL);
+       g_object_unref(cnc);
+       return EXIT_SUCCESS;
+}
+
diff --git a/tests/meson.build b/tests/meson.build
index 3a2e0b099..57fe3bb3c 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -238,3 +238,17 @@ subdir('db')
 if enable_ui
 subdir('ui')
 endif
+
+gda_test_sources = [
+       'gda-test.c'
+       ]
+
+executable ('org.gnome.gda.Test', gda_test_sources,
+       dependencies: [
+               libgda_dep,
+               inc_rooth_dep,
+               inc_sqliteh_dep
+               ],
+       install: get_option('enable-test-flatpak'),
+       link_with: libgda
+       )


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