mirror of
https://github.com/Xetibo/ReSet.git
synced 2025-07-07 10:37:46 +02:00
add frontend tests
This commit is contained in:
parent
fe85ff3c70
commit
1e4ca9f73a
3 changed files with 23 additions and 2 deletions
|
@ -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";
|
||||
|
||||
|
|
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…
Add table
Add a link
Reference in a new issue