@@ -151,6 +151,44 @@ run_functional_tests() {
151151 cleanup
152152}
153153
154+ run_sdk_tests () {
155+ trap cleanup INT TERM ERR
156+
157+ echo_title " SDK tests"
158+ mkdir -p /tmp/fusion_data
159+ pushd ${TEACLAVE_CLI_INSTALL_DIR}
160+ ./teaclave_cli verify \
161+ --enclave-info ../examples/enclave_info.toml \
162+ --public-keys $( find ../examples -name " *.public.pem" ) \
163+ --signatures $( find ../examples -name " *.sign.sha256" )
164+ popd
165+ pushd ${TEACLAVE_SERVICE_INSTALL_DIR}
166+ ./teaclave_authentication_service &
167+ ./teaclave_storage_service &
168+ sleep 3 # wait for authentication and storage service
169+ ./teaclave_management_service &
170+ ./teaclave_scheduler_service &
171+ sleep 3 # wait for management service and scheduler_service
172+ ./teaclave_access_control_service &
173+ ./teaclave_frontend_service &
174+ sleep 3 # wait for other services
175+
176+ start_storage_server
177+
178+ # Run tests of execution service separately
179+ ./teaclave_execution_service &
180+ sleep 3 # wait for execution services
181+ popd
182+
183+ pushd ${MT_SGXAPP_TOML_DIR}
184+ RUSTFLAGS=${RUSTFLAGS} cargo test --manifest-path ${TEACLAVE_PROJECT_ROOT} /sdk/rust/Cargo.toml \
185+ --target-dir ${TEACLAVE_TARGET_DIR} /untrusted
186+ popd
187+
188+ # kill all background services
189+ cleanup
190+ }
191+
154192run_examples () {
155193 trap cleanup INT TERM ERR
156194
@@ -208,13 +246,17 @@ case "$1" in
208246 " functional" )
209247 run_functional_tests
210248 ;;
249+ " sdk" )
250+ run_sdk_tests
251+ ;;
211252 " example" )
212253 run_examples
213254 ;;
214255 * )
215256 run_unit_tests
216257 run_integration_tests
217258 run_functional_tests
259+ run_sdk_tests
218260 run_examples
219261 ;;
220262esac
0 commit comments