You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cargo test would generate a single binary for each #[test] function, along with a fixed main function and environment setup. If we can apply this model to Intel SGX, we need to change the Rust compiler's code base and let it construct an enclave using given sigining keys and Intel SGX toolchains. Obviously, it is impossible.
To solve this, we provide a very useful crate named sgx_tunittest. If you can mark a function with #[test], you can always put it to rsgx_unit_tests! and test it and get the number of total failed testcases from its return value. It outputs colorful information to stdout and almost the same to cargo test. You can refer to the ported tests of serde-sgx to see how to port #[test], #[test] #[should_panic]
to SGX, and enjoy testing a single closure || assert!(true) without defining a function.
Is it possible to use
cargo test
for the in-enclave code? E.g. in the hello-rust sample:cargo build
is fine.The errors look like in #60, but that one is not related to
cargo test
. Is the solution applicable here, and if yes, how?The text was updated successfully, but these errors were encountered: