[gnome-software] packagekit test: Skip testing rpm if we can't load it



commit bf92260daddaa0abeea6b3d166e1434d3491e7cd
Author: Iain Lane <iain orangesquash org uk>
Date:   Wed Mar 8 15:40:36 2017 +0000

    packagekit test: Skip testing rpm if we can't load it
    
    This should probably get an equivalent deb test

 plugins/packagekit/gs-self-test.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/plugins/packagekit/gs-self-test.c b/plugins/packagekit/gs-self-test.c
index f7ca39e..fcc080d 100644
--- a/plugins/packagekit/gs-self-test.c
+++ b/plugins/packagekit/gs-self-test.c
@@ -231,6 +231,10 @@ gs_plugins_packagekit_local_func (GsPluginLoader *plugin_loader)
                                            NULL,
                                            &error);
        gs_test_flush_main_context ();
+       if (g_error_matches (error, GS_PLUGIN_ERROR, GS_PLUGIN_ERROR_NOT_SUPPORTED)) {
+               g_test_skip ("rpm files not supported");
+               return;
+       }
        g_assert_no_error (error);
        g_assert (app != NULL);
        g_assert_cmpstr (gs_app_get_source_default (app), ==, "chiron");


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