ios unit test cleanup
This commit is contained in:
@@ -1,29 +1,22 @@
|
||||
use crate::xx::*;
|
||||
use backtrace::Backtrace;
|
||||
use lazy_static::*;
|
||||
use log::*;
|
||||
use simplelog::*;
|
||||
use std::fs::OpenOptions;
|
||||
use std::panic;
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
pub struct IOSGlobals {}
|
||||
|
||||
lazy_static! {
|
||||
pub static ref IOS_GLOBALS: Arc<Mutex<Option<IOSGlobals>>> = Arc::new(Mutex::new(None));
|
||||
}
|
||||
|
||||
pub fn veilid_core_setup_ios<'a>(
|
||||
pub fn veilid_core_setup<'a>(
|
||||
log_tag: &'a str,
|
||||
terminal_log: Option<Level>,
|
||||
file_log: Option<(Level, &Path)>,
|
||||
) {
|
||||
if let Err(e) = veilid_core_setup_ios_internal(log_tag, terminal_log, file_log) {
|
||||
if let Err(e) = veilid_core_setup_internal(log_tag, terminal_log, file_log) {
|
||||
panic!("failed to set up veilid-core: {}", e);
|
||||
}
|
||||
}
|
||||
|
||||
fn veilid_core_setup_ios_internal<'a>(
|
||||
fn veilid_core_setup_internal<'a>(
|
||||
_log_tag: &'a str,
|
||||
terminal_log: Option<Level>,
|
||||
file_log: Option<(Level, &Path)>,
|
||||
@@ -94,6 +87,5 @@ fn veilid_core_setup_ios_internal<'a>(
|
||||
error!("Backtrace:\n{:?}", bt);
|
||||
}));
|
||||
|
||||
*IOS_GLOBALS.lock() = Some(IOSGlobals {});
|
||||
Ok(())
|
||||
}
|
@@ -1,5 +1,5 @@
|
||||
#[cfg(target_os = "android")]
|
||||
pub mod android;
|
||||
#[cfg(target_os = "ios")]
|
||||
pub mod ios;
|
||||
pub mod ios_test_setup;
|
||||
pub mod network_interfaces;
|
||||
|
@@ -31,7 +31,7 @@ pub extern "C" fn run_veilid_core_tests() {
|
||||
]
|
||||
.iter()
|
||||
.collect();
|
||||
crate::intf::utils::ios::veilid_core_setup_ios(
|
||||
crate::intf::utils::ios_test_setup::veilid_core_setup(
|
||||
"veilid-core",
|
||||
Some(Level::Trace),
|
||||
Some((Level::Trace, log_path.as_path())),
|
||||
|
Reference in New Issue
Block a user