[gnome-software/wip/mcrha/ci-test] aa



commit 2559b6b23996414bda55ffa9e5ae1f3a4e8ac27d
Author: Milan Crha <mcrha redhat com>
Date:   Wed Mar 16 15:29:39 2022 +0100

    aa

 .gitlab-ci.yml                 |  3 +--
 plugins/flatpak/gs-self-test.c | 21 +++++++++++++++++++++
 2 files changed, 22 insertions(+), 2 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 4d9b87302..9c9022cc1 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -20,12 +20,11 @@ variables:
 
 fedora-x86_64:
   extends: .build
-  image: registry.gitlab.gnome.org/gnome/gnome-software/fedora:v9
+  image: registry.gitlab.gnome.org/gnome/gnome-software/fedora:v10
   stage: build
   except:
     - tags
   script:
-    - sudo dnf update -y
     - meson ${MESON_COMMON_OPTIONS}
             -Drpm_ostree=true
             -Dmalcontent=true
diff --git a/plugins/flatpak/gs-self-test.c b/plugins/flatpak/gs-self-test.c
index 5b4a1faf8..3910835a1 100644
--- a/plugins/flatpak/gs-self-test.c
+++ b/plugins/flatpak/gs-self-test.c
@@ -246,6 +246,7 @@ progress_notify_cb (GObject *obj, GParamSpec *pspec, gpointer user_data)
        gboolean *seen_unknown = user_data;
        GsApp *app = GS_APP (obj);
 
+       g_message ("xxx %s: %d: progress:%u is_unknown:%d\n", __FUNCTION__, __LINE__, gs_app_get_progress 
(app), gs_app_get_progress (app) == GS_APP_PROGRESS_UNKNOWN);
        if (gs_app_get_progress (app) == GS_APP_PROGRESS_UNKNOWN)
                *seen_unknown = TRUE;
 }
@@ -279,6 +280,8 @@ gs_plugins_flatpak_app_with_runtime_func (GsPluginLoader *plugin_loader)
        gboolean seen_unknown;
        GsPlugin *plugin;
 
+       g_message ("xxx %s: %d\n", __FUNCTION__, __LINE__);
+
        /* drop all caches */
        gs_utils_rmtree (g_getenv ("GS_SELF_TEST_CACHEDIR"), NULL);
        gs_test_reinitialise_plugin_loader (plugin_loader, allowlist, NULL);
@@ -287,6 +290,7 @@ gs_plugins_flatpak_app_with_runtime_func (GsPluginLoader *plugin_loader)
        if (!gs_plugin_loader_get_enabled (plugin_loader, "flatpak"))
                return;
 
+       g_message ("xxx %s: %d\n", __FUNCTION__, __LINE__);
        /* no files to use */
        repodir_fn = gs_test_get_filename (TESTDATADIR, "app-with-runtime/repo");
        if (repodir_fn == NULL ||
@@ -295,11 +299,13 @@ gs_plugins_flatpak_app_with_runtime_func (GsPluginLoader *plugin_loader)
                return;
        }
 
+       g_message ("xxx %s: %d\n", __FUNCTION__, __LINE__);
        /* check changed file exists */
        root = g_getenv ("GS_SELF_TEST_FLATPAK_DATADIR");
        changed_fn = g_build_filename (root, "flatpak", ".changed", NULL);
        g_assert_true (g_file_test (changed_fn, G_FILE_TEST_IS_REGULAR));
 
+       g_message ("xxx %s: %d\n", __FUNCTION__, __LINE__);
        /* check repo is set up */
        config_fn = g_build_filename (root, "flatpak", "repo", "config", NULL);
        ret = g_key_file_load_from_file (kf1, config_fn, G_KEY_FILE_NONE, &error);
@@ -309,6 +315,7 @@ gs_plugins_flatpak_app_with_runtime_func (GsPluginLoader *plugin_loader)
        g_assert_no_error (error);
        g_assert_cmpint (kf_remote_repo_version, ==, 1);
 
+       g_message ("xxx %s: %d\n", __FUNCTION__, __LINE__);
        /* add a remote */
        app_source = gs_flatpak_app_new ("test");
        testdir = gs_test_get_filename (TESTDATADIR, "app-with-runtime");
@@ -329,6 +336,7 @@ gs_plugins_flatpak_app_with_runtime_func (GsPluginLoader *plugin_loader)
        g_assert_true (ret);
        g_assert_cmpint (gs_app_get_state (app_source), ==, GS_APP_STATE_INSTALLED);
 
+       g_message ("xxx %s: %d\n", __FUNCTION__, __LINE__);
        /* check remote was set up */
        ret = g_key_file_load_from_file (kf2, config_fn, G_KEY_FILE_NONE, &error);
        g_assert_no_error (error);
@@ -348,6 +356,7 @@ gs_plugins_flatpak_app_with_runtime_func (GsPluginLoader *plugin_loader)
        g_assert_cmpstr (gs_app_get_id (app), ==, "test");
        g_assert_cmpint (gs_app_get_kind (app), ==, AS_COMPONENT_KIND_REPOSITORY);
 
+       g_message ("xxx %s: %d\n", __FUNCTION__, __LINE__);
        /* refresh the appstream metadata */
        g_object_unref (plugin_job);
        plugin_job = gs_plugin_job_refresh_metadata_new (G_MAXUINT64,
@@ -356,6 +365,7 @@ gs_plugins_flatpak_app_with_runtime_func (GsPluginLoader *plugin_loader)
        g_assert_no_error (error);
        g_assert_true (ret);
 
+       g_message ("xxx %s: %d\n", __FUNCTION__, __LINE__);
        /* all the apps should have the flatpak keyword */
        g_object_unref (plugin_job);
        plugin_job = gs_plugin_job_newv (GS_PLUGIN_ACTION_SEARCH,
@@ -367,6 +377,7 @@ gs_plugins_flatpak_app_with_runtime_func (GsPluginLoader *plugin_loader)
        g_assert_true (list_all != NULL);
        g_assert_cmpint (gs_app_list_length (list_all), ==, 2);
 
+       g_message ("xxx %s: %d\n", __FUNCTION__, __LINE__);
        /* find available application */
        g_object_unref (plugin_job);
        plugin_job = gs_plugin_job_newv (GS_PLUGIN_ACTION_SEARCH,
@@ -382,6 +393,7 @@ gs_plugins_flatpak_app_with_runtime_func (GsPluginLoader *plugin_loader)
        g_assert_no_error (error);
        g_assert_true (list != NULL);
 
+       g_message ("xxx %s: %d\n", __FUNCTION__, __LINE__);
        /* make sure there is one entry, the flatpak app */
        g_assert_cmpint (gs_app_list_length (list), ==, 1);
        app = gs_app_list_index (list, 0);
@@ -400,6 +412,7 @@ gs_plugins_flatpak_app_with_runtime_func (GsPluginLoader *plugin_loader)
        g_assert_cmpstr (gs_app_get_update_details_markup (app), ==, NULL);
        g_assert_cmpint (gs_app_get_update_urgency (app), ==, AS_URGENCY_KIND_UNKNOWN);
 
+       g_message ("xxx %s: %d\n", __FUNCTION__, __LINE__);
        /* check runtime */
        runtime = gs_app_get_runtime (app);
        g_assert_true (runtime != NULL);
@@ -459,6 +472,7 @@ gs_plugins_flatpak_app_with_runtime_func (GsPluginLoader *plugin_loader)
                                        NULL);
        g_assert_true (g_file_test (runtime_fn, G_FILE_TEST_IS_REGULAR));
 
+       g_message ("xxx %s: %d\n", __FUNCTION__, __LINE__);
        /* remove the application */
        g_object_unref (plugin_job);
        plugin_job = gs_plugin_job_newv (GS_PLUGIN_ACTION_REMOVE,
@@ -471,6 +485,7 @@ gs_plugins_flatpak_app_with_runtime_func (GsPluginLoader *plugin_loader)
        g_assert_cmpint (gs_app_get_state (runtime), ==, GS_APP_STATE_INSTALLED);
        g_assert_true (!g_file_test (metadata_fn, G_FILE_TEST_IS_REGULAR));
        g_assert_true (!g_file_test (desktop_fn, G_FILE_TEST_IS_REGULAR));
+       g_message ("xxx %s: %d\n", __FUNCTION__, __LINE__);
 
        /* install again, to check whether the progress gets initialized;
         * since installation happens in another thread, we have to monitor all
@@ -484,10 +499,12 @@ gs_plugins_flatpak_app_with_runtime_func (GsPluginLoader *plugin_loader)
                                         "app", app,
                                         NULL);
        ret = gs_plugin_loader_job_action (plugin_loader, plugin_job, NULL, &error);
+       g_message ("xxx %s: %d\n", __FUNCTION__, __LINE__);
 
        /* progress should be set to unknown right before installing */
        while (!seen_unknown)
                g_main_context_iteration (NULL, TRUE);
+       g_message ("xxx %s: %d\n", __FUNCTION__, __LINE__);
        g_assert_true (seen_unknown);
        g_assert_no_error (error);
        g_assert_true (ret);
@@ -509,6 +526,7 @@ gs_plugins_flatpak_app_with_runtime_func (GsPluginLoader *plugin_loader)
        g_assert_cmpint (gs_app_get_state (runtime), ==, GS_APP_STATE_INSTALLED);
        g_assert_true (!g_file_test (metadata_fn, G_FILE_TEST_IS_REGULAR));
        g_assert_true (!g_file_test (desktop_fn, G_FILE_TEST_IS_REGULAR));
+       g_message ("xxx %s: %d\n", __FUNCTION__, __LINE__);
 
        /* remove the remote (fail, as the runtime is still installed) */
        g_object_unref (plugin_job);
@@ -520,6 +538,7 @@ gs_plugins_flatpak_app_with_runtime_func (GsPluginLoader *plugin_loader)
        g_assert_true (!ret);
        g_clear_error (&error);
        g_assert_cmpint (gs_app_get_state (app_source), ==, GS_APP_STATE_INSTALLED);
+       g_message ("xxx %s: %d\n", __FUNCTION__, __LINE__);
 
        /* remove the runtime */
        g_object_unref (plugin_job);
@@ -531,6 +550,7 @@ gs_plugins_flatpak_app_with_runtime_func (GsPluginLoader *plugin_loader)
        g_assert_no_error (error);
        g_assert_true (ret);
        g_assert_cmpint (gs_app_get_state (runtime), ==, GS_APP_STATE_AVAILABLE);
+       g_message ("xxx %s: %d\n", __FUNCTION__, __LINE__);
 
        /* remove the remote */
        g_object_unref (plugin_job);
@@ -542,6 +562,7 @@ gs_plugins_flatpak_app_with_runtime_func (GsPluginLoader *plugin_loader)
        g_assert_no_error (error);
        g_assert_true (ret);
        g_assert_cmpint (gs_app_get_state (app_source), ==, GS_APP_STATE_UNAVAILABLE);
+       g_message ("xxx %s: %d\n", __FUNCTION__, __LINE__);
 }
 
 static void


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