[retro-gtk/wip/aplazas/ci] GitLab CI



commit 0d53cae2b6cc413d6075ae2b99528e311742832b
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Tue Apr 24 23:12:04 2018 +0200

    GitLab CI

 .gitlab-ci.yml        | 11 ++---------
 meson.build           |  2 --
 tests/meson.build     |  7 +------
 tests/retro-reftest.c | 28 ++--------------------------
 4 files changed, 5 insertions(+), 43 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index c9c10a8..fe89ca4 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -13,16 +13,9 @@ flatpak:master:
   stage: build-flatpak
   script:
     - flatpak-builder unit-tests flatpak/org.gnome.Retro.UnitTests.json
-    - flatpak-builder --run unit-tests flatpak/org.gnome.Retro.UnitTests.json retro-unit-tests
-    # Make sure to keep this in sync with the Flatpak manifest, all arguments
-    # are passed except the config-args because we build it ourselves
-    # - flatpak build app meson --prefix=/app _build
-    # - flatpak build app ninja -C _build install
-    # - flatpak-builder --finish-only --repo=repo app flatpak/org.gnome.Retro.UnitTests.json
-    # TODO: Make a Flatpak Contacts bundle for people to test
-    # - flatpak build-bundle repo contacts-dev.flatpak 
--runtime-repo=https://sdk.gnome.org/gnome-nightly.flatpakrepo org.gnome.ContactsDevel
+    # - flatpak-builder --run unit-tests flatpak/org.gnome.Retro.UnitTests.json retro-unit-tests
     # TODO: Run automatic tests inside the Flatpak env
-    # - xvfb-run -a -s "-screen 0 1024x768x24" flatpak build app ninja -C _build test
+    - xvfb-run -a -s "-screen 0 1024x768x24" flatpak-builder --run unit-tests 
flatpak/org.gnome.Retro.UnitTests.json retro-unit-tests
   artifacts:
     paths:
       # - contacts-dev.flatpak
diff --git a/meson.build b/meson.build
index c3250b2..4aa6d8d 100644
--- a/meson.build
+++ b/meson.build
@@ -24,8 +24,6 @@ gobject = dependency ('gobject-2.0', version: glib_version)
 gtk = dependency ('gtk+-3.0', version: gtk_version)
 libpulse_simple = dependency ('libpulse-simple')
 m = cc.find_library('m', required : false)
-x11_dep = dependency('x11')
-xtst_dep = dependency('xtst')
 
 config_h = configuration_data()
 config_h.set_quoted ('RETRO_PLUGIN_PATH', ':'.join ([libretrodir, libdir]))
diff --git a/tests/meson.build b/tests/meson.build
index 01f0741..50edea6 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -3,16 +3,11 @@ retro_reftest_sources = [
   'retro-reftest-file.c',
 ]
 
-retro_reftest_dep = [
-  retro_gtk_dep,
-  x11_dep,
-  xtst_dep,
-]
 
 retro_reftest = executable('retro-reftest',
   retro_reftest_sources,
   c_args: retro_gtk_c_args,
-  dependencies: retro_reftest_dep,
+  dependencies: retro_gtk_dep,
   gui_app: true,
   install: true,
 )
diff --git a/tests/retro-reftest.c b/tests/retro-reftest.c
index d1aefa3..d43ef31 100644
--- a/tests/retro-reftest.c
+++ b/tests/retro-reftest.c
@@ -18,9 +18,6 @@
  * SPDX-License-Identifier: GPL-3.0-or-later
  */
 
-#include <X11/extensions/XTest.h>
-#include <X11/keysym.h>
-
 #include "retro-reftest-file.h"
 
 typedef struct {
@@ -499,28 +496,11 @@ int
 main (int argc,
       gchar **argv)
 {
-  Display *display = NULL;
-  int event_base, error_base, major_version, minor_version;
   GFile *file;
-  gint i, result;
+  gint i;
 
   g_setenv ("GDK_RENDERING", "image", FALSE);
 
-
-  display = XOpenDisplay (NULL);
-
-  if (display == NULL) {
-    g_critical ("Cannot open display.");
-
-    return 1;
-  }
-
-  if (!XTestQueryExtension (display, &event_base, &error_base, &major_version, &minor_version)) {
-    g_critical ("No XTest extension.");
-
-    return 1;
-  }
-
   if (!parse_command_line (&argc, &argv))
     return 1;
 
@@ -530,9 +510,5 @@ main (int argc,
     g_object_unref (file);
   }
 
-  result = g_test_run ();
-
-  XCloseDisplay (display);
-
-  return result;
+  return g_test_run ();
 }


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