After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 762652 - Run PackageKit related test only when PackageKit is available
Run PackageKit related test only when PackageKit is available
Status: RESOLVED FIXED
Product: gnome-software
Classification: Applications
Component: General
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GNOME Software maintainer(s)
GNOME Software maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2016-02-24 23:29 UTC by Joaquim Rocha
Modified: 2016-02-26 10:41 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Run gs_plugin_loader_refine_func only if PackageKit is available (1.03 KB, patch)
2016-02-24 23:29 UTC, Joaquim Rocha
none Details | Review

Description Joaquim Rocha 2016-02-24 23:29:57 UTC
Created attachment 322317 [details] [review]
Run gs_plugin_loader_refine_func only if PackageKit is available

The tests in "gs_plugin_loader_refine_func" only do anything meaningful if PackageKit is available, so the test shouldn't be run if it isn't.

Note that there are more ways of bypassing this. I could add the check around the call that loads the plugin and return if it wasn't loaded but since this is the only plugin call inside the function, there's no point in running it if it will do nothing.
In the future, if we add other refine plugins, we can enable the function.
Comment 1 Richard Hughes 2016-02-25 15:56:45 UTC
I think I'd rather make the PK plugin not-required for the self tests tbh.
Comment 2 Richard Hughes 2016-02-26 10:41:57 UTC
commit 24a3e6a204f1df22acb905b9f9fe34193d973d85
Author: Richard Hughes <richard@hughsie.com>
Date:   Fri Feb 26 10:38:55 2016 +0000

    Do not require PackageKit to run the unit tests
    
    Resolves: https://bugzilla.gnome.org/show_bug.cgi?id=762652

:100644 100644 e5c7a4b... e7c9b98... M  src/gs-self-test.c
:100644 100644 b0b97dd... c6b7df2... M  src/plugins/gs-plugin-dummy.c