From e1be2bac6709389a19f48b01ca3e5225636e0d49 Mon Sep 17 00:00:00 2001 From: John Smith Date: Thu, 1 Dec 2022 12:26:02 -0500 Subject: [PATCH] test work --- veilid-core/src/tests/ios/mod.rs | 11 +++++------ veilid-tools/src/tests/ios/mod.rs | 27 +++------------------------ 2 files changed, 8 insertions(+), 30 deletions(-) diff --git a/veilid-core/src/tests/ios/mod.rs b/veilid-core/src/tests/ios/mod.rs index 24e77af0..31339981 100644 --- a/veilid-core/src/tests/ios/mod.rs +++ b/veilid-core/src/tests/ios/mod.rs @@ -2,16 +2,15 @@ use super::native::*; use crate::*; use backtrace::Backtrace; use std::panic; -use tracing_subscriber::{fmt, prelude::*}; +use tracing_oslog::OsLogger; +use tracing_subscriber::prelude::*; #[no_mangle] #[allow(dead_code)] pub extern "C" fn run_veilid_core_tests() { - std::thread::spawn(|| { - block_on(async { - veilid_core_setup_ios_tests(); - run_all_tests().await; - }) + block_on(async { + veilid_core_setup_ios_tests(); + run_all_tests().await; }); } diff --git a/veilid-tools/src/tests/ios/mod.rs b/veilid-tools/src/tests/ios/mod.rs index 888eb9a7..af843827 100644 --- a/veilid-tools/src/tests/ios/mod.rs +++ b/veilid-tools/src/tests/ios/mod.rs @@ -15,17 +15,8 @@ pub extern "C" fn run_veilid_tools_tests() { pub fn veilid_tools_setup_ios_tests() { cfg_if! { if #[cfg(feature = "tracing")] { - // use tracing_subscriber::{filter, fmt, prelude::*}; - // let mut filters = filter::Targets::new(); - // for ig in DEFAULT_LOG_IGNORE_LIST { - // filters = filters.with_target(ig, filter::LevelFilter::OFF); - // } - // let fmt_layer = fmt::layer(); - // tracing_subscriber::registry() - // .with(filters) - // .with(filter::LevelFilter::TRACE) - // .with(fmt_layer) - // .init(); + use tracing_oslog::OsLogger; + use tracing_subscriber::prelude::*; let mut filters = filter::Targets::new(); for ig in DEFAULT_LOG_IGNORE_LIST { @@ -37,19 +28,7 @@ pub fn veilid_tools_setup_ios_tests() { .with(OsLogger::new("com.veilid.veilidtools-tests", "default")) .init(); } else { - // use simplelog::*; - // let mut logs: Vec> = Vec::new(); - // let mut cb = ConfigBuilder::new(); - // for ig in DEFAULT_LOG_IGNORE_LIST { - // cb.add_filter_ignore_str(ig); - // } - // logs.push(TermLogger::new( - // LevelFilter::Trace, - // cb.build(), - // TerminalMode::Mixed, - // ColorChoice::Auto, - // )); - // CombinedLogger::init(logs).expect("logger init error"); + use oslog::OsLogger; OsLogger::new("com.veilid.veilidtools-tests", "default") .level_filter(LevelFilter::Trace)