Closed yanxue-intel closed 4 years ago
@yanxue-intel For hardware-mode tests, it is better to use https://github.com/openenclave/openenclave repository.
OK, thanks. I saw that oeedger-cpp has been merged into openenclave repository. The oeedger's new cases will add to the openenclave repository, right?
oeedger8r-cpp is added as a submodule of openenclave and we also run the tests from the submodule as part of the Open Enclave SDK build process. So any test that is added to this repository will also be run there. Any hardware specific tests or security oriented tests are best added to the Open Enclave repository rather than here. We can also duplicate tests as needed.
ExternalProject_Add(
oeedger8r-cpp
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/oeedger8r-cpp
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/oeedger8r-cpp
CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
BUILD_ALWAYS on
TEST_BEFORE_INSTALL on <---- this ensures that the tests are run in OpenEnclave repository
INSTALL_COMMAND ""
BUILD_BYPRODUCTS ${BINARY})
got it, Thanks @anakrish
To summarize:
oeedger8r-cpp repository allows development/testing of oeedger8r outside of SGX hardware. This is important since oeedger8r also generates code for OPTEE enclaves. It tests runtime behavior of generated code by loading enclaves in a "virtual" mode which is akin to simulation mode in OE. Though the virtual mode has been made to look as much as possible like the OE public API surface, not all APIs have the same behavior since SGX hardware does not exist for oeedger8r-cpp repo (by design).
The strategy for oeedger8r testing is
The flag does not work in oeedger8r-cpp's test.
How to set enclave in hardware mode?