File tree Expand file tree Collapse file tree
SE050/wolfssl/wolfcrypt_test Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -89,10 +89,13 @@ echo "::group::run wolfcrypt_test against SE050Sim"
8989simpid=$!
9090sleep 2
9191export SE050_SIM_HOST=127.0.0.1 SE050_SIM_PORT=8050 LD_LIBRARY_PATH=/usr/local/lib
92- out=$( " $WORK /wolfcrypt_test" 2>&1 ) || true
92+ rc=0
93+ out=$( " $WORK /wolfcrypt_test" 2>&1 ) || rc=$?
9394kill " $simpid " 2> /dev/null || true
9495printf ' %s\n' " $out " | tail -40
95- printf ' %s' " $out " | grep -qiE " Ran wolfCrypt test|Test complete|error test passed" \
96- || { echo " FAIL: se050 wolfcrypt_test did not report success" ; exit 1; }
96+ # the demo now returns the test result and only prints this on a clean pass
97+ if [ " $rc " -ne 0 ] || ! printf ' %s' " $out " | grep -q " Ran wolfCrypt test successfully" ; then
98+ echo " FAIL: se050 wolfcrypt_test did not pass (rc=$rc )" ; exit 1
99+ fi
97100echo " PASS: se050 wolfcrypt_test ran against SE050Sim"
98101echo " ::endgroup::"
Original file line number Diff line number Diff line change @@ -63,10 +63,14 @@ sss_status_t ex_sss_entry(ex_sss_boot_ctx_t *pCtx)
6363 LOG_I ("Ran setconfig successfully" );
6464
6565 wolfSSL_Init ();
66- wolfcrypt_test (NULL );
66+ ret = wolfcrypt_test (NULL );
6767 wolfSSL_Cleanup ();
6868
69- LOG_I ("Ran wolfCrypt test" );
69+ if (ret != 0 ) {
70+ LOG_E ("wolfCrypt test failed (%d)" , ret );
71+ return kStatus_SSS_Fail ;
72+ }
73+ LOG_I ("Ran wolfCrypt test successfully" );
7074 return status ;
7175}
7276
You can’t perform that action at this time.
0 commit comments