diff --git a/Cargo.toml b/Cargo.toml index 21c9eeb..a2f45b9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,8 +7,9 @@ repository = "https://github.com/Xetibo/ReSet" license = "GPL-3.0-or-later" [dependencies] -reset_daemon = "1.4.0" -re_set-lib = "4.1.1" +reset_daemon = "1.5.0" +#re_set-lib = "5.0.0" +re_set-lib = { git = "https://github.com/Xetibo/ReSet-Lib" } adw = { version = "0.6.0", package = "libadwaita", features = ["v1_4"] } dbus = "0.9.7" gtk = { version = "0.8.1", package = "gtk4", features = ["v4_12"] } diff --git a/src/main.rs b/src/main.rs index 887c5e9..3cd3b0e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -11,6 +11,7 @@ use gtk::{gio, Application, CssProvider}; use reset_daemon::run_daemon; mod components; +mod tests; const APP_ID: &str = "org.Xetibo.ReSet"; diff --git a/src/tests.rs b/src/tests.rs new file mode 100644 index 0000000..ed26a22 --- /dev/null +++ b/src/tests.rs @@ -0,0 +1,19 @@ +use std::thread; +use std::time::Duration; +use re_set_lib::utils::plugin_setup::FRONTEND_PLUGINS; +use crate::daemon_check; + +#[tokio::test] +#[cfg(test)] +async fn test_plugins() { + use re_set_lib::utils::plugin::plugin_tests; + tokio::task::spawn(daemon_check()); + thread::sleep(Duration::from_millis(2000)); + unsafe { + for plugin in FRONTEND_PLUGINS.iter() { + let name = (plugin.frontend_name)(); + let tests = (plugin.frontend_tests)(); + plugin_tests(name, tests); + } + } +}