You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@teaclave.apache.org by GitBox <gi...@apache.org> on 2020/05/03 22:15:43 UTC

[GitHub] [incubator-teaclave-sgx-sdk] dingelish commented on issue #232: support cargo test

dingelish commented on issue #232:
URL: https://github.com/apache/incubator-teaclave-sgx-sdk/issues/232#issuecomment-623190944


   generally speaking, `cargo test` collects all `#[test]`s and creates a binary with a fixed driver and `libtest`. we don't have chance to change the compiler ad `libtest`. so the only chance to use `cargo test` is to test the untrusted app, not the enclave.
   
   good news is that we can use [inventory](https://github.com/mesalock-linux/inventory-sgx) and a proc-macro to implement something very similar to `#[test]` which collect every test fn pointer (decorated by the customized proc macro attribute) into a static array and then drive these test fn ptrs with our own prebuilt driver. in this way, though we cannot use `#[test]`, we can construct an only with all test `fn`s automatically, and export only 1 ECALL fn for triggering the tests.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@teaclave.apache.org
For additional commands, e-mail: notifications-help@teaclave.apache.org