mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-15 13:59:15 +00:00
trivial: Allow calling all FuPlugin runners from the self tests
This commit is contained in:
parent
1fa6407c85
commit
639da4776b
@ -777,6 +777,10 @@ fu_plugin_runner_startup (FuPlugin *plugin, GError **error)
|
|||||||
if (!priv->enabled)
|
if (!priv->enabled)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
|
/* no object loaded */
|
||||||
|
if (priv->module == NULL)
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
/* optional */
|
/* optional */
|
||||||
g_module_symbol (priv->module, "fu_plugin_startup", (gpointer *) &func);
|
g_module_symbol (priv->module, "fu_plugin_startup", (gpointer *) &func);
|
||||||
if (func == NULL)
|
if (func == NULL)
|
||||||
@ -873,6 +877,10 @@ fu_plugin_runner_coldplug (FuPlugin *plugin, GError **error)
|
|||||||
if (!priv->enabled)
|
if (!priv->enabled)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
|
/* no object loaded */
|
||||||
|
if (priv->module == NULL)
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
/* optional */
|
/* optional */
|
||||||
g_module_symbol (priv->module, "fu_plugin_coldplug", (gpointer *) &func);
|
g_module_symbol (priv->module, "fu_plugin_coldplug", (gpointer *) &func);
|
||||||
if (func == NULL)
|
if (func == NULL)
|
||||||
@ -895,6 +903,10 @@ fu_plugin_runner_coldplug_prepare (FuPlugin *plugin, GError **error)
|
|||||||
if (!priv->enabled)
|
if (!priv->enabled)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
|
/* no object loaded */
|
||||||
|
if (priv->module == NULL)
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
/* optional */
|
/* optional */
|
||||||
g_module_symbol (priv->module, "fu_plugin_coldplug_prepare", (gpointer *) &func);
|
g_module_symbol (priv->module, "fu_plugin_coldplug_prepare", (gpointer *) &func);
|
||||||
if (func == NULL)
|
if (func == NULL)
|
||||||
@ -917,6 +929,10 @@ fu_plugin_runner_coldplug_cleanup (FuPlugin *plugin, GError **error)
|
|||||||
if (!priv->enabled)
|
if (!priv->enabled)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
|
/* no object loaded */
|
||||||
|
if (priv->module == NULL)
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
/* optional */
|
/* optional */
|
||||||
g_module_symbol (priv->module, "fu_plugin_coldplug_cleanup", (gpointer *) &func);
|
g_module_symbol (priv->module, "fu_plugin_coldplug_cleanup", (gpointer *) &func);
|
||||||
if (func == NULL)
|
if (func == NULL)
|
||||||
@ -973,6 +989,8 @@ fu_plugin_runner_usb_device_added (FuPlugin *plugin, GUsbDevice *usb_device, GEr
|
|||||||
/* not enabled */
|
/* not enabled */
|
||||||
if (!priv->enabled)
|
if (!priv->enabled)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
|
/* no object loaded */
|
||||||
if (priv->module == NULL)
|
if (priv->module == NULL)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
@ -1078,6 +1096,10 @@ fu_plugin_runner_verify (FuPlugin *plugin,
|
|||||||
if (!priv->enabled)
|
if (!priv->enabled)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
|
/* no object loaded */
|
||||||
|
if (priv->module == NULL)
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
/* clear any existing verification checksums */
|
/* clear any existing verification checksums */
|
||||||
checksums = fu_device_get_checksums (device);
|
checksums = fu_device_get_checksums (device);
|
||||||
g_ptr_array_set_size (checksums, 0);
|
g_ptr_array_set_size (checksums, 0);
|
||||||
@ -1141,6 +1163,10 @@ fu_plugin_runner_update (FuPlugin *plugin,
|
|||||||
if (!priv->enabled)
|
if (!priv->enabled)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
|
/* no object loaded */
|
||||||
|
if (priv->module == NULL)
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
/* optional */
|
/* optional */
|
||||||
g_module_symbol (priv->module, "fu_plugin_update", (gpointer *) &update_func);
|
g_module_symbol (priv->module, "fu_plugin_update", (gpointer *) &update_func);
|
||||||
if (update_func == NULL) {
|
if (update_func == NULL) {
|
||||||
@ -1220,6 +1246,10 @@ fu_plugin_runner_clear_results (FuPlugin *plugin, FuDevice *device, GError **err
|
|||||||
if (!priv->enabled)
|
if (!priv->enabled)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
|
/* no object loaded */
|
||||||
|
if (priv->module == NULL)
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
/* use the plugin if the vfunc is provided */
|
/* use the plugin if the vfunc is provided */
|
||||||
g_module_symbol (priv->module, "fu_plugin_clear_result", (gpointer *) &func);
|
g_module_symbol (priv->module, "fu_plugin_clear_result", (gpointer *) &func);
|
||||||
if (func != NULL) {
|
if (func != NULL) {
|
||||||
@ -1265,6 +1295,10 @@ fu_plugin_runner_get_results (FuPlugin *plugin, FuDevice *device, GError **error
|
|||||||
if (!priv->enabled)
|
if (!priv->enabled)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
|
/* no object loaded */
|
||||||
|
if (priv->module == NULL)
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
/* use the plugin if the vfunc is provided */
|
/* use the plugin if the vfunc is provided */
|
||||||
g_module_symbol (priv->module, "fu_plugin_get_results", (gpointer *) &func);
|
g_module_symbol (priv->module, "fu_plugin_get_results", (gpointer *) &func);
|
||||||
if (func != NULL) {
|
if (func != NULL) {
|
||||||
|
Loading…
Reference in New Issue
Block a user