test work
This commit is contained in:
parent
9a4ab59ed6
commit
e1be2bac67
@ -2,16 +2,15 @@ use super::native::*;
|
|||||||
use crate::*;
|
use crate::*;
|
||||||
use backtrace::Backtrace;
|
use backtrace::Backtrace;
|
||||||
use std::panic;
|
use std::panic;
|
||||||
use tracing_subscriber::{fmt, prelude::*};
|
use tracing_oslog::OsLogger;
|
||||||
|
use tracing_subscriber::prelude::*;
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
#[allow(dead_code)]
|
#[allow(dead_code)]
|
||||||
pub extern "C" fn run_veilid_core_tests() {
|
pub extern "C" fn run_veilid_core_tests() {
|
||||||
std::thread::spawn(|| {
|
block_on(async {
|
||||||
block_on(async {
|
veilid_core_setup_ios_tests();
|
||||||
veilid_core_setup_ios_tests();
|
run_all_tests().await;
|
||||||
run_all_tests().await;
|
|
||||||
})
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,17 +15,8 @@ pub extern "C" fn run_veilid_tools_tests() {
|
|||||||
pub fn veilid_tools_setup_ios_tests() {
|
pub fn veilid_tools_setup_ios_tests() {
|
||||||
cfg_if! {
|
cfg_if! {
|
||||||
if #[cfg(feature = "tracing")] {
|
if #[cfg(feature = "tracing")] {
|
||||||
// use tracing_subscriber::{filter, fmt, prelude::*};
|
use tracing_oslog::OsLogger;
|
||||||
// let mut filters = filter::Targets::new();
|
use tracing_subscriber::prelude::*;
|
||||||
// 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();
|
|
||||||
|
|
||||||
let mut filters = filter::Targets::new();
|
let mut filters = filter::Targets::new();
|
||||||
for ig in DEFAULT_LOG_IGNORE_LIST {
|
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"))
|
.with(OsLogger::new("com.veilid.veilidtools-tests", "default"))
|
||||||
.init();
|
.init();
|
||||||
} else {
|
} else {
|
||||||
// use simplelog::*;
|
use oslog::OsLogger;
|
||||||
// let mut logs: Vec<Box<dyn SharedLogger>> = 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");
|
|
||||||
|
|
||||||
OsLogger::new("com.veilid.veilidtools-tests", "default")
|
OsLogger::new("com.veilid.veilidtools-tests", "default")
|
||||||
.level_filter(LevelFilter::Trace)
|
.level_filter(LevelFilter::Trace)
|
||||||
|
Loading…
Reference in New Issue
Block a user