mirror of
https://github.com/Xetibo/ReSet.git
synced 2025-04-12 08:28:32 +02:00
add frontend tests
This commit is contained in:
parent
fe85ff3c70
commit
1e4ca9f73a
|
@ -7,8 +7,9 @@ repository = "https://github.com/Xetibo/ReSet"
|
||||||
license = "GPL-3.0-or-later"
|
license = "GPL-3.0-or-later"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
reset_daemon = "1.4.0"
|
reset_daemon = "1.5.0"
|
||||||
re_set-lib = "4.1.1"
|
#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"] }
|
adw = { version = "0.6.0", package = "libadwaita", features = ["v1_4"] }
|
||||||
dbus = "0.9.7"
|
dbus = "0.9.7"
|
||||||
gtk = { version = "0.8.1", package = "gtk4", features = ["v4_12"] }
|
gtk = { version = "0.8.1", package = "gtk4", features = ["v4_12"] }
|
||||||
|
|
|
@ -11,6 +11,7 @@ use gtk::{gio, Application, CssProvider};
|
||||||
use reset_daemon::run_daemon;
|
use reset_daemon::run_daemon;
|
||||||
|
|
||||||
mod components;
|
mod components;
|
||||||
|
mod tests;
|
||||||
|
|
||||||
const APP_ID: &str = "org.Xetibo.ReSet";
|
const APP_ID: &str = "org.Xetibo.ReSet";
|
||||||
|
|
||||||
|
|
19
src/tests.rs
Normal file
19
src/tests.rs
Normal file
|
@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue