Awesome, thank you!
I did some tests and it's almost perfect. One glitch that I found is that
within Rust tests, the `--nocapture` flag isn't being respected. What I mean
by that is when I initialize the logger like so (note the `is_test(true)` call)
:
```Rust
#[no_mangle]
pub extern "C" fn ecall_init_test_logger() {
let mut builder = env_logger::Builder::from_default_env();
builder.is_test(true);
builder.init()
}
```
and then log from inside the enclave, it doesn't matter whether I pass
`--nocapture` to a test or not — the output is the same in both cases. The way
to suppress/enable it, is of course the `RUST_LOG` environment variable, but it
has the shortcoming of not depending on the test success/failure. It's still
beneficial to have `--nocapture` working, because it allows cargo to produce
almost no output at all when a test succeeds (which is what we want), but dump
everything out to output, when it fails, which is when you need the most
information to debug the failure.
Hope I'm not missing some configuration here option here. Cheers!
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/apache/incubator-teaclave-sgx-sdk/issues/271#issuecomment-705454120