25 Commits

Author SHA1 Message Date
Julian Bouzas
8935837cda scripts: remove settings-manager and use the Settings API
The settings manager is not needed anymore because the WpSettings Lua API
returns now the default value from the schema if the setting is not found.
2024-02-28 10:20:31 -05:00
George Kiagiadakis
cc4549134a script-tester: load the new settings-instance component 2024-01-29 12:57:35 +02:00
George Kiagiadakis
74bfe4baa3 script-tester: simplify the load_component() function 2024-01-29 12:56:46 +02:00
George Kiagiadakis
18ea9606d2 tests: fix script-tester to work with the metadata.lua changes 2023-11-08 20:37:13 +02:00
Pauli Virtanen
0809a89442 tests: script-tester: fix locking of test-server
Calling functions on test server must lock the thread loop, otherwise
the concurrency causes corruptiont in module-protocol-native and you get
bogus messages etc.
2023-11-01 21:00:55 +02:00
Julian Bouzas
56017fdbe6 scripts: use filter-utils to implement smart filter policy 2023-09-03 14:33:34 +00:00
Julian Bouzas
d383762812 device: remove echo-cancel configuration
This will be possible to do with the new filter-utils.lua design.
2023-09-03 14:33:34 +00:00
George Kiagiadakis
8a8cd97ca8 core: make the object registration functions public
This allows registering arbitrary objects on the core's registry and
finding them later, without having to add API for each and every object.

I think this is useful enough to have it public, even though it's
probably not going to be used that much... The rationale here is to
allow registering custom component loaders without having to make them
subclass WpPlugin or to create custom API for registering component
loaders specifically.

Also, remove the wp_plugin_register() and wp_si_factory_register()
functions, since they are not going to be used much in the future.
The idea is to let the component loader do the registration under the
scenes, as the component is getting loaded.
2023-06-20 12:39:29 +03:00
George Kiagiadakis
c7cb193588 core: introduce the notion of provided features on components
Each component can optionally "provide" a feature, which is basically
a string that describes the feature (ex. "support.dbus"). If the
component loads successfully, the feature is marked as provided and
can be tested for its presence with wp_core_test_feature()
2023-06-20 12:39:29 +03:00
George Kiagiadakis
55fc845098 component-loader: make wp_core_load_component_finish() return a boolean
There is no reason to return the component object... all components
are supposed to be long-lived objects that are referenced by the
registry and there is API to find them. The caller is only interested
in the success or failure of the operation.
2023-05-28 21:07:15 +03:00
George Kiagiadakis
7fdbf7ff50 component-loader: activate & register objects through a common code path
Do this in wp_core_load_component() and let the component loaders worry
only about creating the object.

Also run the main loop in tests while loading components, to ensure
that the async operation finishes before continuing execution. GTask
makes sure to make the operation async always, by emitting the callback
from an idle GSource.
2023-05-26 21:22:48 +03:00
George Kiagiadakis
843e7ef4dd component-loader: pass core and cancellable parameters in load()
Regarding the core parameter, the case used to be that WpComponentLoader
was a WpPlugin, so it had a reference to the core internally, but since
this is no longer a requirement, we need to pass this explicitly
2023-05-26 13:04:10 +03:00
George Kiagiadakis
bd672b71f7 script-tester: decouple script tests setup/teardown from basic
basic_tests_setup points to a config file that doesn't exist in
the script tests directory
2023-05-24 19:45:58 +03:00
Julian Bouzas
c61d1e4245 component-loader: make wp_core_load_component() API asynchronous
This change completely refactors the way components are loaded in wireplumber:
- The module_init() function must return a GObject now. This object is either
a WpPlugin or a WpSiFactory in the current modules.
- When the component loader initializes a module, it automatically registers
the WpPlugin or WpSiFactory with their respective methods. There is no need
to register the WpPlugin or WpSiFactory in the module now.
- The wp_core_load_component() API has been refactored to be asynchronows. This
allows the component loader to automatically activate WpPlugin objects, and
therefore allows the application to directly get the WpPlugin without having
to find it. This simplifies a lot of things.
- The 'ifexists' and 'nofail' component flags now work even if the respective
WpPlugin could not be activated.
- The code that loads components in main.c has also been simplified a lot,
and the option to load dangling components has also been removed.
2023-04-17 07:48:18 -04:00
George Kiagiadakis
7c2e713c9d m-metadata: remove module-metadata and replace it with a simple lua script 2023-04-17 07:48:18 -04:00
Ashok Sidipotu
de3214d21b default-node: rename select-default-nodes.lua
Consistent across linking and default node scripts.
2023-04-17 07:48:18 -04:00
Ashok Sidipotu
0b29286f4f script-tester: add a restart-plugin action signal 2023-04-17 07:48:18 -04:00
Ashok Sidipotu
d4d4e23e9c script-tester: pass the fixture pointer to plugin 2023-04-17 07:48:18 -04:00
Ashok Sidipotu
c9e55e6565 script-tester: run default-node scripts ahead of m-metadata 2023-04-17 07:48:18 -04:00
Julian Bouzas
fb855b00cf Rename endpoint concept to virtual session item 2023-04-17 07:48:18 -04:00
Julian Bouzas
d43b55d01e tests: use WpConf for the settings unit tests
Also moves the settings.conf file into settings/wireplumber.conf
2023-04-17 07:48:18 -04:00
Ashok Sidipotu
cd7e9b190b script-tester: create a new script tester plugin
script tester plugin with a action signal to create the stream node.
2023-04-17 07:48:18 -04:00
Ashok Sidipotu
e13a3a0a89 script-tester.c: use the latest list of components
use the latest list of components needed to launch linking tests.
2023-04-17 07:48:18 -04:00
Ashok Sidipotu
a8aeb1010e policy tests: facilitate Lua src tests in script-tester.c 2023-04-17 07:48:18 -04:00
Ashok Sidipotu
8e78ec58e3 lua tests: script tests: add a new folder
Move the script-tester.c one folder up so that it is common for wplua and these tests.
2023-04-17 07:48:18 -04:00